about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authoraus-social <42644106+aus-social@users.noreply.github.com>2018-10-05 01:38:04 +1000
committerEugen Rochko <eugen@zeonfederated.com>2018-10-04 17:38:04 +0200
commit0a4739c7324a96cee148373ccc7b57b9c7097b42 (patch)
tree8c6681e31fdab9b090c7a33105171460e31d5217 /spec
parenta46ab86adfc9e4ea182af9a555237f17071e194c (diff)
lint pass 2 (#8878)
* Code quality pass

* Typofix

* Update applications_controller_spec.rb

* Update applications_controller_spec.rb
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/admin/statuses_controller_spec.rb2
-rw-r--r--spec/controllers/concerns/export_controller_concern_spec.rb1
-rw-r--r--spec/controllers/settings/applications_controller_spec.rb64
-rw-r--r--spec/models/account_spec.rb2
-rw-r--r--spec/models/user_spec.rb2
-rw-r--r--spec/views/stream_entries/show.html.haml_spec.rb2
6 files changed, 37 insertions, 36 deletions
diff --git a/spec/controllers/admin/statuses_controller_spec.rb b/spec/controllers/admin/statuses_controller_spec.rb
index 6afcc1442..1a08c10b7 100644
--- a/spec/controllers/admin/statuses_controller_spec.rb
+++ b/spec/controllers/admin/statuses_controller_spec.rb
@@ -24,7 +24,7 @@ describe Admin::StatusesController do
     end
 
     it 'returns http success with media' do
-      get :index, params: { account_id: account.id , media: true }
+      get :index, params: { account_id: account.id, media: true }
 
       statuses = assigns(:statuses).to_a
       expect(statuses.size).to eq 1
diff --git a/spec/controllers/concerns/export_controller_concern_spec.rb b/spec/controllers/concerns/export_controller_concern_spec.rb
index 6a13db69d..e5861c801 100644
--- a/spec/controllers/concerns/export_controller_concern_spec.rb
+++ b/spec/controllers/concerns/export_controller_concern_spec.rb
@@ -8,6 +8,7 @@ describe ApplicationController, type: :controller do
     def index
       send_export_file
     end
+
     def export_data
       @export.account.username
     end
diff --git a/spec/controllers/settings/applications_controller_spec.rb b/spec/controllers/settings/applications_controller_spec.rb
index fd4b10071..29c278148 100644
--- a/spec/controllers/settings/applications_controller_spec.rb
+++ b/spec/controllers/settings/applications_controller_spec.rb
@@ -47,13 +47,13 @@ describe Settings::ApplicationsController do
     context 'success (passed scopes as a String)' do
       def call_create
         post :create, params: {
-               doorkeeper_application: {
-                 name: 'My New App',
-                 redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
-                 website: 'http://google.com',
-                 scopes: 'read write follow'
-               }
-             }
+          doorkeeper_application: {
+            name: 'My New App',
+            redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
+            website: 'http://google.com',
+            scopes: 'read write follow'
+          }
+        }
         response
       end
 
@@ -69,13 +69,13 @@ describe Settings::ApplicationsController do
     context 'success (passed scopes as an Array)' do
       def call_create
         post :create, params: {
-               doorkeeper_application: {
-                 name: 'My New App',
-                 redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
-                 website: 'http://google.com',
-                 scopes: [ 'read', 'write', 'follow' ]
-               }
-             }
+          doorkeeper_application: {
+            name: 'My New App',
+            redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
+            website: 'http://google.com',
+            scopes: [ 'read', 'write', 'follow' ]
+          }
+        }
         response
       end
 
@@ -91,13 +91,13 @@ describe Settings::ApplicationsController do
     context 'failure' do
       before do
         post :create, params: {
-               doorkeeper_application: {
-                 name: '',
-                 redirect_uri: '',
-                 website: '',
-                 scopes: []
-               }
-             }
+          doorkeeper_application: {
+            name: '',
+            redirect_uri: '',
+            website: '',
+            scopes: []
+          }
+        }
       end
 
       it 'returns http success' do
@@ -120,9 +120,9 @@ describe Settings::ApplicationsController do
 
       def call_update
         patch :update, params: {
-                id: app.id,
-                doorkeeper_application: opts
-              }
+          id: app.id,
+          doorkeeper_application: opts
+        }
         response
       end
 
@@ -139,14 +139,14 @@ describe Settings::ApplicationsController do
     context 'failure' do
       before do
         patch :update, params: {
-                id: app.id,
-                doorkeeper_application: {
-                  name: '',
-                  redirect_uri: '',
-                  website: '',
-                  scopes: []
-                }
-              }
+          id: app.id,
+          doorkeeper_application: {
+            name: '',
+            redirect_uri: '',
+            website: '',
+            scopes: []
+          }
+        }
       end
 
       it 'returns http success' do
diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb
index ae19251ae..60d13d32e 100644
--- a/spec/models/account_spec.rb
+++ b/spec/models/account_spec.rb
@@ -275,7 +275,7 @@ RSpec.describe Account, type: :model do
 
     subject { Fabricate(:account) }
 
-    context 'when the status is a reblog of another status'do
+    context 'when the status is a reblog of another status' do
       let(:original_reblog) do
         author = Fabricate(:account, username: 'original_reblogger')
         Fabricate(:status, reblog: original_status, account: author)
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 015e90edc..42198cb4d 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -254,7 +254,7 @@ RSpec.describe User, type: :model do
 
   it_behaves_like 'Settings-extended' do
     def create!
-      User.create!(account: Fabricate(:account), email: 'foo@mastodon.space', password: 'abcd1234' )
+      User.create!(account: Fabricate(:account), email: 'foo@mastodon.space', password: 'abcd1234')
     end
 
     def fabricate
diff --git a/spec/views/stream_entries/show.html.haml_spec.rb b/spec/views/stream_entries/show.html.haml_spec.rb
index e08419596..93f0adb99 100644
--- a/spec/views/stream_entries/show.html.haml_spec.rb
+++ b/spec/views/stream_entries/show.html.haml_spec.rb
@@ -49,7 +49,7 @@ describe 'stream_entries/show.html.haml', without_verify_partial_doubles: true d
     assign(:stream_entry, reply.stream_entry)
     assign(:account, alice)
     assign(:type, reply.stream_entry.activity_type.downcase)
-    assign(:ancestors, reply.stream_entry.activity.ancestors(1, bob) )
+    assign(:ancestors, reply.stream_entry.activity.ancestors(1, bob))
     assign(:descendant_threads, [{ statuses: reply.stream_entry.activity.descendants(1) }])
 
     render