Skip to content

Commit

Permalink
request changes, add empty claim page, update test and routes
Browse files Browse the repository at this point in the history
  • Loading branch information
SocFoot committed Jan 4, 2024
1 parent c672260 commit 3d59381
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Empty file.
2 changes: 1 addition & 1 deletion config/routes/claims.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
scope module: :claims, as: :claims, constraints: { host: ENV["CLAIMS_HOST"] } do
root to: "schools#show"
root to: "pages#index"

resources :schools, only: %i[index show]

Expand Down
2 changes: 1 addition & 1 deletion spec/requests/sessions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
expect(response).to have_http_status(:success)
# TODO: Change render_template once redirect to service specific
# roots implemented
expect(response).to render_template("claims/schools/show")
expect(response).to render_template("claims/pages/index")
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
RSpec.feature "Home Page" do
after { Capybara.app_host = nil }

scenario "User visits the claims homepage" do
scenario "User visits his school" do
persona = given_there_is_an_existing_persona_for("Mary")
given_i_am_on_the_claims_site
when_i_visit_home_page
when_i_click_sign_in(persona)
when_i_visit_a_school_page
i_can_see_organisation_details
i_can_see_contact_details
end
Expand All @@ -18,6 +19,10 @@ def given_i_am_on_the_claims_site
Capybara.app_host = "http://#{ENV["CLAIMS_HOST"]}"
end

def when_i_visit_a_school_page
visit("/schools/fakeid")
end

def when_i_visit_home_page
visit("/")
end
Expand Down

0 comments on commit 3d59381

Please sign in to comment.