Created
June 3, 2018 04:21
-
-
Save chelseatroy/44d7e66be16a7c6b9b65c26fde5ec687 to your computer and use it in GitHub Desktop.
Switching Data Sources: Service Unit Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
RSpec.describe Services::ReceiptDataSource do | |
describe "get_receipts" do | |
it "makes appropriate call to canonical data service" do | |
@subject_under_test = Services::ReceiptDataSource.new | |
@subject_under_test.get_receipts | |
expect(WebMock).to have_requested(:get, "#{ENV['RECEIPT_ENDPOINT']}/receipts.json") | |
end | |
... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment