2014-09-02 18:07:02 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "Admin::Projects", feature: true do
|
|
|
|
before do
|
|
|
|
@project = create(:project)
|
|
|
|
login_as :admin
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "GET /admin/projects" do
|
|
|
|
before do
|
2015-04-26 12:48:37 +05:30
|
|
|
visit admin_namespaces_projects_path
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
it "is ok" do
|
2015-04-26 12:48:37 +05:30
|
|
|
expect(current_path).to eq(admin_namespaces_projects_path)
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
it "has projects list" do
|
2015-04-26 12:48:37 +05:30
|
|
|
expect(page).to have_content(@project.name)
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "GET /admin/projects/:id" do
|
|
|
|
before do
|
2015-04-26 12:48:37 +05:30
|
|
|
visit admin_namespaces_projects_path
|
2014-09-02 18:07:02 +05:30
|
|
|
click_link "#{@project.name}"
|
|
|
|
end
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
it "has project info" do
|
2015-04-26 12:48:37 +05:30
|
|
|
expect(page).to have_content(@project.path)
|
|
|
|
expect(page).to have_content(@project.name)
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|