spec/resources/shift_spec.rb in when-i-work-0.2.0 vs spec/resources/shift_spec.rb in when-i-work-1.0.0

- old
+ new

@@ -1,17 +1,13 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe WhenIWork::Shift do + before { authenticate } describe "GET shifts" do it "gets shifts" do - VCR.use_cassette("authenticate", match_requests_on: [:headers]) do - response = WhenIWork.configure(ENV['WHENIWORK_USERNAME'], ENV['WHENIWORK_PASSWORD'], ENV['WHENIWORK_API_KEY']) - expect(response).to_not be_nil - end - VCR.use_cassette("shifts", match_requests_on: [:headers]) do response = WhenIWork::Shift.all - expect(response.body).to include('start', 'end', 'shifts') + expect(response).to include('start', 'end', 'shifts') end end end end