1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/spec/requests/staff/sidekiq/show_spec.rb

30 lines
591 B
Ruby
Raw Normal View History

2018-12-11 22:08:42 -05:00
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'GET /staff/sidekiq' do
before do
@new_user_session_url = new_user_session_url
sign_in current_account.user if current_account&.user
get '/staff/sidekiq'
end
2018-12-12 23:18:44 -05:00
for_account_types nil, :guest do
2018-12-11 22:08:42 -05:00
specify do
expect(response).to redirect_to @new_user_session_url
end
end
2018-12-12 23:18:44 -05:00
for_account_types :usual do
2018-12-11 22:08:42 -05:00
specify do
expect(response).to redirect_to root_url
end
end
2018-12-12 23:18:44 -05:00
for_account_types :superuser do
2018-12-11 22:08:42 -05:00
specify do
expect(response).to have_http_status :ok
end
end
end