about summary refs log tree commit diff
path: root/spec/controllers/settings/pictures_controller_spec.rb
blob: 2368dc55dd883a5016726c1999f9ccf81dc9e756 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

require 'rails_helper'

describe Settings::PicturesController do
  render_views

  let!(:user) { Fabricate(:user) }

  before do
    sign_in user, scope: :user
  end

  describe 'DELETE #destroy' do
    context 'with invalid picture id' do
      it 'returns http bad request' do
        delete :destroy, params: { id: 'invalid' }
        expect(response).to have_http_status(400)
      end
    end
  end
end