Initial commit

This commit is contained in:
bterkuile committed 2025-09-15 15:55:58 -05:00
commit 4b5f7906d7
33 files changed
+933

No files matched your search

@@ -0,0 +1,20 @@
# frozen_string_literal: true
RSpec.describe StrikeMe::API::InvoiceResponse do
let(:valid_attributes) { { ok: true, checking_id: 'abc1', payment_request: 'abc2', error_message: 'abc3' } }
let(:invalid_attributes) { valid_attributes.merge(ok: false) }
context 'valid response' do
subject { described_class.new(valid_attributes) }
it { is_expected.to be_a StrikeMe::API::BaseModel }
it { is_expected.to be_valid }
it { is_expected.to have_attributes checking_id: 'abc1', payment_request: 'abc2', error_message: 'abc3' }
end
context 'invalid response' do
subject { described_class.new(invalid_attributes) }
it { is_expected.to_not be_valid }
end
end