Change columns in notifications nonnullable (#6764)
This commit is contained in:
parent
fa310695fa
commit
b2a4ffd3a9
5 changed files with 23 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue