Skip to content

Commit

Permalink
Set academic year to avoid unexpected results
Browse files Browse the repository at this point in the history
This claims spec was flaky as the returned academic year wasn't always what we expected it to be, now we've defined it, it'll always be the correct academic year.
  • Loading branch information
Kizr committed Oct 4, 2024
1 parent b4a7076 commit d907335
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
require "rails_helper"

RSpec.describe "Create claim", service: :claims, type: :system do
let!(:claim_window) { create(:claim_window, :current) }
let(:academic_year) do
build(:academic_year,
starts_on: Date.parse("1 September 2020"),
ends_on: Date.parse("31 August 2021"),
name: "2020 to 2021")
end
let!(:claim_window) { create(:claim_window, :current, academic_year:) }
let!(:school) { create(:claims_school) }
let!(:mentor1) { create(:claims_mentor, first_name: "Anne", schools: [school]) }
let!(:mentor2) { create(:claims_mentor, first_name: "Joe", schools: [school]) }
Expand Down

0 comments on commit d907335

Please sign in to comment.