diff options
author | Stan Hu <stanhu@gmail.com> | 2016-10-14 10:06:44 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-10-14 10:06:44 +0300 |
commit | 17e23b4c9c141bdbdcde4efec0bbcfdd544da8bd (patch) | |
tree | 94058d37bbea3470727a342cc2ead1eece88bf1c | |
parent | ab2a7a806a698d6638bb8b3f2ecc694f265fe65e (diff) |
Add specs for group edit and deletion
-rw-r--r-- | spec/features/groups_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb index c54ec2563ad..3f908294cbb 100644 --- a/spec/features/groups_spec.rb +++ b/spec/features/groups_spec.rb @@ -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) } |