about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-19 12:13:47 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-19 12:13:47 +0100
commitd4892ace62cd5d73d7e4958bf98fe37244811c7f (patch)
treeb80c1f506d6a27f1909ba665d02d421d50729c67
parent66a2107527485f01f54f0899fcb913f05053cd0e (diff)
Adding more test stubs
-rw-r--r--app/services/setup_local_account_service.rb14
-rw-r--r--spec/controllers/api/accounts_controller_spec.rb22
-rw-r--r--spec/controllers/api/follows_controller_spec.rb4
-rw-r--r--spec/controllers/api/statuses_controller_spec.rb22
-rw-r--r--spec/controllers/oauth/applications_controller_spec.rb6
-rw-r--r--spec/models/account_spec.rb12
-rw-r--r--spec/models/feed_spec.rb7
-rw-r--r--spec/models/status_spec.rb8
-rw-r--r--spec/services/fan_out_on_write_service_spec.rb5
-rw-r--r--spec/services/favourite_service_spec.rb5
-rw-r--r--spec/services/precompute_feed_service_spec.rb5
-rw-r--r--spec/services/setup_local_account_service_spec.rb8
-rw-r--r--spec/services/update_remote_profile_service_spec.rb5
13 files changed, 100 insertions, 23 deletions
diff --git a/app/services/setup_local_account_service.rb b/app/services/setup_local_account_service.rb
deleted file mode 100644
index 16de87e50..000000000
--- a/app/services/setup_local_account_service.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class SetupLocalAccountService < BaseService
-  # Setup an account for a new user instance by generating
-  # an RSA key pair and a profile
-  # @param [User] user Unsaved user instance
-  # @param [String] username
-  def call(user, username)
-    user.build_account
-
-    user.account.username = username
-    user.account.domain   = nil
-
-    user.save!
-  end
-end
diff --git a/spec/controllers/api/accounts_controller_spec.rb b/spec/controllers/api/accounts_controller_spec.rb
index b409611ce..915a40a8a 100644
--- a/spec/controllers/api/accounts_controller_spec.rb
+++ b/spec/controllers/api/accounts_controller_spec.rb
@@ -1,5 +1,27 @@
 require 'rails_helper'
 
 RSpec.describe Api::AccountsController, type: :controller do
+  describe 'GET #show' do
+    it 'returns http success'
+  end
 
+  describe 'GET #statuses' do
+    it 'returns http success'
+  end
+
+  describe 'GET #followers' do
+    it 'returns http success'
+  end
+
+  describe 'GET #following' do
+    it 'returns http success'
+  end
+
+  describe 'POST #follow' do
+    it 'returns http success'
+  end
+
+  describe 'POST #unfollow' do
+    it 'returns http success'
+  end
 end
diff --git a/spec/controllers/api/follows_controller_spec.rb b/spec/controllers/api/follows_controller_spec.rb
index ba3f046dd..75f470181 100644
--- a/spec/controllers/api/follows_controller_spec.rb
+++ b/spec/controllers/api/follows_controller_spec.rb
@@ -1,5 +1,7 @@
 require 'rails_helper'
 
 RSpec.describe Api::FollowsController, type: :controller do
-
+  describe 'POST #create' do
+    it 'returns http success'
+  end
 end
diff --git a/spec/controllers/api/statuses_controller_spec.rb b/spec/controllers/api/statuses_controller_spec.rb
index bf84857bd..bd136a559 100644
--- a/spec/controllers/api/statuses_controller_spec.rb
+++ b/spec/controllers/api/statuses_controller_spec.rb
@@ -1,5 +1,27 @@
 require 'rails_helper'
 
 RSpec.describe Api::StatusesController, type: :controller do
+  describe 'GET #show' do
+    it 'returns http success'
+  end
 
