-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filtering awaiting_provider_verification
- must now also be awaiting a decision - this prevents approved and rejected claims when filtering for this
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe Admin::ClaimsFilterForm, type: :model do | ||
describe "#claims" do | ||
context "when rejected whilst awaiting provider verification" do | ||
let!(:claim) do | ||
create( | ||
:claim, | ||
:rejected, | ||
:awaiting_provider_verification, | ||
policy: Policies::FurtherEducationPayments, | ||
) | ||
end | ||
|
||
let(:session) { {} } | ||
let(:filters) { { status: "awaiting_provider_verification" } } | ||
|
||
subject { described_class.new(filters:, session:) } | ||
|
||
it "filtering by status awaiting provider verification excludes them" do | ||
expect(subject.claims).not_to include(claim) | ||
end | ||
end | ||
end | ||
end |