Commit 4de1db11 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Public area spinach tests

parent dd8f090b
Feature: Public Projects Feature
Background:
Given public project "Community"
And private project "Enterprise"
Scenario: I visit public area
When I visit the public projects area
Then I should see project "Community"
And I should not see project "Enterprise"
Scenario: I visit public project page
When I visit public page for "Community" project
Then I should see public project details
And I should see project readme
class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
include SharedPaths
step 'I should see project "Community"' do
page.should have_content "Community"
end
step 'I should not see project "Enterprise"' do
page.should_not have_content "Enterprise"
end
step 'I should see public project details' do
page.should have_content '32 branches'
page.should have_content '16 tags'
end
step 'I should see project readme' do
page.should have_content 'README.md'
end
step 'public project "Community"' do
create :project_with_code, name: 'Community', public: true
end
step 'private project "Enterprise"' do
create :project, name: 'Enterprise'
end
private
def project
@project ||= Project.find_by_name("Community")
end
end
...@@ -275,6 +275,10 @@ module SharedPaths ...@@ -275,6 +275,10 @@ module SharedPaths
visit public_root_path visit public_root_path
end end
step 'I visit public page for "Community" project' do
visit public_project_path(Project.find_by_name("Community"))
end
# ---------------------------------------- # ----------------------------------------
# Snippets # Snippets
# ---------------------------------------- # ----------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment