spec/features/clients_spec.rb in espago-0.1.8 vs spec/features/clients_spec.rb in espago-0.1.9

- old
+ new

@@ -3,21 +3,21 @@ describe 'Espago.clients' do it "should get list of clients" do VCR.use_cassette('clients get') do response = Espago.clients :get - response.count.should eq(597) + expect(response.count).to eq(597) end end it "should get info abount clients" do VCR.use_cassette('clients get cli_w0Se2smYwyQ0Uw') do response = Espago.clients :get,{client_id:'cli_w0Se2smYwyQ0Uw'} - response.email.should eq(nil) - response.card['company'].should eq('VI') - response.description.should eq(nil) - response.created_at.should eq Time.at(1417004837) + expect(response.email).to eq(nil) + expect(response.card['company']).to eq('VI') + expect(response.description).to eq(nil) + expect(response.created_at).to eq Time.at(1417004837) end end it "should get params from new client" do VCR.use_cassette('clients post') do @@ -28,26 +28,26 @@ verification_value: '123', year:'2015', month:'2' }, } - response.status.should eq(201) - response.card['company'].should eq('VI') - response.card['last4'].should eq('4242') - response.card['authorized'].should eq(nil) - response.deleted.should eq(false) - response.created_at.should eq Time.at(1417007099) + expect(response.status).to eq(201) + expect(response.card['company']).to eq('VI') + expect(response.card['last4']).to eq('4242') + expect(response.card['authorized']).to eq(nil) + expect(response.deleted).to eq(false) + expect(response.created_at).to eq Time.at(1417007099) end end it "should get status after authorize client card" do VCR.use_cassette('clients authorize') do response = Espago.clients_authorize :post,{client_id:'cli_w0Se2smYwyQ0Uw'} - response.status.should eq(201) - response.card['company'].should eq('VI') - response.card['last4'].should eq('1112') - response.card['authorized'].should eq(true) + expect(response.status).to eq(201) + expect(response.card['company']).to eq('VI') + expect(response.card['last4']).to eq('1112') + expect(response.card['authorized']).to eq(true) end end it "should get params from updated client" do @@ -60,41 +60,41 @@ verification_value: '123', year:'2015', month:'2' }, } - response.status.should eq(200) - response.card['company'].should eq('VI') - response.card['last4'].should eq('4242') - response.card['authorized'].should eq(nil) - response.deleted.should eq(false) - response.created_at.should eq Time.at(1417004837) + expect(response.status).to eq(200) + expect(response.card['company']).to eq('VI') + expect(response.card['last4']).to eq('4242') + expect(response.card['authorized']).to eq(nil) + expect(response.deleted).to eq(false) + expect(response.created_at).to eq Time.at(1417004837) end end it "should get client invoices" do VCR.use_cassette('clients invoices') do response = Espago.clients_invoices :get, { client_id:'cli_w0Se2smYwyQ0Uw'} - response.status.should eq(200) - response.count.should eq(0) - response.invoices.should eq([]) + expect(response.status).to eq(200) + expect(response.count).to eq(0) + expect(response.invoices).to eq([]) end end it "should get client subscriptions" do VCR.use_cassette('clients subscriptions') do response = Espago.clients_subscriptions :get, { client_id:'cli_w0Se2smYwyQ0Uw'} - response.status.should eq(200) - response.count.should eq(0) - response.subscriptions.should eq([]) + expect(response.status).to eq(200) + expect(response.count).to eq(0) + expect(response.subscriptions).to eq([]) end end it "should get status 204 after delete client" do VCR.use_cassette('clients delete') do response = Espago.clients :delete, { client_id:'cli_5rDoJyvKDM4RbM'} - response.status.should eq(204) + expect(response.status).to eq(204) end end end