anonymous_user_sees_members_spec.rb 602 Bytes
Newer Older
1 2
require 'spec_helper'

3
feature 'Projects > Members > Anonymous user sees members' do
4 5
  let(:user) { create(:user) }
  let(:group) { create(:group, :public) }
6
  let(:project) { create(:project, :public) }
7 8 9 10 11 12 13

  background do
    project.team << [user, :master]
    create(:project_group_link, project: project, group: group)
  end

  scenario "anonymous user visits the project's members page and sees the list of members" do
14
    visit project_project_members_path(project)
15 16

    expect(current_path).to eq(
17
      project_project_members_path(project))
18 19 20
    expect(page).to have_content(user.name)
  end
end