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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
6e032f66
Commit
6e032f66
authored
Dec 03, 2019
by
Francisco Javier López
Committed by
Denys Mishunov
Dec 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed feature spec
parent
cf2e06aa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
spec/features/snippets_spec.rb
spec/features/snippets_spec.rb
+16
-19
No files found.
spec/features/snippets_spec.rb
View file @
6e032f66
...
...
@@ -6,41 +6,38 @@ describe 'Snippets' do
context
'when the project has snippets'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let!
(
:snippets
)
{
create_list
(
:project_snippet
,
2
,
:public
,
author:
project
.
owner
,
project:
project
)
}
before
do
allow
(
Snippet
).
to
receive
(
:default_per_page
).
and_return
(
1
)
visit
snippets_path
(
username:
project
.
owner
.
username
)
visit
project_snippets_path
(
project
)
end
it_behaves_like
'paginated snippets'
end
describe
'
when feature flag is enabled
'
do
let
(
:user
)
{
create
(
:user
)
}
let
!
(
:snippets
)
{
create
(
:personal_snippet
,
:public
,
author:
user
)
}
describe
'
rendering engine
'
do
let
_it_be
(
:snippet
)
{
create
(
:personal_snippet
,
:public
)
}
let
(
:snippets_vue_feature_flag_enabled
)
{
true
}
before
do
stub_feature_flags
(
snippets_vue:
true
)
visit
snippet_path
(
1
)
stub_feature_flags
(
snippets_vue:
snippets_vue_feature_flag_enabled
)
visit
snippet_path
(
snippet
)
end
it
'
should render
Vue application'
do
it
'
renders
Vue application'
do
expect
(
page
).
to
have_selector
(
'#js-snippet-view'
)
expect
(
page
).
not_to
have_selector
(
'.personal-snippets'
)
end
end
describe
'when feature flag is disabled'
do
let
(
:user
)
{
create
(
:user
)
}
let!
(
:snippets
)
{
create
(
:personal_snippet
,
:public
,
author:
user
)
}
context
'when feature flag is disabled'
do
let
(
:snippets_vue_feature_flag_enabled
)
{
false
}
before
do
stub_feature_flags
(
snippets_vue:
false
)
visit
snippet_path
(
1
)
end
it
'should render HAML application and not Vue'
do
it
'renders HAML application and not Vue'
do
expect
(
page
).
not_to
have_selector
(
'#js-snippet-view'
)
expect
(
page
).
to
have_selector
(
'.personal-snippets'
)
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