Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete_transaction_detail #63

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/rock_rms/resources/transaction_detail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def create_transaction_detail(
post(transaction_detail_path, options)
end

def delete_transaction_detail(id)
delete(transaction_detail_path(id))
end

private

def transaction_detail_path(id = nil)
Expand Down
11 changes: 11 additions & 0 deletions spec/rock_rms/resources/transaction_detail_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,16 @@
end
end

describe '#delete_transaction_detail' do
it 'returns nothing' do
expect(client.delete_transaction_detail(123)).to eq(nil)
end

it 'passes id' do
expect(client).to receive(:delete).with('FinancialTransactionDetails/123')
client.delete_transaction_detail(123)
end
end

end
end
1 change: 1 addition & 0 deletions spec/support/rock_mock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class RockMock < Sinatra::Base
'FinancialPaymentDetails/:id',
'FinancialPersonSavedAccounts/:id',
'FinancialTransactions/:id',
'FinancialTransactionDetails/:id',
'FinancialScheduledTransactionDetails/:id',
'GroupMembers/:id'
].each do |end_point|
Expand Down
Loading