gitlab-org--gitlab-foss/spec/controllers/profiles/avatars_controller_spec.rb
Rémy Coutable 1714883107 Revert "Merge branch 'avatar-cropping' into 'master' "
This reverts commit 01160fc061, reversing
changes made to 4bff9daf8b.
2016-03-15 14:55:40 +01:00

17 lines
433 B
Ruby

require 'spec_helper'
describe Profiles::AvatarsController do
let(:user) { create(:user, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png")) }
before do
sign_in(user)
controller.instance_variable_set(:@user, user)
end
it 'destroy should remove avatar from DB' do
delete :destroy
@user = assigns(:user)
expect(@user.avatar.present?).to be_falsey
expect(@user).to be_valid
end
end