diff options
author | Valery Sizov <valery@gitlab.com> | 2014-10-08 16:44:25 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2014-10-09 17:09:53 +0300 |
commit | 47f539f5a6a930b2cfd4f9834b4d1bd5e1c180cb (patch) | |
tree | 0b528d431aa1625d92d3598f6a86ef8aa93b6491 /features/steps/snippets | |
parent | f7dc15c6bdb75a5f611c389ece3fe251f94a2d8f (diff) | |
download | gitlab-ce-47f539f5a6a930b2cfd4f9834b4d1bd5e1c180cb.tar.gz |
Snippets: public/internal/private
Diffstat (limited to 'features/steps/snippets')
-rw-r--r-- | features/steps/snippets/discover.rb | 4 | ||||
-rw-r--r-- | features/steps/snippets/user.rb | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/features/steps/snippets/discover.rb b/features/steps/snippets/discover.rb index 42bccafcc84..2667c1e3d44 100644 --- a/features/steps/snippets/discover.rb +++ b/features/steps/snippets/discover.rb @@ -7,6 +7,10 @@ class Spinach::Features::SnippetsDiscover < Spinach::FeatureSteps page.should have_content "Personal snippet one" end + step 'I should see "Personal snippet internal" in snippets' do + page.should have_content "Personal snippet internal" + end + step 'I should not see "Personal snippet private" in snippets' do page.should_not have_content "Personal snippet private" end diff --git a/features/steps/snippets/user.rb b/features/steps/snippets/user.rb index c41bc436142..866f637ab6c 100644 --- a/features/steps/snippets/user.rb +++ b/features/steps/snippets/user.rb @@ -15,6 +15,10 @@ class Spinach::Features::SnippetsUser < Spinach::FeatureSteps page.should have_content "Personal snippet private" end + step 'I should see "Personal snippet internal" in snippets' do + page.should have_content "Personal snippet internal" + end + step 'I should not see "Personal snippet one" in snippets' do page.should_not have_content "Personal snippet one" end @@ -23,6 +27,10 @@ class Spinach::Features::SnippetsUser < Spinach::FeatureSteps page.should_not have_content "Personal snippet private" end + step 'I should not see "Personal snippet internal" in snippets' do + page.should_not have_content "Personal snippet internal" + end + step 'I click "Internal" filter' do within('.nav-stacked') do click_link "Internal" @@ -35,6 +43,12 @@ class Spinach::Features::SnippetsUser < Spinach::FeatureSteps end end + step 'I click "Public" filter' do + within('.nav-stacked') do + click_link "Public" + end + end + def snippet @snippet ||= PersonalSnippet.find_by!(title: "Personal snippet one") end |