Skip to content

Commit ffe656c

Browse files
committed
try fix shared example org reference
1 parent 98ee0f2 commit ffe656c

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

spec/system/court_dates/view_spec.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
RSpec.describe "court_dates/edit", type: :system do
44
let(:now) { Date.new(2021, 1, 1) }
5-
let(:organization_containing_court_date) { create(:casa_org) }
5+
let(:organization) { create(:casa_org) }
66
let(:admin) { create(:casa_admin, casa_org: organization_containing_court_date) }
77
let(:volunteer) { create(:volunteer, casa_org: organization_containing_court_date) }
88
let!(:casa_case) { create(:casa_case, casa_org: organization_containing_court_date) }
@@ -43,7 +43,7 @@
4343
end
4444
end
4545

46-
shared_examples "user unable to view court date" do |user_type, organization|
46+
shared_examples "user unable to view court date" do |user_type|
4747
let(:user) { create(user_type, casa_org: organization) }
4848

4949
it "is not allowed to visit the court order page" do
@@ -55,15 +55,13 @@
5555
end
5656

5757
context "as a user from an organization not containing the court date" do
58-
let(:organization_not_containing_court_date) { create(:casa_org) }
58+
let(:organization) { create(:casa_org) }
5959

60-
it_should_behave_like "user unable to view court date", :admin, organization_not_containing_court_date
60+
it_should_behave_like "user unable to view court date", :admin
6161
end
6262

6363
context "as a volunteer not assigned to the case associated with the court case" do
64-
let(:other_volunteer) { create(:volunteer, casa_org: organization_containing_court_date) }
65-
66-
it_should_behave_like "user unable to view court date", :volunteer, organization_containing_court_date
64+
it_should_behave_like "user unable to view court date", :volunteer
6765
end
6866

6967
context "as a volunteer" do

0 commit comments

Comments
 (0)