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
4561a09c
Commit
4561a09c
authored
Sep 05, 2014
by
Charles Bushong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning for the hound
parent
858dbd08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
15 deletions
+30
-15
features/steps/shared/snippet.rb
features/steps/shared/snippet.rb
+18
-3
features/steps/snippet_search.rb
features/steps/snippet_search.rb
+12
-12
No files found.
features/steps/shared/snippet.rb
View file @
4561a09c
...
@@ -20,9 +20,24 @@ module SharedSnippet
...
@@ -20,9 +20,24 @@ module SharedSnippet
end
end
And
'I have a public many lined snippet'
do
And
'I have a public many lined snippet'
do
create
(
:personal_snippet
,
create
(
:personal_snippet
,
title:
"Many lined snippet"
,
title:
'Many lined snippet'
,
content:
"line one
\n
line two
\n
line three
\n
line four
\n
line five
\n
line six
\n
line seven
\n
line eight
\n
line nine
\n
line ten
\n
line eleven
\n
line twelve
\n
line thirteen
\n
line fourteen"
,
content:
<<-
END
.
gsub
(
/^\s+\|/
,
''
),
file_name:
"many_lined_snippet.rb"
,
|line one
|line two
|line three
|line four
|line five
|line six
|line seven
|line eight
|line nine
|line ten
|line eleven
|line twelve
|line thirteen
|line fourteen
END
file_name:
'many_lined_snippet.rb'
,
private:
true
,
private:
true
,
author:
current_user
)
author:
current_user
)
end
end
...
...
features/steps/snippet_search.rb
View file @
4561a09c
...
@@ -6,51 +6,51 @@ class Spinach::Features::SnippetSearch < Spinach::FeatureSteps
...
@@ -6,51 +6,51 @@ class Spinach::Features::SnippetSearch < Spinach::FeatureSteps
include
SharedSearch
include
SharedSearch
step
'I search for "snippet" in snippet titles'
do
step
'I search for "snippet" in snippet titles'
do
search_snippet_titles
"snippet"
search_snippet_titles
'snippet'
end
end
step
'I search for "snippet private" in snippet titles'
do
step
'I search for "snippet private" in snippet titles'
do
search_snippet_titles
"snippet private"
search_snippet_titles
'snippet private'
end
end
step
'I search for "line seven" in snippet contents'
do
step
'I search for "line seven" in snippet contents'
do
search_snippet_contents
"line seven"
search_snippet_contents
'line seven'
end
end
step
'I should see "line seven" in results'
do
step
'I should see "line seven" in results'
do
page
.
should
have_content
"line seven"
page
.
should
have_content
'line seven'
end
end
step
'I should see "line four" in results'
do
step
'I should see "line four" in results'
do
page
.
should
have_content
"line four"
page
.
should
have_content
'line four'
end
end
step
'I should see "line ten" in results'
do
step
'I should see "line ten" in results'
do
page
.
should
have_content
"line ten"
page
.
should
have_content
'line ten'
end
end
step
'I should not see "line eleven" in results'
do
step
'I should not see "line eleven" in results'
do
page
.
should_not
have_content
"line eleven"
page
.
should_not
have_content
'line eleven'
end
end
step
'I should not see "line three" in results'
do
step
'I should not see "line three" in results'
do
page
.
should_not
have_content
"line three"
page
.
should_not
have_content
'line three'
end
end
Then
'I should see "Personal snippet one" in results'
do
Then
'I should see "Personal snippet one" in results'
do
page
.
should
have_content
"Personal snippet one"
page
.
should
have_content
'Personal snippet one'
end
end
And
'I should see "Personal snippet private" in results'
do
And
'I should see "Personal snippet private" in results'
do
page
.
should
have_content
"Personal snippet private"
page
.
should
have_content
'Personal snippet private'
end
end
Then
'I should not see "Personal snippet one" in results'
do
Then
'I should not see "Personal snippet one" in results'
do
page
.
should_not
have_content
"Personal snippet one"
page
.
should_not
have_content
'Personal snippet one'
end
end
And
'I should not see "Personal snippet private" in results'
do
And
'I should not see "Personal snippet private" in results'
do
page
.
should_not
have_content
"Personal snippet private"
page
.
should_not
have_content
'Personal snippet private'
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