summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2016-05-21 10:04:28 -0600
committermo khan <mo@mokhan.ca>2016-05-21 10:04:28 -0600
commit3f106db4211bf2d9879263d7bae445a84b69a1ea (patch)
treee641a7c76a996c2a75572507a06c894a638e5ce7 /spec/models
parenta4352210c65e2370a20a9c8c1c25be8cbe3b9bef (diff)
skip import if gyms in city already exist.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/gym_spec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/models/gym_spec.rb b/spec/models/gym_spec.rb
index c2fc2a5..c8968e7 100644
--- a/spec/models/gym_spec.rb
+++ b/spec/models/gym_spec.rb
@@ -124,15 +124,14 @@ describe Gym do
it "returns true when a dup is found" do
subject.location = create(:portland)
subject.save!
- other = create(:gym, location: create(:portland))
+ create(:gym, location: create(:portland))
expect(subject.duplicate?).to be_truthy
end
it 'returns true when another gym has the same yelp id' do
subject.yelp_id = "hello-world"
- subject.save!
- other = create(:gym, yelp_id: subject.yelp_id)
+ create(:gym, yelp_id: subject.yelp_id)
expect(subject.duplicate?).to be_truthy
end