-
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
Conversation
…date link test cases to edit link page spec
What Why Trello card : https://trello.com/c/3BOqpQOH/346-update-test-suite-in-local-links-manager |
get "/local_authorities/north-midlands/services/aardvark-wardens/reporting/edit" | ||
expect(response).to have_http_status(:ok) |
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
spec/requests/council_page_spec.rb
Outdated
login_as_gds_editor | ||
|
||
get "/local_authorities" | ||
expect(response).to have_http_status(200) |
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.
Is there a reason why we use expect(response).to have_http_status(:ok)
in other tests but here we use 200
?
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.
I have updated the tests with expect(response).to have_http_status(:ok)
to be consistent with the other test cases
spec/requests/council_page_spec.rb
Outdated
login_as_gds_editor | ||
|
||
get "/bad_homepage_url_status.csv" | ||
expect(response).to have_http_status(200) |
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.
Same as previous comment https://github.com/alphagov/local-links-manager/pull/1413/files#r1789985844
Follow these steps if you are doing a Rails upgrade.