Skip to content
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 9 commits into from
Oct 8, 2024

Conversation

sairamya93
Copy link
Contributor

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

@sairamya93
Copy link
Contributor Author

sairamya93 commented Oct 4, 2024

What
LLM’s (Local Links Manager) test suite is RSpec but uses older Controller/Feature style specs instead of the newer Request/System specs. Update to use newer test styles

Why
Standardise code for easier development

Trello card : https://trello.com/c/3BOqpQOH/346-update-test-suite-in-local-links-manager

@sairamya93 sairamya93 requested a review from georges1996 October 7, 2024 07:58
Comment on lines +23 to +24
get "/local_authorities/north-midlands/services/aardvark-wardens/reporting/edit"
expect(response).to have_http_status(:ok)
Copy link
Contributor

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?

Copy link
Contributor Author

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

login_as_gds_editor

get "/local_authorities"
expect(response).to have_http_status(200)
Copy link
Contributor

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?

Copy link
Contributor Author

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

login_as_gds_editor

get "/bad_homepage_url_status.csv"
expect(response).to have_http_status(200)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sairamya93 sairamya93 requested a review from georges1996 October 8, 2024 08:13
@georges1996 georges1996 merged commit 66870b4 into main Oct 8, 2024
11 checks passed
@georges1996 georges1996 deleted the update-llm-test-suite branch October 8, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants