work on tests

This commit is contained in:
Josh
2018-05-10 15:03:59 -04:00
parent 5347d902c0
commit b452932767
12 changed files with 165 additions and 127 deletions

View File

@ -1,5 +1,22 @@
require 'test_helper'
class UsersControllerTest < ActionDispatch::IntegrationTest
test 'can signup for greenlight account.' do
post signup_path, params: {
user: {
name: "Greenlight User",
username: "greenlight_user",
email: "greenlight@example.com",
password: "password",
password_confirmation: "password"
}
}
user = User.find_by(email: "greenlight@example.com")
assert_not_nil user
assert_redirected_to room_path(user.room.uid)
assert user.id, session[:user_id]
end
end