about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-25 00:17:01 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-25 00:17:01 +0100
commit71fe24096c612996cb2a827c919a4c88ae1e3495 (patch)
treefb1deed15866b83f0ed1583c91bc4d6fcb432827 /spec
parent42eeecba3f334227c10533a065e238f51f6dee4c (diff)
Adding a Mention model, test stubs
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/atom_controller_spec.rb6
-rw-r--r--spec/controllers/home_controller_spec.rb4
-rw-r--r--spec/controllers/profile_controller_spec.rb11
-rw-r--r--spec/controllers/xrd_controller_spec.rb6
-rw-r--r--spec/helpers/routing_helper.rb15
-rw-r--r--spec/models/account_spec.rb44
-rw-r--r--spec/models/favourite_spec.rb28
-rw-r--r--spec/models/follow_spec.rb24
-rw-r--r--spec/models/mention_spec.rb5
-rw-r--r--spec/models/status_spec.rb32
-rw-r--r--spec/models/stream_entry_spec.rb11
-rw-r--r--spec/models/stream_spec.rb5
-rw-r--r--spec/models/user_spec.rb2
-rw-r--r--spec/rails_helper.rb16
-rw-r--r--spec/services/fetch_feed_service_spec.rb5
-rw-r--r--spec/services/follow_remote_account_service_spec.rb5
-rw-r--r--spec/services/follow_service_spec.rb5
-rw-r--r--spec/services/post_status_service_spec.rb5
-rw-r--r--spec/services/process_feed_service_spec.rb5
-rw-r--r--spec/services/process_interaction_service_spec.rb5
-rw-r--r--spec/services/process_mentions_service_spec.rb5
-rw-r--r--spec/services/reblog_service_spec.rb5
-rw-r--r--spec/services/send_interaction_service_spec.rb5
-rw-r--r--spec/services/setup_local_account_service_spec.rb5
-rw-r--r--spec/services/unfollow_service_spec.rb5
-rw-r--r--spec/spec_helper.rb15
-rw-r--r--spec/views/profile/show.html.haml_spec.rb5
27 files changed, 262 insertions, 22 deletions
diff --git a/spec/controllers/atom_controller_spec.rb b/spec/controllers/atom_controller_spec.rb
index ec14db007..6f04ad347 100644
--- a/spec/controllers/atom_controller_spec.rb
+++ b/spec/controllers/atom_controller_spec.rb
@@ -1,5 +1,11 @@
 require 'rails_helper'
 
 RSpec.describe AtomController, type: :controller do
+  describe 'GET #user_stream' do
+    pending
+  end
 
+  describe 'GET #entry' do
+    pending
+  end
 end
diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb
index e672b25e4..e609ab6be 100644
--- a/spec/controllers/home_controller_spec.rb
+++ b/spec/controllers/home_controller_spec.rb
@@ -1,5 +1,7 @@
 require 'rails_helper'
 
 RSpec.describe HomeController, type: :controller do
-
+  describe 'GET #index' do
+    pending
+  end
 end
diff --git a/spec/controllers/profile_controller_spec.rb b/spec/controllers/profile_controller_spec.rb
index 5904f5140..e4d124e29 100644
--- a/spec/controllers/profile_controller_spec.rb
+++ b/spec/controllers/profile_controller_spec.rb
@@ -1,12 +1,11 @@
 require 'rails_helper'
 
 RSpec.describe ProfileController, type: :controller do
-
-  describe "GET #show" do
-    it "returns http success" do
-      get :show
-      expect(response).to have_http_status(:success)
-    end
+  describe 'GET #show' do
+    pending
   end
 
+  describe 'GET #entry' do
+    pending
+  end
 end
diff --git a/spec/controllers/xrd_controller_spec.rb b/spec/controllers/xrd_controller_spec.rb
index 03a4b5800..669c02c40 100644
--- a/spec/controllers/xrd_controller_spec.rb
+++ b/spec/controllers/xrd_controller_spec.rb
@@ -1,5 +1,11 @@
 require 'rails_helper'
 
 RSpec.describe XrdController, type: :controller do
+  describe 'GET #host_meta' do
+    pending
+  end
 
+  describe 'GET #webfinger' do
+    pending
+  end
 end
