-
Notifications
You must be signed in to change notification settings - Fork 1
User controller rspec #114
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
base: integration
Are you sure you want to change the base?
Conversation
jamesonji
left a comment
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.
Need to remove spaces and comments. Improve test for 'save session id of current user'
| it 'saves session id of current user' do | ||
| # u = create(:user) | ||
| # expect(session[:user_id]).to eq(u.id) | ||
|
|
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.
Remove comment and space below it.
Probably better to set session[:user_id] to nil first and then do the comparison. I like the way you did in the comment though.
| it 'saves a record to the database' do | ||
| count_before = User.count | ||
| valid_user | ||
|
|
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.
Remove space, lesson learned from Steve
| it 'does not save a record to the database' do | ||
| count_before = User.count | ||
| invalid_user | ||
|
|
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.
Remove this space too >. <
testing for the user controller actions are implemented.
@jamesonji please, review this.