Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
41dadc37
Commit
41dadc37
authored
Jun 16, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Preferences feature spec
parent
a28686d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
spec/features/profiles/preferences_spec.rb
spec/features/profiles/preferences_spec.rb
+8
-10
No files found.
spec/features/profiles/preferences_spec.rb
View file @
41dadc37
require
'spec_helper'
require
'spec_helper'
describe
'Profile > Preferences'
do
describe
'Profile > Preferences'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
before
do
login_as
(
user
)
login_as
(
:
user
)
visit
profile_preferences_path
visit
profile_preferences_path
end
end
...
@@ -13,27 +11,27 @@ describe 'Profile > Preferences' do
...
@@ -13,27 +11,27 @@ describe 'Profile > Preferences' do
let
(
:theme_5_class
)
{
Gitlab
::
Theme
.
css_class_by_id
(
5
)
}
let
(
:theme_5_class
)
{
Gitlab
::
Theme
.
css_class_by_id
(
5
)
}
it
'creates a flash message'
do
it
'creates a flash message'
do
choose
"user_theme_id_
#{
theme
.
id
}
"
choose
'user_theme_id_5'
expect_preferences_saved_message
expect_preferences_saved_message
end
end
it
'updates their preference'
do
it
'updates their preference'
do
choose
"user_theme_id_
#{
theme
.
id
}
"
choose
'user_theme_id_5'
allowing_for_delay
do
allowing_for_delay
do
visit
page
.
current_path
visit
page
.
current_path
expect
(
page
).
to
have_checked_field
(
"user_theme_id_
#{
theme
.
id
}
"
)
expect
(
page
).
to
have_checked_field
(
"user_theme_id_
5
"
)
end
end
end
end
it
'reflects the changes immediately'
do
it
'reflects the changes immediately'
do
expect
(
page
).
to
have_selector
(
"body.
#{
default
.
css
_class
}
"
)
expect
(
page
).
to
have_selector
(
"body.
#{
default_class
}
"
)
choose
"user_theme_id_
#{
theme
.
id
}
"
choose
'user_theme_id_5'
expect
(
page
).
not_to
have_selector
(
"body.
#{
default
.
css
_class
}
"
)
expect
(
page
).
not_to
have_selector
(
"body.
#{
default_class
}
"
)
expect
(
page
).
to
have_selector
(
"body.
#{
theme
.
css
_class
}
"
)
expect
(
page
).
to
have_selector
(
"body.
#{
theme
_5
_class
}
"
)
end
end
end
end
...
...
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