Adding unified streamable notifications
This commit is contained in:
parent
3838e6836d
commit
da2ef4d676
20 changed files with 205 additions and 44 deletions
29
spec/models/notification_spec.rb
Normal file
29
spec/models/notification_spec.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Notification, type: :model do
|
||||
describe '#from_account' do
|
||||
pending
|
||||
end
|
||||
|
||||
describe '#type' do
|
||||
it 'returns :reblog for a Status' do
|
||||
notification = Notification.new(activity: Status.new)
|
||||
expect(notification.type).to eq :reblog
|
||||
end
|
||||
|
||||
it 'returns :mention for a Mention' do
|
||||
notification = Notification.new(activity: Mention.new)
|
||||
expect(notification.type).to eq :mention
|
||||
end
|
||||
|
||||
it 'returns :favourite for a Favourite' do
|
||||
notification = Notification.new(activity: Favourite.new)
|
||||
expect(notification.type).to eq :favourite
|
||||
end
|
||||
|
||||
it 'returns :follow for a Follow' do
|
||||
notification = Notification.new(activity: Follow.new)
|
||||
expect(notification.type).to eq :follow
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue