fix style code

parent 57fb8aec
Pipeline #1278 failed with stages
in 0 seconds
...@@ -47,10 +47,10 @@ p { ...@@ -47,10 +47,10 @@ p {
} }
} }
.navbar ul{ .navbar ul {
list-style: none; list-style: none;
} }
li a{ li a {
color: #fff; color: #fff;
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
class SessionsController < ApplicationController class SessionsController < ApplicationController
include SessionsHelper include SessionsHelper
def new def new
end end
......
class UsersController < ApplicationController class UsersController < ApplicationController
def show def show
@user = User.find(params[:id]) @user = User.find(params[:id])
end end
...@@ -11,7 +10,7 @@ class UsersController < ApplicationController ...@@ -11,7 +10,7 @@ class UsersController < ApplicationController
def create def create
@user = User.new(user_params) @user = User.new(user_params)
if @user.save if @user.save
log_in @user helpers.log_in @user
flash[:success] = "Welcome to the Sample App!" flash[:success] = "Welcome to the Sample App!"
redirect_to @user redirect_to @user
# Handle a successful save. # Handle a successful save.
......
...@@ -6,16 +6,16 @@ class UsersLoginTest < ActionDispatch::IntegrationTest ...@@ -6,16 +6,16 @@ class UsersLoginTest < ActionDispatch::IntegrationTest
end end
test "login with valid email/invalid password" do test "login with valid email/invalid password" do
get login_path get login_path
assert_template 'sessions/new' assert_template 'sessions/new'
post login_path, params: { session: { email: post login_path, params: { session: { email:
@user.email, @user.email,
password: "invalid" } } password: "invalid" } }
assert_not is_logged_in? assert_not is_logged_in?
assert_template 'sessions/new' assert_template 'sessions/new'
assert_not flash.empty? assert_not flash.empty?
get root_path get root_path
assert flash.empty? assert flash.empty?
end end
test "login with valid information followed by logout" do test "login with valid information followed by logout" do
get login_path get login_path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment