diff options
author | Steven Thonus <steven@ln2.nl> | 2014-01-27 22:34:05 +0100 |
---|---|---|
committer | Steven Thonus <steven@ln2.nl> | 2014-01-28 08:38:00 +0100 |
commit | 251df827a5308d483a95242970569075ab655703 (patch) | |
tree | 00872b5ebaf24ca6c4e964172f59a8380c55d096 /features/steps/group | |
parent | 5221dbfee74e48f379bc06b2848a64243a76270c (diff) | |
download | gitlab-ce-251df827a5308d483a95242970569075ab655703.tar.gz |
added group avatars
Diffstat (limited to 'features/steps/group')
-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 |