diff --git a/spec/helpers/routing_helper.rb b/spec/helpers/routing_helper.rb
new file mode 100644
index 000000000..9ccb4a38a
--- /dev/null
+++ b/spec/helpers/routing_helper.rb
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+# Specs in this file have access to a helper object that includes
+# the RoutingHelper. For example:
+#
+# describe RoutingHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       expect(helper.concat_strings("this","that")).to eq("this that")
+#     end
+#   end
+# end
+RSpec.describe RoutingHelper, type: :helper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb
index 74410ece7..fbcc972cf 100644
--- a/spec/models/account_spec.rb
+++ b/spec/models/account_spec.rb
@@ -1,5 +1,47 @@
 require 'rails_helper'
 
 RSpec.describe Account, type: :model do
-  pending "add some examples to (or delete) #{__FILE__}"
+  describe '#follow!' do
+    pending
+  end
+
+  describe '#unfollow!' do
+    pending
+  end
+
+  describe '#following?' do
+    pending
+  end
+
+  describe '#local?' do
+    pending
+  end
+
+  describe '#acct' do
+    pending
+  end
+
+  describe '#subscribed?' do
+    pending
+  end
+
+  describe '#keypair' do
+    pending
+  end
+
+  describe '#subscription' do
+    pending
+  end
+
+  describe '#object_type' do
+    pending
+  end
+
+  describe '#title' do
+    pending
+  end
+
+  describe '#content' do
+    pending
+  end
 end
diff --git a/spec/models/favourite_spec.rb b/spec/models/favourite_spec.rb
index 271aef4a4..ad803ec4b 100644
--- a/spec/models/favourite_spec.rb
+++ b/spec/models/favourite_spec.rb
@@ -1,5 +1,31 @@
 require 'rails_helper'
 
 RSpec.describe Favourite, type: :model do
-  pending "add some examples to (or delete) #{__FILE__}"
+  describe '#verb' do
+    pending
+  end
+
+  describe '#title' do
+    pending
+  end
+
+  describe '#content' do
+    pending
+  end
+
+  describe '#object_type' do
+    pending
+  end
+
+  describe '#target' do
+    pending
+  end
+
+  describe '#mentions' do
+    pending
+  end
+
+  describe '#thread' do
+    pending
+  end
 end
diff --git a/spec/models/follow_spec.rb b/spec/models/follow_spec.rb
index 9b76332f6..edb084701 100644
--- a/spec/models/follow_spec.rb
+++ b/spec/models/follow_spec.rb
@@ -1,5 +1,27 @@
 require 'rails_helper'
 
 RSpec.describe Follow, type: :model do
-  pending "add some examples to (or delete) #{__FILE__}"
+  describe '#verb' do
+    pending
+  end
+
+  describe '#title' do
+    pending
+  end
+
+  describe '#content' do
+    pending
+  end
+
+  describe '#object_type' do
+    pending
+  end
+
+  describe '#target' do
+    pending
+  end
+
+  describe '#mentions' do
+    pending
+  end
 end
diff --git a/spec/models/mention_spec.rb b/spec/models/mention_spec.rb
new file mode 100644
index 000000000..5c91fda02
--- /dev/null
+++ b/spec/models/mention_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Mention, type: :model do
+
+end
diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb
index c185efc3c..070e7b87f 100644
--- a/spec/models/status_spec.rb
+++ b/spec/models/status_spec.rb
@@ -1,5 +1,35 @@
 require 'rails_helper'
 
 RSpec.describe Status, type: :model do
-  pending "add some examples to (or delete) #{__FILE__}"
+  describe '#local?' do
+    pending
+  end
+
+  describe '#reblog?' do
+    pending
+  end
+
+  describe '#reply?' do
+    pending
+  end
+
+  describe '#mentions' do
+    pending
+  end
+
+  describe '#verb' do
+    pending
+  end
+
+  describe '#object_type' do
+    pending
+  end
+
+  describe '#title' do
+    pending
+  end
+
+  describe '#target' do
+    pending
+  end
 end
diff --git a/spec/models/stream_entry_spec.rb b/spec/models/stream_entry_spec.rb
new file mode 100644
index 000000000..6386cac0f
--- /dev/null
+++ b/spec/models/stream_entry_spec.rb
@@ -0,0 +1,11 @@
+require 'rails_helper'
+
+RSpec.describe StreamEntry, type: :model do
+  describe '#targeted?' do
+    pending
+  end
+
+  describe '#threaded?' do
+    pending
+  end
+end
diff --git a/spec/models/stream_spec.rb b/spec/models/stream_spec.rb
deleted file mode 100644
index 7fc775652..000000000
--- a/spec/models/stream_spec.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'rails_helper'
-
-RSpec.describe Stream, type: :model do
-  pending "add some examples to (or delete) #{__FILE__}"
-end
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 47a31bb43..64de06749 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -1,5 +1,5 @@
 require 'rails_helper'
 
 RSpec.describe User, type: :model do
