diff options
Diffstat (limited to 'features/steps/project_browse_branches.rb')
-rw-r--r-- | features/steps/project_browse_branches.rb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/features/steps/project_browse_branches.rb b/features/steps/project_browse_branches.rb new file mode 100644 index 00000000000..9fb2e59ddff --- /dev/null +++ b/features/steps/project_browse_branches.rb @@ -0,0 +1,44 @@ +class ProjectBrowseBranches < Spinach::FeatureSteps + Then 'I should see "Shop" recent branches list' do + page.should have_content "Branches" + page.should have_content "master" + end + + Given 'I click link "All"' do + click_link "All" + end + + Then 'I should see "Shop" all branches list' do + page.should have_content "Branches" + page.should have_content "master" + end + + Given 'I click link "Protected"' do + click_link "Protected" + end + + Then 'I should see "Shop" protected branches list' do + within "table" do + page.should have_content "stable" + page.should_not have_content "master" + end + end + + Given 'I sign in as a user' do + login_as :user + end + + And 'I own project "Shop"' do + @project = Factory :project, :name => "Shop" + @project.add_access(@user, :admin) + end + + And 'project "Shop" has protected branches' do + project = Project.find_by_name("Shop") + project.protected_branches.create(:name => "stable") + end + + Given 'I visit project branches page' do + visit branches_project_repository_path(@project) + end +end |