-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix taggable uniqueness in tags admin table
We need to check the class for uniqueness check on the admin tags table, otherwise it will be duplicated.
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
RSpec.describe "Tags", type: :system do | ||
let!(:picture) { create(:alchemy_picture, tag_list: "Foo") } | ||
let!(:picture2) { create(:alchemy_picture, tag_list: "Foo") } | ||
let!(:a_page) { create(:alchemy_page, tag_list: "Bar") } | ||
|
||
before { authorize_user(:as_admin) } | ||
|
||
describe "index view" do | ||
it "should list taggable class names" do | ||
visit "/admin/tags" | ||
expect(page).to have_selector(".label", text: "Picture", count: 1) | ||
expect(page).to have_selector(".label", text: "Page", count: 1) | ||
end | ||
end | ||
end |