diff --git a/app/components/admin/boxes/box_form_component.html.erb b/app/components/admin/boxes/box_form_component.html.erb
index bb268c06f..5a055f230 100644
--- a/app/components/admin/boxes/box_form_component.html.erb
+++ b/app/components/admin/boxes/box_form_component.html.erb
@@ -29,7 +29,7 @@
<%= link_to admin_tenant_tags_path(Current.tenant), class: "flex justify-center items-center flex-grow relative overflow-hidden gap-2.5 px-3.5 py-2.5 rounded-md bg-white border border-gray-300", data: { turbo_frame: "_top" } do %>
diff --git a/app/components/admin/tags/tag_form_component.rb b/app/components/admin/tags/tag_form_component.rb
index cab8e35e2..901f4b82c 100644
--- a/app/components/admin/tags/tag_form_component.rb
+++ b/app/components/admin/tags/tag_form_component.rb
@@ -1,4 +1,5 @@
class Admin::Tags::TagFormComponent < ViewComponent::Base
+ include ColorizedHelper, IconizedHelper
def initialize(tag:)
@tag = tag
end
diff --git a/app/components/admin/tags/tags_list_component.html.erb b/app/components/admin/tags/tags_list_component.html.erb
index 3888b56e6..97ca27705 100644
--- a/app/components/admin/tags/tags_list_component.html.erb
+++ b/app/components/admin/tags/tags_list_component.html.erb
@@ -17,8 +17,8 @@
<%= render Icons::InfoComponent.big_gray %>
<% @thread_tags.each do |thread_tag|%>
- <%= render MessageThreads::TagComponent.new(thread_tag) %>
+ <%= render Common::TagComponent.new(thread_tag.tag) %>
<% end %>
<%= link_to edit_message_thread_tags_path(@message_thread), data: { turbo_frame: "modal" }, title: "Upraviť štítky", class: "rounded-md bg-blue-100 p-1.5 hover:bg-blue-200" do %>
<%= render Icons::TagComponent.new(css_classes: "h-4 w-4 text-blue-600", stroke_width: 2) %>
diff --git a/app/components/message_threads/tag_component.html.erb b/app/components/message_threads/tag_component.html.erb
deleted file mode 100644
index 64182e336..000000000
--- a/app/components/message_threads/tag_component.html.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-
- <%= @tag.name %>
-
diff --git a/app/components/message_threads/tag_component.rb b/app/components/message_threads/tag_component.rb
deleted file mode 100644
index 1d6f7b744..000000000
--- a/app/components/message_threads/tag_component.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-module MessageThreads
- class TagComponent < ViewComponent::Base
- def initialize(message_thread_tag)
- @message_thread_tag = message_thread_tag
- @tag = @message_thread_tag.tag
- end
- end
-end
diff --git a/app/components/message_threads_table_row_component.html.erb b/app/components/message_threads_table_row_component.html.erb
index 733b40d81..38ee36e3c 100644
--- a/app/components/message_threads_table_row_component.html.erb
+++ b/app/components/message_threads_table_row_component.html.erb
@@ -17,7 +17,7 @@
<% if @visible_tags.present? %>
<% @visible_tags.each do |tag| %>
- <%= render Common::TagComponent.new(tag.name) %>
+ <%= render Common::TagComponent.new(tag) %>
<% end %>
<% end %>
diff --git a/app/controllers/admin/tags_controller.rb b/app/controllers/admin/tags_controller.rb
index bf352429b..b6d81b732 100644
--- a/app/controllers/admin/tags_controller.rb
+++ b/app/controllers/admin/tags_controller.rb
@@ -61,6 +61,6 @@ def set_tag
end
def simple_tag_params
- params.require(:simple_tag).permit(:name, :visible)
+ params.require(:simple_tag).permit(:name, :visible, :color, :icon)
end
end
diff --git a/app/helpers/colorized_helper.rb b/app/helpers/colorized_helper.rb
new file mode 100644
index 000000000..0f9b49105
--- /dev/null
+++ b/app/helpers/colorized_helper.rb
@@ -0,0 +1,29 @@
+module ColorizedHelper
+ def color_select_options
+ [""] + Colorized.colors.map { |color| [color, { class: "bg-#{color}-100 text-#{color}-600" }] }
+ end
+end
+
+# NOTE: Tailwind processor catches these
+# class="bg-slate-50 border-slate-400 text-slate-600 ring-slate-500/10"
+# class="bg-gray-50 border-gray-400 text-gray-600 ring-gray-500/10"
+# class="bg-zinc-50 border-zinc-400 text-zinc-600 ring-zinc-500/10"
+# class="bg-neutral-50 border-neutral-400 text-neutral-600 ring-neutral-500/10"
+# class="bg-stone-50 border-stone-400 text-stone-600 ring-stone-500/10"
+# class="bg-red-50 border-red-400 text-red-600 ring-red-500/10"
+# class="bg-orange-50 border-orange-400 text-orange-600 ring-orange-500/10"
+# class="bg-amber-50 border-amber-400 text-amber-600 ring-amber-500/10"
+# class="bg-yellow-50 border-yellow-400 text-yellow-600 ring-yellow-500/10"
+# class="bg-lime-50 border-lime-400 text-lime-600 ring-lime-500/10"
+# class="bg-green-50 border-green-400 text-green-600 ring-green-500/10"
+# class="bg-emerald-50 border-emerald-400 text-emerald-600 ring-emerald-500/10"
+# class="bg-teal-50 border-teal-400 text-teal-600 ring-teal-500/10"
+# class="bg-cyan-50 border-cyan-400 text-cyan-600 ring-cyan-500/10"
+# class="bg-sky-50 border-sky-400 text-sky-600 ring-sky-500/10"
+# class="bg-blue-50 border-blue-400 text-blue-600 ring-blue-500/10"
+# class="bg-indigo-50 border-indigo-400 text-indigo-600 ring-indigo-500/10"
+# class="bg-violet-50 border-violet-400 text-violet-600 ring-violet-500/10"
+# class="bg-purple-50 border-purple-400 text-purple-600 ring-purple-500/10"
+# class="bg-fuchsia-50 border-fuchsia-400 text-fuchsia-600 ring-fuchsia-500/10"
+# class="bg-pink-50 border-pink-400 text-pink-600 ring-pink-500/10"
+# class="bg-rose-50 border-rose-400 text-rose-600 ring-rose-500/10"
diff --git a/app/helpers/iconized_helper.rb b/app/helpers/iconized_helper.rb
new file mode 100644
index 000000000..529202e7f
--- /dev/null
+++ b/app/helpers/iconized_helper.rb
@@ -0,0 +1,5 @@
+module IconizedHelper
+ def icon_select_options
+ [""] + Iconized.icons
+ end
+end
diff --git a/app/models/box.rb b/app/models/box.rb
index 2b41b62e7..1a95cbe2b 100644
--- a/app/models/box.rb
+++ b/app/models/box.rb
@@ -15,6 +15,8 @@
# tenant_id :bigint not null
#
class Box < ApplicationRecord
+ include Colorized
+
belongs_to :tenant
belongs_to :api_connection
@@ -30,32 +32,6 @@ class Box < ApplicationRecord
before_create { self.color = Box.colors.keys[name.hash % Box.colors.size] if color.blank? }
- enum :color,
- {
- slate: 'slate',
- gray: 'gray',
- zinc: 'zinc',
- neutral: 'neutral',
- stone: 'stone',
- red: 'red',
- orange: 'orange',
- amber: 'amber',
- yellow: 'yellow',
- lime: 'lime',
- green: 'green',
- emerald: 'emerald',
- teal: 'teal',
- cyan: 'cyan',
- sky: 'sky',
- blue: 'blue',
- indigo: 'indigo',
- violet: 'violet',
- purple: 'purple',
- fuchsia: 'fuchsia',
- pink: 'pink',
- rose: 'rose'
- }
-
validate :validate_box_with_api_connection
private
diff --git a/app/models/concerns/colorized.rb b/app/models/concerns/colorized.rb
new file mode 100644
index 000000000..2f0baf238
--- /dev/null
+++ b/app/models/concerns/colorized.rb
@@ -0,0 +1,59 @@
+module Colorized
+ extend ActiveSupport::Concern
+
+ included do
+ enum :color,
+ {
+ slate: 'slate',
+ gray: 'gray',
+ zinc: 'zinc',
+ neutral: 'neutral',
+ stone: 'stone',
+ red: 'red',
+ orange: 'orange',
+ amber: 'amber',
+ yellow: 'yellow',
+ lime: 'lime',
+ green: 'green',
+ emerald: 'emerald',
+ teal: 'teal',
+ cyan: 'cyan',
+ sky: 'sky',
+ blue: 'blue',
+ indigo: 'indigo',
+ violet: 'violet',
+ purple: 'purple',
+ fuchsia: 'fuchsia',
+ pink: 'pink',
+ rose: 'rose'
+ }
+ end
+
+ def self.colors
+ [
+ :slate,
+ :gray,
+ :zinc,
+ :neutral,
+ :stone,
+ :red,
+ :orange,
+ :amber,
+ :yellow,
+ :lime,
+ :green,
+ :emerald,
+ :teal,
+ :cyan,
+ :sky,
+ :blue,
+ :indigo,
+ :violet,
+ :purple,
+ :fuchsia,
+ :pink,
+ :rose
+ ]
+ end
+end
+
diff --git a/app/models/concerns/iconized.rb b/app/models/concerns/iconized.rb
new file mode 100644
index 000000000..3a3503a42
--- /dev/null
+++ b/app/models/concerns/iconized.rb
@@ -0,0 +1,12 @@
+module Iconized
+ extend ActiveSupport::Concern
+
+ def self.icons
+ Common::IconComponent::ICONS.keys
+ end
+
+ included do
+ validates_inclusion_of :icon, in: Iconized.icons, allow_blank: true
+ end
+end
+
diff --git a/app/models/draft_tag.rb b/app/models/draft_tag.rb
index 16e0839b0..d4f47b6b7 100644
--- a/app/models/draft_tag.rb
+++ b/app/models/draft_tag.rb
@@ -2,15 +2,21 @@
#
# Table name: tags
#
-# id :bigint not null, primary key
-# external_name :string
-# name :string not null
-# type :string not null
-# visible :boolean default(TRUE), not null
-# created_at :datetime not null
-# updated_at :datetime not null
-# owner_id :bigint
-# tenant_id :bigint not null
+# id :bigint not null, primary key
+# color :enum
+# external_name :string
+# icon :string
+# name :string not null
+# tag_groups_count :integer default(0), not null
+# type :string not null
+# visible :boolean default(TRUE), not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# owner_id :bigint
+# tenant_id :bigint not null
#
class DraftTag < Tag
+ def destroyable?
+ false
+ end
end
diff --git a/app/models/everything_tag.rb b/app/models/everything_tag.rb
new file mode 100644
index 000000000..59e998f35
--- /dev/null
+++ b/app/models/everything_tag.rb
@@ -0,0 +1,22 @@
+# == Schema Information
+#
+# Table name: tags
+#
+# id :bigint not null, primary key
+# color :enum
+# external_name :string
+# icon :string
+# name :string not null
+# tag_groups_count :integer default(0), not null
+# type :string not null
+# visible :boolean default(TRUE), not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# owner_id :bigint
+# tenant_id :bigint not null
+#
+class EverythingTag < Tag
+ def destroyable?
+ false
+ end
+end
diff --git a/app/models/message_thread.rb b/app/models/message_thread.rb
index 26cc236ef..e51f8eee7 100644
--- a/app/models/message_thread.rb
+++ b/app/models/message_thread.rb
@@ -30,6 +30,7 @@ def find_or_create_by_uuid!(uuid:)
attr_accessor :search_highlight
+ after_create_commit ->(thread) { thread.tags << thread.tenant.everything_tag }
after_create_commit ->(thread) { EventBus.publish(:message_thread_created, thread) }
after_update_commit ->(thread) { EventBus.publish(:message_thread_changed, thread) }
diff --git a/app/models/simple_tag.rb b/app/models/simple_tag.rb
index 3b116d413..793824314 100644
--- a/app/models/simple_tag.rb
+++ b/app/models/simple_tag.rb
@@ -2,15 +2,18 @@
#
# Table name: tags
#
-# id :bigint not null, primary key
-# external_name :string
-# name :string not null
-# type :string not null
-# visible :boolean default(TRUE), not null
-# created_at :datetime not null
-# updated_at :datetime not null
-# owner_id :bigint
-# tenant_id :bigint not null
+# id :bigint not null, primary key
+# color :enum
+# external_name :string
+# icon :string
+# name :string not null
+# tag_groups_count :integer default(0), not null
+# type :string not null
+# visible :boolean default(TRUE), not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# owner_id :bigint
+# tenant_id :bigint not null
#
class SimpleTag < Tag
def destroyable?
diff --git a/app/models/tag.rb b/app/models/tag.rb
index 19b7a048f..edb589e7b 100644
--- a/app/models/tag.rb
+++ b/app/models/tag.rb
@@ -2,18 +2,22 @@
#
# Table name: tags
#
-# id :bigint not null, primary key
-# external_name :string
-# name :string not null
-# type :string not null
-# visible :boolean default(TRUE), not null
-# created_at :datetime not null
-# updated_at :datetime not null
-# owner_id :bigint
-# tenant_id :bigint not null
+# id :bigint not null, primary key
+# color :enum
+# external_name :string
+# icon :string
+# name :string not null
+# tag_groups_count :integer default(0), not null
+# type :string not null
+# visible :boolean default(TRUE), not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# owner_id :bigint
+# tenant_id :bigint not null
#
class Tag < ApplicationRecord
include AuditableEvents
+ include Colorized, Iconized
belongs_to :tenant
belongs_to :owner, class_name: 'User', optional: true
@@ -31,14 +35,17 @@ class Tag < ApplicationRecord
scope :simple, -> { where(type: SimpleTag.to_s) }
scope :visible, -> { where(visible: true) }
- after_create_commit ->(tag) { tag.mark_readable_by_groups([tag.tenant.admin_group]) }
after_update_commit ->(tag) { EventBus.publish(:tag_renamed, tag) if previous_changes.key?("name") }
def mark_readable_by_groups(groups)
self.groups += groups
end
+ def gives_access?
+ tag_groups_count.positive?
+ end
+
def destroyable?
- false
+ raise NotImplementedError
end
end
diff --git a/app/models/tag_group.rb b/app/models/tag_group.rb
index 66ea09b14..92e3a448f 100644
--- a/app/models/tag_group.rb
+++ b/app/models/tag_group.rb
@@ -12,7 +12,7 @@ class TagGroup < ApplicationRecord
include AuditableEvents
belongs_to :group
- belongs_to :tag
+ belongs_to :tag, counter_cache: true
# used for joins only
has_many :group_memberships, primary_key: :group_id, foreign_key: :group_id
diff --git a/app/models/tenant.rb b/app/models/tenant.rb
index ee8103033..ccfa367f6 100644
--- a/app/models/tenant.rb
+++ b/app/models/tenant.rb
@@ -18,6 +18,7 @@ class Tenant < ApplicationRecord
has_many :custom_groups
has_one :draft_tag
+ has_one :everything_tag
has_many :boxes, dependent: :destroy
has_many :automation_rules, class_name: "Automation::Rule", dependent: :destroy
@@ -56,12 +57,20 @@ def disable_feature(feature)
save!
end
+ def make_admins_see_everything!
+ everything_tag.groups << admin_group
+ end
+
private
def create_default_objects
+ create_draft_tag!(name: "Rozpracované", visible: true)
+ create_everything_tag!(name: "Všetky správy", visible: false)
+
create_all_group!(name: "all")
create_admin_group!(name: "admins")
create_signer_group!(name: "signers")
- create_draft_tag!(name: "Rozpracované", visible: true)
+
+ make_admins_see_everything!
end
end
diff --git a/app/models/upvs/delivery_notification_tag.rb b/app/models/upvs/delivery_notification_tag.rb
index 2bb069707..efef2da63 100644
--- a/app/models/upvs/delivery_notification_tag.rb
+++ b/app/models/upvs/delivery_notification_tag.rb
@@ -2,15 +2,18 @@
#
# Table name: tags
#
-# id :bigint not null, primary key
-# external_name :string
-# name :string not null
-# type :string not null
-# visible :boolean default(TRUE), not null
-# created_at :datetime not null
-# updated_at :datetime not null
-# owner_id :bigint
-# tenant_id :bigint not null
+# id :bigint not null, primary key
+# color :enum
+# external_name :string
+# icon :string
+# name :string not null
+# tag_groups_count :integer default(0), not null
+# type :string not null
+# visible :boolean default(TRUE), not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# owner_id :bigint
+# tenant_id :bigint not null
#
class Upvs::DeliveryNotificationTag < ::Tag
def self.find_or_create_for_tenant!(tenant)
diff --git a/db/migrate/20231205190743_add_icon_to_tags.rb b/db/migrate/20231205190743_add_icon_to_tags.rb
new file mode 100644
index 000000000..588309564
--- /dev/null
+++ b/db/migrate/20231205190743_add_icon_to_tags.rb
@@ -0,0 +1,5 @@
+class AddIconToTags < ActiveRecord::Migration[7.0]
+ def change
+ add_column :tags, :icon, :string
+ end
+end
diff --git a/db/migrate/20231205190907_add_group_memberships_counter_to_tags.rb b/db/migrate/20231205190907_add_group_memberships_counter_to_tags.rb
new file mode 100644
index 000000000..0aa58d1aa
--- /dev/null
+++ b/db/migrate/20231205190907_add_group_memberships_counter_to_tags.rb
@@ -0,0 +1,8 @@
+class AddGroupMembershipsCounterToTags < ActiveRecord::Migration[7.0]
+ def change
+ add_column :tags, :tag_groups_count, :integer, null: false, default: 0
+ Tag.find_each do |tag|
+ Tag.reset_counters(tag.id, :tag_groups)
+ end
+ end
+end
diff --git a/db/migrate/20231205192436_add_color_to_tags.rb b/db/migrate/20231205192436_add_color_to_tags.rb
new file mode 100644
index 000000000..4c417fbc5
--- /dev/null
+++ b/db/migrate/20231205192436_add_color_to_tags.rb
@@ -0,0 +1,7 @@
+class AddColorToTags < ActiveRecord::Migration[7.0]
+ def change
+ change_table :tags do |t|
+ t.enum :color, enum_type: 'color'
+ end
+ end
+end
diff --git a/db/migrate/20231206090833_migrate_to_everything_tag.rb b/db/migrate/20231206090833_migrate_to_everything_tag.rb
new file mode 100644
index 000000000..7a61cf292
--- /dev/null
+++ b/db/migrate/20231206090833_migrate_to_everything_tag.rb
@@ -0,0 +1,19 @@
+class MigrateToEverythingTag < ActiveRecord::Migration[7.0]
+ def up
+ Tenant.find_each do |tenant|
+ tenant.admin_group.tag_groups.destroy_all
+
+ tenant.create_everything_tag!(name: "Všetky správy", visible: false) unless tenant.everything_tag
+ tenant.make_admins_see_everything!
+ tenant.boxes.find_each do |box|
+ box.message_threads.find_each do |thread|
+ thread.tags << tenant.everything_tag
+ end
+ end
+ end
+ end
+
+ def down
+ # noop
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index ab2396bf0..1981dde3c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[7.0].define(version: 2023_12_01_113708) do
+ActiveRecord::Schema[7.0].define(version: 2023_12_06_090833) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@@ -432,6 +432,9 @@
t.bigint "owner_id"
t.string "external_name"
t.string "type", null: false
+ t.enum "color", enum_type: "color"
+ t.integer "tag_groups_count", default: 0, null: false
+ t.string "icon"
t.index "tenant_id, lower((name)::text)", name: "index_tags_on_tenant_id_and_lowercase_name", unique: true
t.index ["owner_id"], name: "index_tags_on_owner_id"
t.index ["tenant_id"], name: "index_tags_on_tenant_id"
diff --git a/test/fixtures/tags.yml b/test/fixtures/tags.yml
index 6c998cf58..121278182 100644
--- a/test/fixtures/tags.yml
+++ b/test/fixtures/tags.yml
@@ -38,6 +38,12 @@ ssd_drafts:
visible: true
tenant: ssd
+ssd_everything:
+ name: Everything
+ type: EverythingTag
+ visible: false
+ tenant: ssd
+
ssd_other:
name: Other
type: SimpleTag
@@ -73,3 +79,9 @@ solver_drafts:
type: DraftTag
visible: true
tenant: solver
+
+solver_everything:
+ name: Everything
+ type: EverythingTag
+ visible: false
+ tenant: solver
\ No newline at end of file
diff --git a/test/models/everything_tag_test.rb b/test/models/everything_tag_test.rb
new file mode 100644
index 000000000..5ec2dca4f
--- /dev/null
+++ b/test/models/everything_tag_test.rb
@@ -0,0 +1,15 @@
+require "test_helper"
+
+class EverythingTagTest < ActiveSupport::TestCase
+ test "adds everything tag to every thread" do
+ box = boxes(:ssd_main)
+ thread = box.message_threads.create!(
+ title: 'Test',
+ original_title: 'Test',
+ delivered_at: Time.current,
+ last_message_delivered_at: Time.current
+ )
+
+ assert_includes thread.tags, box.tenant.everything_tag
+ end
+end
diff --git a/test/models/govbox/message_test.rb b/test/models/govbox/message_test.rb
index f95d08c69..9c9efb62a 100644
--- a/test/models/govbox/message_test.rb
+++ b/test/models/govbox/message_test.rb
@@ -21,12 +21,12 @@ class Govbox::MessageTest < ActiveSupport::TestCase
assert_equal message.objects.first.message_object_datum.blob, "MyContent"
- assert_equal message.tags.count, 1
- assert_equal message.tags.first.name, "slovensko.sk:#{govbox_message.folder.name}"
- assert_equal message.tags.first.external_name, "slovensko.sk:#{govbox_message.folder.name}"
- assert_equal message.tags.first.visible, false
- assert_equal message.thread.tags.count, 1
- assert_equal message.tags.first, message.thread.tags.first
+ assert_equal 1, message.tags.count
+ assert_equal "slovensko.sk:#{govbox_message.folder.name}", message.tags.first.name
+ assert_equal "slovensko.sk:#{govbox_message.folder.name}", message.tags.first.external_name
+ assert_not message.tags.first.visible
+ assert_equal 1, message.thread.tags.simple.count
+ assert_equal message.tags.first, message.thread.tags.simple.first
end
test "should include general agenda subject in message title" do
@@ -48,10 +48,10 @@ class Govbox::MessageTest < ActiveSupport::TestCase
message = Message.last
- assert_equal message.tags.count, 1
- assert_equal message.tags.first, tag
- assert_equal message.thread.tags.count, 1
- assert_equal message.thread.tags.first, tag
+ assert_equal 1, message.tags.count
+ assert_equal tag, message.tags.first
+ assert_equal 1, message.thread.tags.simple.count
+ assert_equal tag, message.thread.tags.simple.first
end
test "should not duplicate message thread tags" do
@@ -66,15 +66,14 @@ class Govbox::MessageTest < ActiveSupport::TestCase
Govbox::Message.create_message_with_thread!(govbox_message2)
message2 = Message.last
- assert_equal message1.tags.count, 1
- assert_equal message1.tags.first, tag
- assert_equal message1.thread.tags.count, 1
- assert_equal message1.thread.tags.first, tag
+ assert_equal tag, message1.tags.first
+ assert_equal 1, message1.thread.tags.simple.count
+ assert_equal tag, message1.thread.tags.simple.first
- assert_equal message2.tags.count, 1
- assert_equal message2.tags.first, tag
- assert_equal message2.thread.tags.count, 1
- assert_equal message2.thread.tags.first, tag
+ assert_equal 1, message2.tags.simple.count
+ assert_equal tag, message2.tags.simple.first
+ assert_equal 1, message2.thread.tags.simple.count
+ assert_equal tag, message2.thread.tags.simple.first
end
test "should not use delivery notification title for message thread title" do
diff --git a/test/models/tag_test.rb b/test/models/tag_test.rb
index d702f58b0..b4abcd82f 100644
--- a/test/models/tag_test.rb
+++ b/test/models/tag_test.rb
@@ -1,10 +1,4 @@
require "test_helper"
class TagTest < ActiveSupport::TestCase
- test "should mark tag readable by admin groups" do
- tenant = tenants(:ssd)
- tag = SimpleTag.create(name: 'New tag', tenant: tenant)
-
- assert tag.groups == [tenant.admin_group]
- end
end