mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 08:19:05 +00:00
Code style changes in specs and removed an extra space
This commit is contained in:
@@ -23,11 +23,11 @@ RSpec.describe Api::V2::MutesController, type: :controller do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'returns one mute' do
|
it 'returns one mute' do
|
||||||
expect(mutes.size).to be(1)
|
expect(mutes.size).to be 1
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns whether the mute hides notifications' do
|
it 'returns whether the mute hides notifications' do
|
||||||
expect(mutes.first["hide_notifications"]).to be(false)
|
expect(mutes.first["hide_notifications"]).to be false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,38 +2,37 @@ require 'rails_helper'
|
|||||||
|
|
||||||
describe AccountInteractions do
|
describe AccountInteractions do
|
||||||
describe 'muting an account' do
|
describe 'muting an account' do
|
||||||
before do
|
let(:me) { Fabricate(:account, username: 'Me') }
|
||||||
@me = Fabricate(:account, username: 'Me')
|
let(:you) { Fabricate(:account, username: 'You') }
|
||||||
@you = Fabricate(:account, username: 'You')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with the notifications option unspecified' do
|
context 'with the notifications option unspecified' do
|
||||||
before do
|
before do
|
||||||
@me.mute!(@you)
|
me.mute!(you)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'defaults to muting notifications' do
|
it 'defaults to muting notifications' do
|
||||||
expect(@me.muting_notifications?(@you)).to be(true)
|
expect(me.muting_notifications?(you)).to be true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with the notifications option set to false' do
|
context 'with the notifications option set to false' do
|
||||||
before do
|
before do
|
||||||
@me.mute!(@you, notifications: false)
|
me.mute!(you, notifications: false)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not mute notifications' do
|
it 'does not mute notifications' do
|
||||||
expect(@me.muting_notifications?(@you)).to be(false)
|
expect(me.muting_notifications?(you)).to be false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with the notifications option set to true' do
|
context 'with the notifications option set to true' do
|
||||||
before do
|
before do
|
||||||
@me.mute!(@you, notifications: true)
|
me.mute!(you, notifications: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does mute notifications' do
|
it 'does mute notifications' do
|
||||||
expect(@me.muting_notifications?(@you)).to be(true)
|
expect(me.muting_notifications?(you)).to be true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user