Fix rubocop issues in feature spec

This commit is contained in:
luisramos0
2019-09-17 18:56:55 +01:00
parent 5b703a02cd
commit 3833cbbf73

View File

@@ -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")