Skip to content

Commit

Permalink
Assert against content in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmorrow committed Mar 3, 2017
1 parent 6a69aba commit 6ad28fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/features/edit_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,17 @@
end

it "displays a success message for successful updates" do
new_name = "Hyper"
new_email = "example@example.com"
customer = create(:customer)

visit edit_admin_customer_path(customer)
fill_in "Name", with: "Hyper"
fill_in "Email", with: "example@example.com"
fill_in "Name", with: new_name
fill_in "Email", with: new_email
click_on "Update Customer"

expect(page).to have_text(new_name)
expect(page).to have_text(new_email)
expect(page).to have_flash("Customer was successfully updated.")
end
end

0 comments on commit 6ad28fa

Please sign in to comment.