Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ilyabrin/e87c5ae007be9706e81f to your computer and use it in GitHub Desktop.
Save ilyabrin/e87c5ae007be9706e81f to your computer and use it in GitHub Desktop.
context "HAPPY PATHS" do
#...
scenario "create a parking lot and check hints count" do
@tenant.default_location.parking_lots.first.destroy
click_link "Create Parking Lot"
fill_in "Name", with: "Parking Lot 4"
select "Corporate", from: "Workgroup"
click_button "Submit"
success_messages ["Parking Lot successfully created."]
has_no_error_message
expect(page).to have_css("table#parking_lots tr", count: 3)
expect(page).to have_css("table#parking_lots tr", text: "Parking Lot 4")
expect(@tenant.default_location.parking_lots.find_by_name("Parking Lot 4").hints.count).to eq(4)
end
# ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment