Skip to content

Commit

Permalink
Add customized vcr spec on myDATA API 1.0.7 for qr_url
Browse files Browse the repository at this point in the history
Response captured with VCR on latest myDATA API, anonymized response qrUrl query parameter, replaced request body, mark, uid with values from send_invoices_success.yml
  • Loading branch information
kostas-s committed Dec 5, 2023
1 parent 7b00767 commit 35b5f2a
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 0 deletions.
95 changes: 95 additions & 0 deletions spec/cassettes/send_invoices_success_modified_v1_0_7.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions spec/lib/my_data/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@
expect(response_parser.errors).to be_empty
end
end

context "when request is successful (myDATA API 1.0.7)", vcr: { cassette_name: "send_invoices_success_modified_v1_0_7", match_requests_on: [:body] } do
let(:doc) { build(:invoices_doc).to_xml }

it "has proper qr_url" do
expect(response_parser.response.response.first.qr_url).to eq("https://mydataapidev.aade.gr/TimologioQR/QRInfo?q=encoded_string_replaced_on_cassette")
end
end
end

describe "#cancel_invoice" do
Expand Down

0 comments on commit 35b5f2a

Please sign in to comment.