about summary refs log tree commit diff
path: root/spec/models/account
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-02-26 15:06:03 +0100
committerGitHub <noreply@github.com>2023-02-26 15:06:03 +0100
commit6a4be4e96677eb3e1303ddcab8f8b4bea7298453 (patch)
tree52627bf6dd64b0a33e280442b2de60b4e802a544 /spec/models/account
parent45087c1092143e95dfcc85b6c9abc5c6c0a0a5c2 (diff)
parentb91756fd4d475edff890e460c44b3a7245ad51e2 (diff)
Merge pull request #2119 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/models/account')
-rw-r--r--spec/models/account/field_spec.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/models/account/field_spec.rb b/spec/models/account/field_spec.rb
index 40bbee025..6745fbb26 100644
--- a/spec/models/account/field_spec.rb
+++ b/spec/models/account/field_spec.rb
@@ -1,11 +1,13 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 RSpec.describe Account::Field, type: :model do
   describe '#verified?' do
-    let(:account) { double('Account', local?: true) }
-
     subject { described_class.new(account, 'name' => 'Foo', 'value' => 'Bar', 'verified_at' => verified_at) }
 
+    let(:account) { double('Account', local?: true) }
+
     context 'when verified_at is set' do
       let(:verified_at) { Time.now.utc.iso8601 }
 
@@ -24,11 +26,11 @@ RSpec.describe Account::Field, type: :model do
   end
 
   describe '#mark_verified!' do
+    subject { described_class.new(account, original_hash) }
+
     let(:account) { double('Account', local?: true) }
     let(:original_hash) { { 'name' => 'Foo', 'value' => 'Bar' } }
 
-    subject { described_class.new(account, original_hash) }
-
     before do
       subject.mark_verified!
     end
@@ -43,10 +45,10 @@ RSpec.describe Account::Field, type: :model do
   end
 
   describe '#verifiable?' do
-    let(:account) { double('Account', local?: local) }
-
     subject { described_class.new(account, 'name' => 'Foo', 'value' => value) }
 
+    let(:account) { double('Account', local?: local) }
+
     context 'for local accounts' do
       let(:local) { true }