about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/api/v1/statuses_controller_spec.rb3
-rw-r--r--spec/fabricators/application_fabricator.rb5
-rw-r--r--spec/fabricators/preview_card_fabricator.rb5
-rw-r--r--spec/models/preview_card_spec.rb5
-rw-r--r--spec/models/subscription_spec.rb2
5 files changed, 18 insertions, 2 deletions
diff --git a/spec/controllers/api/v1/statuses_controller_spec.rb b/spec/controllers/api/v1/statuses_controller_spec.rb
index d9c73f952..669956659 100644
--- a/spec/controllers/api/v1/statuses_controller_spec.rb
+++ b/spec/controllers/api/v1/statuses_controller_spec.rb
@@ -4,7 +4,8 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
   render_views
 
   let(:user)  { Fabricate(:user, account: Fabricate(:account, username: 'alice')) }
-  let(:token) { double acceptable?: true, resource_owner_id: user.id }
+  let(:app)   { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') }
+  let(:token) { double acceptable?: true, resource_owner_id: user.id, application: app }
 
   before do
     allow(controller).to receive(:doorkeeper_token) { token }
diff --git a/spec/fabricators/application_fabricator.rb b/spec/fabricators/application_fabricator.rb
new file mode 100644
index 000000000..42b7009dc
--- /dev/null
+++ b/spec/fabricators/application_fabricator.rb
@@ -0,0 +1,5 @@
+Fabricator(:application, from: Doorkeeper::Application) do
+  name         'Example'
+  website      'http://example.com'
+  redirect_uri 'http://example.com/callback'
+end
diff --git a/spec/fabricators/preview_card_fabricator.rb b/spec/fabricators/preview_card_fabricator.rb
new file mode 100644
index 000000000..448a94e7e
--- /dev/null
+++ b/spec/fabricators/preview_card_fabricator.rb
@@ -0,0 +1,5 @@
+Fabricator(:preview_card) do
+  status_id 1
+  url       "MyString"
+  html      "MyText"
+end
diff --git a/spec/models/preview_card_spec.rb b/spec/models/preview_card_spec.rb
new file mode 100644
index 000000000..14ef23923
--- /dev/null
+++ b/spec/models/preview_card_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe PreviewCard, type: :model do
+
+end
diff --git a/spec/models/subscription_spec.rb b/spec/models/subscription_spec.rb
index d40bf0b44..9cb3d41ce 100644
--- a/spec/models/subscription_spec.rb
+++ b/spec/models/subscription_spec.rb
@@ -1,5 +1,5 @@
 require 'rails_helper'
 
 RSpec.describe Subscription, type: :model do
-  pending "add some examples to (or delete) #{__FILE__}"
+
 end