Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sample_app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyen Hoang Mai Phuong
sample_app
Commits
f9e786b7
Commit
f9e786b7
authored
Jun 17, 2021
by
Nguyen Hoang Mai Phuong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix style code
parent
57fb8aec
Pipeline
#1278
failed with stages
in 0 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
app/assets/stylesheets/custom.scss
+2
-2
app/controllers/sessions_controller.rb
+1
-0
app/controllers/users_controller.rb
+1
-2
test/integration/users_login_test.rb
+10
-10
No files found.
app/assets/stylesheets/custom.scss
View file @
f9e786b7
...
...
@@ -47,10 +47,10 @@ p {
}
}
.navbar
ul
{
.navbar
ul
{
list-style
:
none
;
}
li
a
{
li
a
{
color
:
#fff
;
font-size
:
18px
;
font-weight
:
bold
;
...
...
app/controllers/sessions_controller.rb
View file @
f9e786b7
class
SessionsController
<
ApplicationController
include
SessionsHelper
def
new
end
...
...
app/controllers/users_controller.rb
View file @
f9e786b7
class
UsersController
<
ApplicationController
def
show
@user
=
User
.
find
(
params
[
:id
])
end
...
...
@@ -11,7 +10,7 @@ class UsersController < ApplicationController
def
create
@user
=
User
.
new
(
user_params
)
if
@user
.
save
log_in
@user
helpers
.
log_in
@user
flash
[
:success
]
=
"Welcome to the Sample App!"
redirect_to
@user
# Handle a successful save.
...
...
test/integration/users_login_test.rb
View file @
f9e786b7
...
...
@@ -6,16 +6,16 @@ class UsersLoginTest < ActionDispatch::IntegrationTest
end
test
"login with valid email/invalid password"
do
get
login_path
assert_template
'sessions/new'
post
login_path
,
params:
{
session:
{
email:
@user
.
email
,
password:
"invalid"
}
}
assert_not
is_logged_in?
assert_template
'sessions/new'
assert_not
flash
.
empty?
get
root_path
assert
flash
.
empty?
get
login_path
assert_template
'sessions/new'
post
login_path
,
params:
{
session:
{
email:
@user
.
email
,
password:
"invalid"
}
}
assert_not
is_logged_in?
assert_template
'sessions/new'
assert_not
flash
.
empty?
get
root_path
assert
flash
.
empty?
end
test
"login with valid information followed by logout"
do
get
login_path
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment