debian-mirror-gitlab/features/steps/snippets/public_snippets.rb

26 lines
680 B
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
class Spinach::Features::PublicSnippets < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedSnippet
step 'I should see snippet "Personal snippet one"' do
2015-09-11 14:41:01 +05:30
expect(page).to have_no_xpath("//i[@class='public-snippet']")
2015-04-26 12:48:37 +05:30
end
step 'I should see raw snippet "Personal snippet one"' do
2015-09-11 14:41:01 +05:30
expect(page).to have_text(snippet.content)
2015-04-26 12:48:37 +05:30
end
step 'I visit snippet page "Personal snippet one"' do
visit snippet_path(snippet)
end
step 'I visit snippet raw page "Personal snippet one"' do
visit raw_snippet_path(snippet)
end
def snippet
@snippet ||= PersonalSnippet.find_by!(title: "Personal snippet one")
end
end