require 'rails_helper'
describe AccountInteractions do
describe 'muting an account' do
let(:me) { Fabricate(:account, username: 'Me') }
let(:you) { Fabricate(:account, username: 'You') }
context 'with the notifications option unspecified' do
before do
me.mute!(you)
end
it 'defaults to muting notifications' do
expect(me.muting_notifications?(you)).to be true
context 'with the notifications option set to false' do
me.mute!(you, notifications: false)
it 'does not mute notifications' do
expect(me.muting_notifications?(you)).to be false
context 'with the notifications option set to true' do
me.mute!(you, notifications: true)
it 'does mute notifications' do