Autofix Rubocop RSpec/LeadingSubject (#23670)
This commit is contained in:
parent
4ea1e0fceb
commit
4552685f6b
78 changed files with 256 additions and 338 deletions
|
@ -2,10 +2,10 @@ require 'rails_helper'
|
|||
|
||||
RSpec.describe CustomEmoji, type: :model do
|
||||
describe '#search' do
|
||||
let(:custom_emoji) { Fabricate(:custom_emoji, shortcode: shortcode) }
|
||||
|
||||
subject { described_class.search(search_term) }
|
||||
|
||||
let(:custom_emoji) { Fabricate(:custom_emoji, shortcode: shortcode) }
|
||||
|
||||
context 'shortcode is exact' do
|
||||
let(:shortcode) { 'blobpats' }
|
||||
let(:search_term) { 'blobpats' }
|
||||
|
@ -26,10 +26,10 @@ RSpec.describe CustomEmoji, type: :model do
|
|||
end
|
||||
|
||||
describe '#local?' do
|
||||
let(:custom_emoji) { Fabricate(:custom_emoji, domain: domain) }
|
||||
|
||||
subject { custom_emoji.local? }
|
||||
|
||||
let(:custom_emoji) { Fabricate(:custom_emoji, domain: domain) }
|
||||
|
||||
context 'domain is nil' do
|
||||
let(:domain) { nil }
|
||||
|
||||
|
@ -55,10 +55,10 @@ RSpec.describe CustomEmoji, type: :model do
|
|||
end
|
||||
|
||||
describe '.from_text' do
|
||||
let!(:emojo) { Fabricate(:custom_emoji) }
|
||||
|
||||
subject { described_class.from_text(text, nil) }
|
||||
|
||||
let!(:emojo) { Fabricate(:custom_emoji) }
|
||||
|
||||
context 'with plain text' do
|
||||
let(:text) { 'Hello :coolcat:' }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue