Sha256: 2327273608d575ef011e0204b38631ad56dd863a4b11819a7221d86ca147b120
Contents?: true
Size: 1.18 KB
Versions: 19
Compression:
Stored size: 1.18 KB
Contents
require 'rails_helper' describe MessageTrain::BoxesController do include_context 'loaded site' include ControllerMacros routes { MessageTrain::Engine.routes } describe 'GET #show' do describe 'when neither sending nor receiving is allowed' do before do login_user third_user get :show, division: 'in', collective_id: 'groups:first-group' end it_should_behave_like( 'a redirect with error', '/', 'Access to that box denied' ) end describe 'when only sending is allowed' do before do login_user first_user get :show, division: 'in', collective_id: 'groups:first-group' end it_should_behave_like( 'a redirect with error', '/collectives/groups:first-group/box/sent', 'Access to that box denied' ) end describe 'when only receiving is allowed' do before do login_user first_user get :show, division: 'sent', collective_id: 'groups:membered-group' end it_should_behave_like( 'a redirect with error', '/collectives/groups:membered-group/box/in', 'Access to that box denied' ) end end end
Version data entries
19 entries across 19 versions & 1 rubygems