about summary refs log tree commit diff
path: root/spec/models
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-03-24 20:51:28 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-03-24 12:51:28 +0100
commitb2a4ffd3a91abc5030baf2ede97c0867924d8fbc (patch)
tree6755edc959aa310dd5e9e388e72eb6763f2ce3e6 /spec/models
parentfa310695fa0b5fe76739232dd6acee81da6cd401 (diff)
Change columns in notifications nonnullable (#6764)
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/notification_spec.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb
index 8444c8f63..c781f2a29 100644
--- a/spec/models/notification_spec.rb
+++ b/spec/models/notification_spec.rb
@@ -6,14 +6,13 @@ RSpec.describe Notification, type: :model do
   end
 
   describe '#target_status' do
-    let(:notification) { Fabricate(:notification, activity_type: type, activity: activity) }
+    let(:notification) { Fabricate(:notification, activity: activity) }
     let(:status)       { Fabricate(:status) }
     let(:reblog)       { Fabricate(:status, reblog: status) }
     let(:favourite)    { Fabricate(:favourite, status: status) }
     let(:mention)      { Fabricate(:mention, status: status) }
 
-    context 'type is :reblog' do
-      let(:type)     { :reblog }
+    context 'activity is reblog' do
       let(:activity) { reblog }
 
       it 'returns status' do
@@ -21,7 +20,7 @@ RSpec.describe Notification, type: :model do
       end
     end
 
-    context 'type is :favourite' do
+    context 'activity is favourite' do
       let(:type)     { :favourite }
       let(:activity) { favourite }
 
@@ -30,8 +29,7 @@ RSpec.describe Notification, type: :model do
       end
     end
 
-    context 'type is :mention' do
-      let(:type)     { :mention }
+    context 'activity is mention' do
       let(:activity) { mention }
 
       it 'returns status' do