summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2016-05-21 10:49:52 -0600
committermo khan <mo@mokhan.ca>2016-05-21 10:50:37 -0600
commit9ac4cdaba4e4df09f89ffdecaabf69555d62e0d3 (patch)
tree41b2b343cf6f8347b0f90681b48eccfbfdbf26b9 /spec/models
parentf7329510e820c2f6f58f5c12cf5ae1d177fbbb27 (diff)
hound happy.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/user_session_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/user_session_spec.rb b/spec/models/user_session_spec.rb
index 7878354..8cc1c18 100644
--- a/spec/models/user_session_spec.rb
+++ b/spec/models/user_session_spec.rb
@@ -11,12 +11,12 @@ describe UserSession do
end
describe "#access" do
- let(:request) { double(ip: '192.168.1.1', user_agent: 'blah') }
+ let(:request) { double(ip: "192.168.1.1", user_agent: "blah") }
let(:location) { build(:location) }
let(:because) { subject.access(request) }
before :each do
- allow(Location).to receive(:build_from_ip).with('192.168.1.1').and_return(location)
+ allow(Location).to receive(:build_from_ip).with("192.168.1.1").and_return(location)
because
end
@@ -54,16 +54,16 @@ describe UserSession do
end
it "returns nil if the id is not active" do
- expect(UserSession.authenticate('blah')).to be_nil
+ expect(UserSession.authenticate("blah")).to be_nil
end
end
describe "#after_create" do
- it 'schedules a job to import gyms in city' do
+ it "schedules a job to import gyms in city" do
allow(ImportGymsJob).to receive(:perform_later)
- subject.location = create(:portland)
+ subject.location = location = create(:portland)
subject.save!
- expect(ImportGymsJob).to have_received(:perform_later).with(subject.location)
+ expect(ImportGymsJob).to have_received(:perform_later).with(location)
end
end
end