spec/lib/percy/capybara/client/snapshots_spec.rb in percy-capybara-0.2.1 vs spec/lib/percy/capybara/client/snapshots_spec.rb in percy-capybara-0.2.2
- old
+ new
@@ -233,10 +233,14 @@
.with(page).once.and_call_original
expect(capybara_client).to receive(:_get_css_resources)
.with(page).once.and_call_original
expect(capybara_client).to receive(:_get_image_resources)
.with(page).once.and_call_original
- resource_map = capybara_client.snapshot(page)
+
+ stub_request(:post, "https://percy.io/api/v1/snapshots/256/finalize")
+ .to_return(status: 200, body: '{"success":true}')
+
+ expect(capybara_client.snapshot(page)).to eq(true)
end
end
end
end