2011-10-08 21:36:38 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2014-04-12 08:56:37 +00:00
|
|
|
describe "Admin::Projects", feature: true do
|
2011-10-26 13:46:25 +00:00
|
|
|
before do
|
2012-11-23 19:31:09 +00:00
|
|
|
@project = create(:project)
|
2011-10-08 21:36:38 +00:00
|
|
|
login_as :admin
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "GET /admin/projects" do
|
2011-10-26 13:46:25 +00:00
|
|
|
before do
|
2015-01-24 18:02:58 +00:00
|
|
|
visit admin_namespaces_projects_path
|
2011-10-08 21:36:38 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it "should be ok" do
|
2015-01-24 18:02:58 +00:00
|
|
|
expect(current_path).to eq(admin_namespaces_projects_path)
|
2011-10-08 21:36:38 +00:00
|
|
|
end
|
|
|
|
|
2011-10-26 13:46:25 +00:00
|
|
|
it "should have projects list" do
|
2015-02-12 18:17:35 +00:00
|
|
|
expect(page).to have_content(@project.name)
|
2011-10-08 21:36:38 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-10-26 13:46:25 +00:00
|
|
|
describe "GET /admin/projects/:id" do
|
|
|
|
before do
|
2015-01-24 18:02:58 +00:00
|
|
|
visit admin_namespaces_projects_path
|
2011-11-22 07:55:01 +00:00
|
|
|
click_link "#{@project.name}"
|
2011-10-08 21:36:38 +00:00
|
|
|
end
|
|
|
|
|
2011-10-26 13:46:25 +00:00
|
|
|
it "should have project info" do
|
2015-02-12 18:17:35 +00:00
|
|
|
expect(page).to have_content(@project.path)
|
|
|
|
expect(page).to have_content(@project.name)
|
2011-10-08 21:36:38 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|