Skip to content

Commit f298035

Browse files
Test: refactor let declarations in case_court_reports/index specs for consistency
Signed-off-by: Audrea Cook <[email protected]>
1 parent dc80429 commit f298035

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/system/case_court_reports/index_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@
5050
end
5151

5252
RSpec.describe "case_court_reports/index", type: :system do
53-
let(:volunteer) { create(:volunteer) }
54-
let(:supervisor) { create(:supervisor, casa_org: volunteer.casa_org) }
55-
let(:casa_admin) { create(:casa_admin, casa_org: volunteer.casa_org) }
56-
5753
context "when first arriving to 'Generate Court Report' page", :js do
54+
let(:volunteer) { create(:volunteer) }
55+
5856
include_context "when on the court reports page", :volunteer
5957

6058
it "generation modal hidden", :aggregate_failures do
@@ -222,13 +220,15 @@
222220

223221
context "when logged in as a supervisor" do
224222
let(:volunteer) { volunteer_assigned_to_case }
223+
let(:supervisor) { create(:supervisor, casa_org: volunteer.casa_org) }
225224

226225
include_context "when on the court reports page", :supervisor
227226
it_behaves_like "a user with organization-level case visibility in autocomplete"
228227
end
229228

230229
context "when logged in as an admin" do
231230
let(:volunteer) { volunteer_assigned_to_case }
231+
let(:casa_admin) { create(:casa_admin, casa_org: volunteer.casa_org) }
232232

233233
include_context "when on the court reports page", :casa_admin
234234
it_behaves_like "a user with organization-level case visibility in autocomplete"

0 commit comments

Comments
 (0)