summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2016-05-28 16:11:10 -0600
committermo khan <mo@mokhan.ca>2016-05-28 16:11:10 -0600
commit032defa413b4e775bbf2aab041a385c7d4f57f1d (patch)
tree8dccd9cb6c74a8f6b972d245554d0af9e308b771 /spec/features
parent890fc6b147cd92a2c336457cd044868abcad92e7 (diff)
convert search to a static gateway
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/profiles_spec.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/spec/features/profiles_spec.rb b/spec/features/profiles_spec.rb
index 4fb4b50..fcc06d5 100644
--- a/spec/features/profiles_spec.rb
+++ b/spec/features/profiles_spec.rb
@@ -31,6 +31,7 @@ feature "Profiles", type: :feature do
it "allows me to edit my profile" do
subject.change(gender: :male, social_tolerance: :low)
+ subject.save_changes
expect(page).to have_content(user.username)
expect(page).to have_content(
@@ -42,17 +43,10 @@ feature "Profiles", type: :feature do
gym = build(:gym)
allow(Gym).to receive(:create_from_yelp!).and_return(gym)
- link_text = I18n.translate("profiles.edit.choose_home_gym")
- subject.click_link(link_text)
- within("#gym-search form") do
- fill_in "q", with: "sait"
- fill_in "city", with: "calgary"
- click_button("Search")
- end
- subject.wait_for_ajax
- subject.click_button("Mine")
- subject.wait_for_ajax
+ subject.click_link(I18n.t("profiles.edit.choose_home_gym"))
+ subject.choose_home_gym(city: "calgary", name: "sait")
subject.save_changes
+
expect(page).to have_content(gym.name)
end
end