-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1413 from alphagov/update-llm-test-suite
added council page index and show test cases to request tests
- Loading branch information
Showing
11 changed files
with
194 additions
and
256 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,3 +1,51 @@ | ||
RSpec.describe "Broken links page" do | ||
it_behaves_like "redirects non-GDS Editors to services page", "/" | ||
end | ||
|
||
describe "Broken links page" do | ||
before do | ||
login_as_gds_editor | ||
@local_authority = create(:local_authority, name: "North Midlands") | ||
@service = create(:service, label: "Aardvark Wardens") | ||
@interaction = create(:interaction, label: "Reporting") | ||
@service_interaction = create(:service_interaction, service: @service, interaction: @interaction) | ||
end | ||
|
||
context "GET edit" do | ||
it "GET edit handles URL passed in via flash" do | ||
get "/local_authorities/north-midlands/services/aardvark-wardens/reporting/edit" | ||
expect(response).to have_http_status(:ok) | ||
|
||
flash_hash = ActionDispatch::Flash::FlashHash.new | ||
flash_hash[:link_url] = "https://www.example.com" | ||
session["flash"] = flash_hash.to_session_value | ||
|
||
get "/local_authorities/north-midlands/services/aardvark-wardens/reporting/edit" | ||
expect(response).to have_http_status(:ok) | ||
end | ||
end | ||
|
||
context "GET homepage_links_status_csv" do | ||
it "returns a 200 response" do | ||
get "/check_homepage_links_status.csv" | ||
expect(response).to have_http_status(:ok) | ||
expect(response.headers["Content-Type"]).to eq("text/csv") | ||
end | ||
end | ||
|
||
context "GET links_status_csv" do | ||
it "returns a 200 response" do | ||
get "/check_links_status.csv" | ||
expect(response).to have_http_status(:ok) | ||
expect(response.headers["Content-Type"]).to eq("text/csv") | ||
end | ||
end | ||
|
||
context "GET bad_links_url_and_status_csv" do | ||
it "returns a 200 response" do | ||
get "/bad_links_url_status.csv" | ||
expect(response).to have_http_status(:ok) | ||
expect(response.headers["Content-Type"]).to eq("text/csv") | ||
end | ||
end | ||
end |
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
Oops, something went wrong.