forked from rubyforgood/casa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed logged in tests because the route ignores authentication
- Loading branch information
1 parent
b46c265
commit 5410223
Showing
1 changed file
with
4 additions
and
44 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,9 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe "/error", type: :request do | ||
let(:organization) { create(:casa_org) } | ||
let!(:admin) { create(:casa_admin, casa_org: organization) } | ||
let!(:volunteer) { create(:volunteer, casa_org: organization) } | ||
let!(:supervisor) { create(:supervisor, casa_org: organization) } | ||
|
||
describe "GET /error" do | ||
context "when logged in as admin user" do | ||
it "raises an error causing an internal server error" do | ||
sign_in admin | ||
|
||
expect { | ||
get error_path | ||
}.to raise_error(StandardError, /This is an intentional test exception/) | ||
end | ||
end | ||
|
||
context "when logged in as volunteer" do | ||
it "raises an error causing an internal server error" do | ||
sign_in volunteer | ||
|
||
expect { | ||
get error_path | ||
}.to raise_error(StandardError, /This is an intentional test exception/) | ||
end | ||
end | ||
|
||
context "when logged in as supervisor" do | ||
it "raises an error causing an internal server error" do | ||
sign_in supervisor | ||
|
||
expect { | ||
get error_path | ||
}.to raise_error(StandardError, /This is an intentional test exception/) | ||
end | ||
end | ||
|
||
context "when not logged in" do | ||
it "raises an error causing an internal server error" do | ||
|
||
expect { | ||
get error_path | ||
}.to raise_error(StandardError, /This is an intentional test exception/) | ||
end | ||
end | ||
it "raises an error causing an internal server error" do | ||
expect { | ||
get error_path | ||
}.to raise_error(StandardError, /This is an intentional test exception/) | ||
end | ||
end |