-  pending "add some examples to (or delete) #{__FILE__}"
+
 end
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
new file mode 100644
index 000000000..0a04d560c
--- /dev/null
+++ b/spec/rails_helper.rb
@@ -0,0 +1,16 @@
+ENV['RAILS_ENV'] ||= 'test'
+require File.expand_path('../../config/environment', __FILE__)
+
+abort("The Rails environment is running in production mode!") if Rails.env.production?
+
+require 'spec_helper'
+require 'rspec/rails'
+
+ActiveRecord::Migration.maintain_test_schema!
+
+RSpec.configure do |config|
+  config.fixture_path = "#{::Rails.root}/spec/fixtures"
+  config.use_transactional_fixtures = true
+  config.infer_spec_type_from_file_location!
+  config.filter_rails_from_backtrace!
+end
diff --git a/spec/services/fetch_feed_service_spec.rb b/spec/services/fetch_feed_service_spec.rb
new file mode 100644
index 000000000..c6a3d389b
--- /dev/null
+++ b/spec/services/fetch_feed_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe FetchFeedService do
+  pending
+end
diff --git a/spec/services/follow_remote_account_service_spec.rb b/spec/services/follow_remote_account_service_spec.rb
new file mode 100644
index 000000000..fbe7e767a
--- /dev/null
+++ b/spec/services/follow_remote_account_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe FollowRemoteAccountService do
+  pending
+end
diff --git a/spec/services/follow_service_spec.rb b/spec/services/follow_service_spec.rb
new file mode 100644
index 000000000..ba393f5ab
--- /dev/null
+++ b/spec/services/follow_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe FollowService do
+  pending
+end
diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb
new file mode 100644
index 000000000..43d58719d
--- /dev/null
+++ b/spec/services/post_status_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe PostStatusService do
+  pending
+end
diff --git a/spec/services/process_feed_service_spec.rb b/spec/services/process_feed_service_spec.rb
new file mode 100644
index 000000000..087979ded
--- /dev/null
+++ b/spec/services/process_feed_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe ProcessFeedService do
+  pending
+end
diff --git a/spec/services/process_interaction_service_spec.rb b/spec/services/process_interaction_service_spec.rb
new file mode 100644
index 000000000..8624d0b0c
--- /dev/null
+++ b/spec/services/process_interaction_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe ProcessInteractionService do
+  pending
+end
diff --git a/spec/services/process_mentions_service_spec.rb b/spec/services/process_mentions_service_spec.rb
new file mode 100644
index 000000000..ae86d17dc
--- /dev/null
+++ b/spec/services/process_mentions_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe ProcessMentionsService do
+  pending
+end
diff --git a/spec/services/reblog_service_spec.rb b/spec/services/reblog_service_spec.rb
new file mode 100644
index 000000000..4e94d5a70
--- /dev/null
+++ b/spec/services/reblog_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe ReblogService do
+  pending
+end
diff --git a/spec/services/send_interaction_service_spec.rb b/spec/services/send_interaction_service_spec.rb
new file mode 100644
index 000000000..ae4ab01c5
--- /dev/null
+++ b/spec/services/send_interaction_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe SendInteractionService do
+  pending
+end
diff --git a/spec/services/setup_local_account_service_spec.rb b/spec/services/setup_local_account_service_spec.rb
new file mode 100644
index 000000000..709f170b6
--- /dev/null
+++ b/spec/services/setup_local_account_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe SetupLocalAccountService do
+  pending
+end
diff --git a/spec/services/unfollow_service_spec.rb b/spec/services/unfollow_service_spec.rb
new file mode 100644
index 000000000..60121b675
--- /dev/null
+++ b/spec/services/unfollow_service_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe UnfollowService do
+  pending
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 000000000..d6c1dc95b
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,15 @@
+require 'simplecov'
+
+SimpleCov.start 'rails' do
+  add_group "Services", "app/services"
+end
+
+RSpec.configure do |config|
+  config.expect_with :rspec do |expectations|
+    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+  end
+
+  config.mock_with :rspec do |mocks|
+    mocks.verify_partial_doubles = true
+  end
+end
diff --git a/spec/views/profile/show.html.haml_spec.rb b/spec/views/profile/show.html.haml_spec.rb
deleted file mode 100644
index 778dcff32..000000000
--- a/spec/views/profile/show.html.haml_spec.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'rails_helper'
-
-RSpec.describe "profile/show.html.haml", type: :view do
-  pending "add some examples to (or delete) #{__FILE__}"
-end