Skip to content

Conversation

@david82213
Copy link

@david82213 david82213 commented Nov 24, 2016

testing for the user controller actions are implemented.
@jamesonji please, review this.

Copy link
Contributor

@jamesonji jamesonji left a 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)

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this space too >. <

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants