about summary refs log tree commit diff
path: root/spec/models/account/field_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/account/field_spec.rb')
-rw-r--r--spec/models/account/field_spec.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/spec/models/account/field_spec.rb b/spec/models/account/field_spec.rb
index 0ac9769bc..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 }
 
@@ -97,7 +99,7 @@ RSpec.describe Account::Field, type: :model do
           expect(subject.verifiable?).to be false
         end
       end
-      
+
       context 'for text which is blank' do
         let(:value) { '' }
 
@@ -149,7 +151,7 @@ RSpec.describe Account::Field, type: :model do
           expect(subject.verifiable?).to be false
         end
       end
-      
+
       context 'for text which is blank' do
         let(:value) { '' }