blob: 8c03f4d6617a09bc20b07b058a80d15ad1379514 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe SolidusSubscriptions::InstallmentDetail, type: :model do
it { is_expected.to validate_presence_of :installment }
describe '#failed?' do
subject { build(:installment_detail, success: success).failed? }
context 'when the detail was successful' do
let(:success) { true }
it { is_expected.to be_falsy }
end
context 'when the detail was not successfuly' do
let(:success) { false }
it { is_expected.to be_truthy }
end
end
end
|