-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added council page index and show test cases to request tests #1413
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6d2c08f
added council page index and show test cases to request tests
sairamya93 44aa6a8
updated edit homepage URL,upload and download links test cases in cou…
sairamya93 e5af2db
added system test for council page to test uploading csv with errors
sairamya93 031dc54
updated index,show and download links request tests for services page…
sairamya93 d8fad3c
removed duplicate test case in services page spec
sairamya93 9582ed0
added edit link,links csv test cases to broken links page spec and up…
sairamya93 129b159
fixed code partial in views and updated system test case for delete …
sairamya93 e5401aa
updated expected test status to be ok for better readability
sairamya93 defc967
removed the controller test cases
sairamya93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come we test this on line 16-17 and 23-24?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This involves testing 2 controller test cases in 1 test case - GET edit and handling a URL passed in via flash to make sure flash message is handled