-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set default host for system and request specs to CLAIMS_HOST
- Loading branch information
1 parent
460043b
commit c0449d8
Showing
2 changed files
with
20 additions
and
12 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
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,27 +1,23 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe "Sessions", type: :request do | ||
around do |example| | ||
host! ENV["PLACEMENTS_HOST"] | ||
example.run | ||
host! nil | ||
end | ||
|
||
describe "POST /auth/developer/callback" do | ||
it "returns http success" do | ||
placements_user = create(:placements_user) | ||
post auth_developer_callback_path, | ||
claims_user = create(:claims_user) | ||
|
||
post "/auth/developer/callback", | ||
params: { | ||
first_name: placements_user.first_name, | ||
last_name: placements_user.last_name, | ||
email: placements_user.email | ||
first_name: claims_user.first_name, | ||
last_name: claims_user.last_name, | ||
email: claims_user.email | ||
} | ||
|
||
follow_redirect! | ||
|
||
expect(response).to have_http_status(:success) | ||
# TODO: Change render_template once redirect to service specific | ||
# roots implemented | ||
expect(response).to render_template("placements/pages/index") | ||
expect(response).to render_template("claims/pages/index") | ||
end | ||
end | ||
end |