Fix RSpec/MissingExampleGroupArgument cop (#25310)
This commit is contained in:
parent
b74c3cd708
commit
6c0e3f490a
22 changed files with 38 additions and 68 deletions
|
@ -3,7 +3,7 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Account do
|
||||
context do
|
||||
context 'with an account record' do
|
||||
subject { Fabricate(:account) }
|
||||
|
||||
let(:bob) { Fabricate(:account, username: 'bob') }
|
||||
|
|
|
@ -9,7 +9,7 @@ RSpec.describe EmailDomainBlock do
|
|||
context 'when given an e-mail address' do
|
||||
let(:input) { "foo@#{domain}" }
|
||||
|
||||
context do
|
||||
context 'with a top level domain' do
|
||||
let(:domain) { 'example.com' }
|
||||
|
||||
it 'returns true if the domain is blocked' do
|
||||
|
@ -23,7 +23,7 @@ RSpec.describe EmailDomainBlock do
|
|||
end
|
||||
end
|
||||
|
||||
context do
|
||||
context 'with a subdomain' do
|
||||
let(:domain) { 'mail.example.com' }
|
||||
|
||||
it 'returns true if it is a subdomain of a blocked domain' do
|
||||
|
|
|
@ -81,7 +81,7 @@ RSpec.describe Trends::Statuses do
|
|||
4.times { reblog(status3, today) }
|
||||
end
|
||||
|
||||
context do
|
||||
context 'when status trends are refreshed' do
|
||||
before do
|
||||
subject.refresh(today)
|
||||
end
|
||||
|
|
|
@ -44,7 +44,7 @@ RSpec.describe Trends::Tags do
|
|||
4.times { |i| subject.add(tag2, i, today) }
|
||||
end
|
||||
|
||||
context do
|
||||
context 'when tag trends are refreshed' do
|
||||
before do
|
||||
subject.refresh(yesterday + 12.hours)
|
||||
subject.refresh(at_time)
|
||||
|
|
|
@ -118,10 +118,8 @@ RSpec.describe UserRole do
|
|||
end
|
||||
end
|
||||
|
||||
context do
|
||||
it 'returns permissions combined with the everyone role' do
|
||||
expect(subject.computed_permissions).to eq described_class.everyone.permissions
|
||||
end
|
||||
it 'returns permissions combined with the everyone role' do
|
||||
expect(subject.computed_permissions).to eq described_class.everyone.permissions
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ RSpec.describe User do
|
|||
expect(user).to_not be_valid
|
||||
end
|
||||
|
||||
context do
|
||||
context 'with a blacklisted subdomain' do
|
||||
around do |example|
|
||||
old_blacklist = Rails.configuration.x.email_blacklist
|
||||
example.run
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue