-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Spec coverage on Settings/ controllers specs #24221
Spec coverage on Settings/ controllers specs #24221
Conversation
33eb31d
to
e905aeb
Compare
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.
In most cases, the tests you added only check for the HTTP response code. While that's still an improvement given these methods aren't currently tested at all, that makes the test descriptions misleading, whereas similar test descriptions read something like “returns http success” in our other tests.
I'd like that either the tests get changed to actually test what they claim, or their description be changed to reflect what they are actually testing.
it 'removes an alias' do | ||
delete :destroy, params: { id: account_alias.id } | ||
|
||
expect(response).to redirect_to(settings_aliases_path) |
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 think it should also check that the record actually gets deleted.
it 'creates an alias for the user' do | ||
post :create, params: { account_alias: { acct: '[email protected]' } } | ||
|
||
expect(response).to redirect_to(settings_aliases_path) |
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 think it should also check that a record gets actually created.
e905aeb
to
4a19d6d
Compare
Pushed update with a few spec changes for better creation/deletion checks, and also some wording changes to make some of the descriptions less inaccurate. You are correct that my current goal here is broad coverage and just getting all the lines executing in the spec. I'll continue to go deeper on actual behavior specs once the broad coverage is solid. |
Adds more coverage to the /settings/ controllers.
Does not quite get to 100% on this group ... but pretty close. Mostly failure edge cases left to do, but I think the full happy path is covered after these changes.