mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
Implements Helge's recommendations
This commit is contained in:
@@ -4,15 +4,9 @@ describe PlosDetails, :vcr do
|
||||
let(:plos_paper) do
|
||||
create(:plos_paper, id: 1, reader: 0, doi: '10.1371/journal.pone.0089204')
|
||||
end
|
||||
let(:job) {PlosDetails.new}
|
||||
|
||||
it 'updates the view count' do
|
||||
before = plos_paper.reader
|
||||
|
||||
VCR.use_cassette 'plos_detail' do
|
||||
job.perform plos_paper.id
|
||||
end
|
||||
expect(plos_paper.reload.reader).not_to eq(before)
|
||||
subject.perform plos_paper.id
|
||||
expect(plos_paper.reload.reader).to eq(5047) # that's a lot of openSNP readers!
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
VCR.configure do |c|
|
||||
c.cassette_library_dir = 'spec/vcr'
|
||||
c.hook_into :webmock
|
||||
c.configure_rspec_metadata!
|
||||
end
|
||||
|
||||
@@ -39,19 +39,19 @@ http_interactions:
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
X-Request-Id:
|
||||
- 257ea14e-f9be-49d2-a87a-0dd5e04ea1bd
|
||||
- 543bacdb-cb91-4627-bbd8-c25bcd1b28e2
|
||||
Access-Control-Allow-Methods:
|
||||
- POST, GET, OPTIONS
|
||||
Etag:
|
||||
- W/"aabf5bb684e9b6bec8babfc5e6d1c67b"
|
||||
- W/"d90be3c19b6136e1029e8bbd316932fd"
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Runtime:
|
||||
- '0.063324'
|
||||
- '0.026299'
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
Date:
|
||||
- Fri, 12 Feb 2016 14:19:08 GMT
|
||||
- Fri, 12 Feb 2016 15:14:09 GMT
|
||||
X-Powered-By:
|
||||
- Phusion Passenger 5.0.23
|
||||
Server:
|
||||
@@ -198,5 +198,5 @@ http_interactions:
|
||||
OjAsImh0bWwiOjAsInNoYXJlcyI6MiwiZ3JvdXBzIjowLCJjb21tZW50cyI6
|
||||
MCwibGlrZXMiOjAsImNpdGF0aW9ucyI6MCwidG90YWwiOjJ9fV19
|
||||
http_version:
|
||||
recorded_at: Fri, 12 Feb 2016 14:19:08 GMT
|
||||
recorded_at: Fri, 12 Feb 2016 15:14:09 GMT
|
||||
recorded_with: VCR 3.0.1
|
||||
Reference in New Issue
Block a user