diff options
Diffstat (limited to 'spec/services/users/block_service_spec.rb')
-rw-r--r-- | spec/services/users/block_service_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/users/block_service_spec.rb b/spec/services/users/block_service_spec.rb index e170a5494aa..45a5b1e5100 100644 --- a/spec/services/users/block_service_spec.rb +++ b/spec/services/users/block_service_spec.rb @@ -34,5 +34,15 @@ RSpec.describe Users::BlockService do expect { operation }.not_to change { user.state } end end + + context 'when internal user' do + let(:user) { create(:user, :bot) } + + it 'returns error result' do + expect(operation[:status]).to eq(:error) + expect(operation[:message]).to eq('An internal user cannot be blocked') + expect(operation[:http_status]).to eq(403) + end + end end end |