summaryrefslogtreecommitdiff
path: root/features/steps/admin/projects.rb
blob: b410b23851b2af91b09b1736e4b50d28eee4d18f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class AdminProjects < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedPaths
  include SharedAdmin

  And 'I should see all projects' do
    Project.all.each do |p|
      page.should have_content p.name_with_namespace
    end
  end

  And 'I click on first project' do
    click_link Project.first.name_with_namespace
  end

  Then 'I should see project details' do
    project = Project.first
    current_path.should == admin_project_path(project)
    page.should have_content(project.name_with_namespace)
    page.should have_content(project.creator.name)
  end
end