2016-10-04 08:52:08 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "Guest navigation menu" do
|
2016-10-13 03:38:03 -04:00
|
|
|
let(:project) { create(:empty_project, :private, public_builds: false) }
|
|
|
|
let(:guest) { create(:user) }
|
2016-10-04 08:52:08 -04:00
|
|
|
|
|
|
|
before do
|
|
|
|
project.team << [guest, :guest]
|
|
|
|
|
|
|
|
login_as(guest)
|
|
|
|
end
|
|
|
|
|
|
|
|
it "shows allowed tabs only" do
|
|
|
|
visit namespace_project_path(project.namespace, project)
|
|
|
|
|
|
|
|
within(".nav-links") do
|
|
|
|
expect(page).to have_content 'Project'
|
|
|
|
expect(page).to have_content 'Activity'
|
|
|
|
expect(page).to have_content 'Issues'
|
|
|
|
expect(page).to have_content 'Wiki'
|
|
|
|
|
|
|
|
expect(page).not_to have_content 'Repository'
|
|
|
|
expect(page).not_to have_content 'Pipelines'
|
|
|
|
expect(page).not_to have_content 'Graphs'
|
|
|
|
expect(page).not_to have_content 'Merge Requests'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|