Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Bushong <bushong1@gmail.com>2014-09-05 21:30:55 +0400
committerCharles Bushong <bushong1@gmail.com>2014-09-05 21:30:55 +0400
commit858dbd084253d2920d7007babe0471469eb459e7 (patch)
tree9ac2119b4b6b81af2c3a420628d8f20d06053f74 /features/steps/shared
parentb1411e90f81ea87ad45dee324b13881095e031ea (diff)
Updating to persist a params snippets variable
Diffstat (limited to 'features/steps/shared')
-rw-r--r--features/steps/shared/search.rb11
-rw-r--r--features/steps/shared/snippet.rb8
2 files changed, 19 insertions, 0 deletions
diff --git a/features/steps/shared/search.rb b/features/steps/shared/search.rb
new file mode 100644
index 00000000000..6c3d601763d
--- /dev/null
+++ b/features/steps/shared/search.rb
@@ -0,0 +1,11 @@
+module SharedSearch
+ include Spinach::DSL
+
+ def search_snippet_contents(query)
+ visit "/search?search=#{URI::encode(query)}&snippets=true&scope=snippet_blobs"
+ end
+
+ def search_snippet_titles(query)
+ visit "/search?search=#{URI::encode(query)}&snippets=true&scope=snippet_titles"
+ end
+end
diff --git a/features/steps/shared/snippet.rb b/features/steps/shared/snippet.rb
index 543e43196a5..5f89a3ccf65 100644
--- a/features/steps/shared/snippet.rb
+++ b/features/steps/shared/snippet.rb
@@ -18,4 +18,12 @@ module SharedSnippet
private: true,
author: current_user)
end
+ And 'I have a public many lined snippet' do
+ create(:personal_snippet,
+ title: "Many lined snippet",
+ content: "line one\nline two\nline three\nline four\nline five\nline six\nline seven\nline eight\nline nine\nline ten\nline eleven\nline twelve\nline thirteen\nline fourteen",
+ file_name: "many_lined_snippet.rb",
+ private: true,
+ author: current_user)
+ end
end