Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
}

before do
allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:selected_organization).and_return(organization)
assign :casa_org_metrics, metrics
render
Expand Down
3 changes: 0 additions & 3 deletions spec/views/banners/new.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
current_organization = user.casa_org
current_organization_banner = build(:banner, active: true, casa_org: current_organization)

allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:current_organization).and_return(current_organization)
without_partial_double_verification do
allow(view).to receive(:browser_time_zone).and_return("America/New_York")
Expand All @@ -31,7 +30,6 @@
current_organization = user.casa_org
current_organization_banner = build(:banner, active: true, casa_org: current_organization)

allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:current_organization).and_return(current_organization)
without_partial_double_verification do
allow(view).to receive(:browser_time_zone).and_return("America/New_York")
Expand All @@ -55,7 +53,6 @@
user = build_stubbed(:casa_admin)
current_organization = user.casa_org

allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:current_organization).and_return(current_organization)
without_partial_double_verification do
allow(view).to receive(:browser_time_zone).and_return("America/New_York")
Expand Down
1 change: 0 additions & 1 deletion spec/views/casa_admins/admins_table.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
it "allows editing admin users" do
admin = build_stubbed :casa_admin
enable_pundit(view, admin)
allow(view).to receive(:current_user).and_return(admin)

assign :admins, [admin.decorate]

Expand Down
4 changes: 0 additions & 4 deletions spec/views/casa_cases/new.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
context "while signed in as admin" do
it "has youth birth month and year" do
enable_pundit(view, user)
allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:current_organization).and_return(casa_org)

assign :casa_case, build(:casa_case, casa_org: casa_org)
assign :contact_types, casa_org.contact_types
Expand All @@ -24,8 +22,6 @@
context "when trying to assign a volunteer to a case" do
it "is able to assign volunteers" do
enable_pundit(view, user)
allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:current_organization).and_return(user.casa_org)

assign :casa_case, build(:casa_case, casa_org: user.casa_org)
assign :contact_types, casa_org.contact_types
Expand Down
1 change: 0 additions & 1 deletion spec/views/court_dates/edit.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
assign :court_date, court_date

enable_pundit(view, user)
allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:current_organization).and_return(user.casa_org)
end

Expand Down
3 changes: 0 additions & 3 deletions spec/views/court_dates/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@

assign :casa_case, court_date.casa_case
assign :court_date, court_date

allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:current_organization).and_return(user.casa_org)
end

context "with court details" do
Expand Down
1 change: 0 additions & 1 deletion spec/views/mileage_rates/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

before do
enable_pundit(view, admin)
allow(view).to receive(:current_user).and_return(admin)
sign_in admin
end

Expand Down
1 change: 0 additions & 1 deletion spec/views/placements/edit.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
assign :placement, placement

enable_pundit(view, user)
allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:current_organization).and_return(user.casa_org)
render
end
Expand Down
1 change: 0 additions & 1 deletion spec/views/reimbursements/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
before do
admin = build_stubbed :casa_admin
enable_pundit(view, admin)
allow(view).to receive(:current_user).and_return(admin)
end

it "does not have any translation missing classes" do
Expand Down
1 change: 0 additions & 1 deletion spec/views/volunteers/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

before do
enable_pundit(view, user)
allow(view).to receive(:current_user).and_return(user)
allow(view).to receive(:current_organization).and_return user.casa_org
assign :volunteers, [volunteer]
sign_in user
Expand Down
Loading