gitlab-org--gitlab-foss/spec/features/projects/members/member_leaves_project_spec.rb
2018-07-05 06:32:05 +00:00

19 lines
447 B
Ruby

require 'spec_helper'
describe 'Projects > Members > Member leaves project' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
before do
project.add_developer(user)
sign_in(user)
visit project_path(project)
end
it 'user leaves project' do
click_link 'Leave project'
expect(current_path).to eq(dashboard_projects_path)
expect(project.users.exists?(user.id)).to be_falsey
end
end