+  describe 'GET #home' do
+    it 'returns http success'
+  end
+
+  describe 'GET #mentions' do
+    it 'returns http success'
+  end
+
+  describe 'POST #create' do
+    it 'returns http success'
+  end
+
+  describe 'POST #reblog' do
+    it 'returns http success'
+  end
+
+  describe 'POST #favourite' do
+    it 'returns http success'
+  end
 end
diff --git a/spec/controllers/oauth/applications_controller_spec.rb b/spec/controllers/oauth/applications_controller_spec.rb
index 7f2ca8cd9..350d5d521 100644
--- a/spec/controllers/oauth/applications_controller_spec.rb
+++ b/spec/controllers/oauth/applications_controller_spec.rb
@@ -1,5 +1,11 @@
 require 'rails_helper'
 
 RSpec.describe Oauth::ApplicationsController, type: :controller do
+  describe 'GET #index' do
+    it 'returns http success'
+  end
 
+  describe 'POST #create' do
+    it 'redirects to the application page'
+  end
 end
diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb
index 562989335..569442c2c 100644
--- a/spec/models/account_spec.rb
+++ b/spec/models/account_spec.rb
@@ -111,4 +111,16 @@ RSpec.describe Account, type: :model do
   describe '#ping!' do
     pending
   end
+
+  describe '#favourited?' do
+    pending
+  end
+
+  describe '#reblogged?' do
+    pending
+  end
+
+  describe '.find_local' do
+    pending
+  end
 end
diff --git a/spec/models/feed_spec.rb b/spec/models/feed_spec.rb
new file mode 100644
index 000000000..19ddeef7f
--- /dev/null
+++ b/spec/models/feed_spec.rb
@@ -0,0 +1,7 @@
+require 'rails_helper'
+
+RSpec.describe Feed, type: :model do
+  describe '#get' do
+    pending
+  end
+end
diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb
index db7b67117..13c5fa3d1 100644
--- a/spec/models/status_spec.rb
+++ b/spec/models/status_spec.rb
@@ -114,4 +114,12 @@ RSpec.describe Status, type: :model do
       expect(subject.target).to eq other
     end
   end
+
+  describe '#reblogs_count' do
+    pending
+  end
+
+  describe '#favourites_count' do
+    pending
+  end
 end
diff --git a/spec/services/fan_out_on_write_service_spec.rb b/spec/services/fan_out_on_write_service_spec.rb
new file mode 100644
index 000000000..2b087edd9
--- /dev/null
+++ b/spec/services/fan_out_on_write_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe FanOutOnWriteService do
+  subject { FanOutOnWriteService.new }
+end
diff --git a/spec/services/favourite_service_spec.rb b/spec/services/favourite_service_spec.rb
new file mode 100644
index 000000000..eb961c28e
--- /dev/null
+++ b/spec/services/favourite_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe FavouriteService do
+  subject { FavouriteService.new }
+end
diff --git a/spec/services/precompute_feed_service_spec.rb b/spec/services/precompute_feed_service_spec.rb
new file mode 100644
index 000000000..392cb0e4d
--- /dev/null
+++ b/spec/services/precompute_feed_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe PrecomputeFeedService do
+  subject { PrecomputeFeedService.new }
+end
diff --git a/spec/services/setup_local_account_service_spec.rb b/spec/services/setup_local_account_service_spec.rb
deleted file mode 100644
index 2e85fc4f5..000000000
--- a/spec/services/setup_local_account_service_spec.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-require 'rails_helper'
-
-RSpec.describe SetupLocalAccountService do
-  subject { SetupLocalAccountService.new }
-
-  it 'creates a user'
-  it 'creates an account for the user'
-end
diff --git a/spec/services/update_remote_profile_service_spec.rb b/spec/services/update_remote_profile_service_spec.rb
new file mode 100644
index 000000000..f09f60ada
--- /dev/null
+++ b/spec/services/update_remote_profile_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe UpdateRemoteProfileService do
+  subject { UpdateRemoteProfileService.new }
+end