Commit 17e23b4c authored by Stan Hu's avatar Stan Hu

Add specs for group edit and deletion

parent ab2a7a80
......@@ -47,6 +47,32 @@ feature 'Group', feature: true do
end
end
describe 'Group Edit' do
let(:group) { create(:group) }
let(:path) { edit_group_path(group) }
it 'saves new settings' do
expect(group.request_access_enabled).to be_truthy
visit path
find('#group_request_access_enabled').set(false)
click_button 'Save group'
expect(page).to have_content 'successfully updated'
group.reload
expect(group.request_access_enabled).to be_falsey
end
it 'removes group' do
visit path
click_link 'Remove Group'
expect(page).to have_content "scheduled for deletion"
end
end
describe 'description' do
let(:group) { create(:group) }
let(:path) { group_path(group) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment