require 'rails_helper'

RSpec.describe ErrorsController do
  let(:user) { create(:user) }
  context 'not found' do
    it 'returns status 404' do
      establish_current_user(user)
      get :not_found
      expect(response.status).to eq(404)
    end

    it 'returns status 404 even if a weird format is requested' do
      establish_current_user(user)
      get :not_found, format: :fooblybar
      expect(response.status).to eq(404)
    end
  end
end
