gitlabhq/spec/features/admin/admin_projects_spec.rb

35 lines
675 B
Ruby
Raw Normal View History

2011-10-08 23:36:38 +02:00
require 'spec_helper'
describe "Admin::Projects" do
before do
2012-11-23 20:31:09 +01:00
@project = create(:project)
2011-10-08 23:36:38 +02:00
login_as :admin
end
describe "GET /admin/projects" do
before do
2011-10-08 23:36:38 +02:00
visit admin_projects_path
end
it "should be ok" do
current_path.should == admin_projects_path
end
it "should have projects list" do
2011-10-08 23:36:38 +02:00
page.should have_content(@project.name)
end
end
describe "GET /admin/projects/:id" do
before do
2011-10-08 23:36:38 +02:00
visit admin_projects_path
2011-11-22 08:55:01 +01:00
click_link "#{@project.name}"
2011-10-08 23:36:38 +02:00
end
it "should have project info" do
2012-11-23 20:31:09 +01:00
page.should have_content(@project.path)
2011-10-08 23:36:38 +02:00
page.should have_content(@project.name)
end
end
end