mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Fix rubocop issues in feature spec
This commit is contained in:
@@ -11,8 +11,8 @@ describe "Taxonomies" do
|
||||
|
||||
context "show" do
|
||||
it "should display existing taxonomies" do
|
||||
create(:taxonomy, :name => 'Brand')
|
||||
create(:taxonomy, :name => 'Categories')
|
||||
create(:taxonomy, name: 'Brand')
|
||||
create(:taxonomy, name: 'Categories')
|
||||
click_link "Taxonomies"
|
||||
within_row(1) { expect(page).to have_content("Brand") }
|
||||
within_row(2) { expect(page).to have_content("Categories") }
|
||||
@@ -27,13 +27,13 @@ describe "Taxonomies" do
|
||||
|
||||
it "should allow an admin to create a new taxonomy" do
|
||||
expect(page).to have_content("New Taxonomy")
|
||||
fill_in "taxonomy_name", :with => "sports"
|
||||
fill_in "taxonomy_name", with: "sports"
|
||||
click_button "Create"
|
||||
expect(page).to have_content("successfully created!")
|
||||
end
|
||||
|
||||
it "should display validation errors" do
|
||||
fill_in "taxonomy_name", :with => ""
|
||||
fill_in "taxonomy_name", with: ""
|
||||
click_button "Create"
|
||||
expect(page).to have_content("can't be blank")
|
||||
end
|
||||
@@ -44,7 +44,7 @@ describe "Taxonomies" do
|
||||
create(:taxonomy)
|
||||
click_link "Taxonomies"
|
||||
within_row(1) { click_icon :edit }
|
||||
fill_in "taxonomy_name", :with => "sports 99"
|
||||
fill_in "taxonomy_name", with: "sports 99"
|
||||
click_button "Update"
|
||||
expect(page).to have_content("successfully updated!")
|
||||
expect(page).to have_content("sports 99")
|
||||
|
||||
Reference in New Issue
Block a user