spec/concerns/crud_leads_spec.rb in mrkt-0.4.0 vs spec/concerns/crud_leads_spec.rb in mrkt-0.5.0
- old
+ new
@@ -26,11 +26,11 @@
stub_request(:get, "https://#{host}/rest/v1/leads.json")
.with(query: { filterType: filter_type, filterValues: filter_values.join(',') })
.to_return(json_stub(response_stub))
end
- it { is_expected.to be_success }
+ it { is_expected.to eq(response_stub) }
end
describe '#createupdate_leads' do
let(:leads) do
[
@@ -70,11 +70,11 @@
stub_request(:post, "https://#{host}/rest/v1/leads.json")
.with(json_stub(request_body))
.to_return(json_stub(response_stub))
end
- it { is_expected.to be_success }
+ it { is_expected.to eq(response_stub) }
end
describe '#delete_leads' do
let(:leads) { [1] }
let(:request_body) do
@@ -99,11 +99,11 @@
stub_request(:delete, "https://#{host}/rest/v1/leads.json")
.with(json_stub(request_body))
.to_return(json_stub(response_stub))
end
- it { is_expected.to be_success }
+ it { is_expected.to eq(response_stub) }
end
describe '#associate_lead' do
let(:id) { 1 }
let(:cookie) { 'id:561-HYG-937&token:_mch-marketo.com-1427205775289-40768' }
@@ -124,10 +124,10 @@
result: [],
success: true
}
end
- it { is_expected.to be_success }
+ it { is_expected.to eq(response_stub) }
end
context 'with a non-existing lead id' do
let(:response_stub) do
{