about summary refs log tree commit diff
path: root/spec/policies/status_policy_spec.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-04-09 11:25:30 +0200
committerGitHub <noreply@github.com>2023-04-09 11:25:30 +0200
commitff168ef2024626f37fa776fde5739dcd58ecb9f2 (patch)
tree5b638b2e5a43445a75133a9b510bff00d44ea986 /spec/policies/status_policy_spec.rb
parent29a91b871eb4fb375baa3701e29cfb35f884bb98 (diff)
Fix most rubocop issues (#2165)
* Run rubocop --autocorrect on app/, config/ and lib/, also manually fix some remaining style issues

* Run rubocop --autocorrect-all on db/

* Run rubocop --autocorrect-all on `spec/` and fix remaining issues
Diffstat (limited to 'spec/policies/status_policy_spec.rb')
-rw-r--r--spec/policies/status_policy_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/policies/status_policy_spec.rb b/spec/policies/status_policy_spec.rb
index 9a30aef3c..38b9c4fdb 100644
--- a/spec/policies/status_policy_spec.rb
+++ b/spec/policies/status_policy_spec.rb
@@ -83,14 +83,14 @@ RSpec.describe StatusPolicy, type: :model do
     end
 
     it 'denies access when local-only and the viewer is not logged in' do
-      allow(status).to receive(:local_only?) { true }
+      allow(status).to receive(:local_only?).and_return(true)
 
       expect(subject).to_not permit(nil, status)
     end
 
     it 'denies access when local-only and the viewer is from another domain' do
       viewer = Fabricate(:account, domain: 'remote-domain')
-      allow(status).to receive(:local_only?) { true }
+      allow(status).to receive(:local_only?).and_return(true)
       expect(subject).to_not permit(viewer, status)
     end
   end