diff --git a/app/javascript/mastodon/components/account.js b/app/javascript/mastodon/components/account.js index a5438bba8a..b9a2820fef 100644 --- a/app/javascript/mastodon/components/account.js +++ b/app/javascript/mastodon/components/account.js @@ -82,7 +82,7 @@ export default class Account extends ImmutablePureComponent { } else if (muting) { let hidingNotificationsButton; if (muting.get('notifications')) { - hidingNotificationsButton = ; + hidingNotificationsButton = ; } else { hidingNotificationsButton = ; } diff --git a/spec/controllers/api/v2/mutes_controller_spec.rb b/spec/controllers/api/v2/mutes_controller_spec.rb index 0e94473a97..eae5d889a2 100644 --- a/spec/controllers/api/v2/mutes_controller_spec.rb +++ b/spec/controllers/api/v2/mutes_controller_spec.rb @@ -23,11 +23,11 @@ RSpec.describe Api::V2::MutesController, type: :controller do end it 'returns one mute' do - expect(mutes.size).to be(1) + expect(mutes.size).to be 1 end 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 diff --git a/spec/models/concerns/account_interactions_spec.rb b/spec/models/concerns/account_interactions_spec.rb index ef957fc1d3..10f25f8354 100644 --- a/spec/models/concerns/account_interactions_spec.rb +++ b/spec/models/concerns/account_interactions_spec.rb @@ -2,38 +2,37 @@ require 'rails_helper' describe AccountInteractions do describe 'muting an account' do - before do - @me = Fabricate(:account, username: 'Me') - @you = Fabricate(:account, username: 'You') + let(:me) { Fabricate(:account, username: 'Me') } + let(:you) { Fabricate(:account, username: 'You') } end context 'with the notifications option unspecified' do before do - @me.mute!(@you) + me.mute!(you) end it 'defaults to muting notifications' do - expect(@me.muting_notifications?(@you)).to be(true) + expect(me.muting_notifications?(you)).to be true end end context 'with the notifications option set to false' do before do - @me.mute!(@you, notifications: false) + me.mute!(you, notifications: false) end it 'does not mute notifications' do - expect(@me.muting_notifications?(@you)).to be(false) + expect(me.muting_notifications?(you)).to be false end end context 'with the notifications option set to true' do before do - @me.mute!(@you, notifications: true) + me.mute!(you, notifications: true) end it 'does mute notifications' do - expect(@me.muting_notifications?(@you)).to be(true) + expect(me.muting_notifications?(you)).to be true end end end