diff options
Diffstat (limited to 'features/steps')
| -rw-r--r-- | features/steps/group/group.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/features/steps/group/group.rb b/features/steps/group/group.rb index 15d7c46c694..0b0f401c3ba 100644 --- a/features/steps/group/group.rb +++ b/features/steps/group/group.rb @@ -98,6 +98,40 @@ class Groups < Spinach::FeatureSteps end end + step 'I change my group avatar' do + attach_file(:group_avatar, File.join(Rails.root, 'public', 'gitlab_logo.png')) + click_button "Save group" + @group.reload + end + + step 'I should see new group avatar' do + @group.avatar.should be_instance_of AttachmentUploader + @group.avatar.url.should == "/uploads/group/avatar/#{ @group.id }/gitlab_logo.png" + end + + step 'I should see the "Remove avatar" button' do + page.should have_link("Remove avatar") + end + + step 'I have an group avatar' do + attach_file(:group_avatar, File.join(Rails.root, 'public', 'gitlab_logo.png')) + click_button "Save group" + @group.reload + end + + step 'I remove my group avatar' do + click_link "Remove avatar" + @group.reload + end + + step 'I should not see my group avatar' do + @group.avatar?.should be_false + end + + step 'I should not see the "Remove avatar" button' do + page.should_not have_link("Remove avatar") + end + protected def current_group |
