about summary refs log tree commit diff
path: root/spec/controllers/settings
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-28 09:12:37 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-04-28 15:12:37 +0200
commit9566893cc973671f151ceabf266d260ebba57492 (patch)
tree1f575905b552ba758a08300b96c91122e3ef6dc4 /spec/controllers/settings
parent0e2589867f2a54fe9a71c20560d90d7f77c12bd3 (diff)
More controller specs (#2561)
* Add render_views in more places

* Delegate methods from account to user with allow nil true, so that admin accounts show view renders when missing a user

* Use actual account instances in authorize follow controller spec
Diffstat (limited to 'spec/controllers/settings')
-rw-r--r--spec/controllers/settings/exports/blocked_accounts_controller_spec.rb2
-rw-r--r--spec/controllers/settings/exports/following_accounts_controller_spec.rb2
-rw-r--r--spec/controllers/settings/exports/muted_accounts_controller_spec.rb2
-rw-r--r--spec/controllers/settings/follower_domains_controller_spec.rb2
-rw-r--r--spec/controllers/settings/imports_controller_spec.rb1
-rw-r--r--spec/controllers/settings/preferences_controller_spec.rb2
-rw-r--r--spec/controllers/settings/profiles_controller_spec.rb1
7 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/settings/exports/blocked_accounts_controller_spec.rb b/spec/controllers/settings/exports/blocked_accounts_controller_spec.rb
index c815bdfec..e79a6729a 100644
--- a/spec/controllers/settings/exports/blocked_accounts_controller_spec.rb
+++ b/spec/controllers/settings/exports/blocked_accounts_controller_spec.rb
@@ -1,6 +1,8 @@
 require 'rails_helper'
 
 describe Settings::Exports::BlockedAccountsController do
+  render_views
+
   before do
     sign_in Fabricate(:user), scope: :user
   end
diff --git a/spec/controllers/settings/exports/following_accounts_controller_spec.rb b/spec/controllers/settings/exports/following_accounts_controller_spec.rb
index a7029709c..503455fea 100644
--- a/spec/controllers/settings/exports/following_accounts_controller_spec.rb
+++ b/spec/controllers/settings/exports/following_accounts_controller_spec.rb
@@ -1,6 +1,8 @@
 require 'rails_helper'
 
 describe Settings::Exports::FollowingAccountsController do
+  render_views
+
   before do
     sign_in Fabricate(:user), scope: :user
   end
diff --git a/spec/controllers/settings/exports/muted_accounts_controller_spec.rb b/spec/controllers/settings/exports/muted_accounts_controller_spec.rb
index bb52b6fcf..37c3a0fcf 100644
--- a/spec/controllers/settings/exports/muted_accounts_controller_spec.rb
+++ b/spec/controllers/settings/exports/muted_accounts_controller_spec.rb
@@ -1,6 +1,8 @@
 require 'rails_helper'
 
 describe Settings::Exports::MutedAccountsController do
+  render_views
+
   before do
     sign_in Fabricate(:user), scope: :user
   end
diff --git a/spec/controllers/settings/follower_domains_controller_spec.rb b/spec/controllers/settings/follower_domains_controller_spec.rb
index 1afdb9757..d48c3e68c 100644
--- a/spec/controllers/settings/follower_domains_controller_spec.rb
+++ b/spec/controllers/settings/follower_domains_controller_spec.rb
@@ -1,6 +1,8 @@
 require 'rails_helper'
 
 describe Settings::FollowerDomainsController do
+  render_views
+
   let(:user) { Fabricate(:user) }
 
   before do
diff --git a/spec/controllers/settings/imports_controller_spec.rb b/spec/controllers/settings/imports_controller_spec.rb
index d57350a14..8bf6aec2b 100644
--- a/spec/controllers/settings/imports_controller_spec.rb
+++ b/spec/controllers/settings/imports_controller_spec.rb
@@ -1,6 +1,7 @@
 require 'rails_helper'
 
 RSpec.describe Settings::ImportsController, type: :controller do
+  render_views
 
   before do
     sign_in Fabricate(:user), scope: :user
diff --git a/spec/controllers/settings/preferences_controller_spec.rb b/spec/controllers/settings/preferences_controller_spec.rb
index 0d3dc059a..92b626d2d 100644
--- a/spec/controllers/settings/preferences_controller_spec.rb
+++ b/spec/controllers/settings/preferences_controller_spec.rb
@@ -1,6 +1,8 @@
 require 'rails_helper'
 
 describe Settings::PreferencesController do
+  render_views
+
   let(:user) { Fabricate(:user) }
 
   before do
diff --git a/spec/controllers/settings/profiles_controller_spec.rb b/spec/controllers/settings/profiles_controller_spec.rb
index 526bbc5bc..b3d6bc47d 100644
--- a/spec/controllers/settings/profiles_controller_spec.rb
+++ b/spec/controllers/settings/profiles_controller_spec.rb
@@ -1,6 +1,7 @@
 require 'rails_helper'
 
 RSpec.describe Settings::ProfilesController, type: :controller do
+  render_views
 
   before do
     sign_in Fabricate(:user), scope: :user