notification_spec.rb 789 B

1234567891011121314151617181920212223242526272829
  1. require 'rails_helper'
  2. RSpec.describe Notification, type: :model do
  3. describe '#from_account' do
  4. pending
  5. end
  6. describe '#type' do
  7. it 'returns :reblog for a Status' do
  8. notification = Notification.new(activity: Status.new)
  9. expect(notification.type).to eq :reblog
  10. end
  11. it 'returns :mention for a Mention' do
  12. notification = Notification.new(activity: Mention.new)
  13. expect(notification.type).to eq :mention
  14. end
  15. it 'returns :favourite for a Favourite' do
  16. notification = Notification.new(activity: Favourite.new)
  17. expect(notification.type).to eq :favourite
  18. end
  19. it 'returns :follow for a Follow' do
  20. notification = Notification.new(activity: Follow.new)
  21. expect(notification.type).to eq :follow
  22. end
  23. end
  24. end