Fix RSpec/ContextWording cop (#24739)
This commit is contained in:
@@ -10,7 +10,7 @@ RSpec.describe Notification, type: :model do
|
||||
let(:favourite) { Fabricate(:favourite, status: status) }
|
||||
let(:mention) { Fabricate(:mention, status: status) }
|
||||
|
||||
context 'activity is reblog' do
|
||||
context 'when Activity is reblog' do
|
||||
let(:activity) { reblog }
|
||||
|
||||
it 'returns status' do
|
||||
@@ -18,7 +18,7 @@ RSpec.describe Notification, type: :model do
|
||||
end
|
||||
end
|
||||
|
||||
context 'activity is favourite' do
|
||||
context 'when Activity is favourite' do
|
||||
let(:type) { :favourite }
|
||||
let(:activity) { favourite }
|
||||
|
||||
@@ -27,7 +27,7 @@ RSpec.describe Notification, type: :model do
|
||||
end
|
||||
end
|
||||
|
||||
context 'activity is mention' do
|
||||
context 'when Activity is mention' do
|
||||
let(:activity) { mention }
|
||||
|
||||
it 'returns status' do
|
||||
@@ -66,7 +66,7 @@ RSpec.describe Notification, type: :model do
|
||||
end
|
||||
end
|
||||
|
||||
context 'notifications are empty' do
|
||||
context 'when notifications are empty' do
|
||||
let(:notifications) { [] }
|
||||
|
||||
it 'returns []' do
|
||||
@@ -74,7 +74,7 @@ RSpec.describe Notification, type: :model do
|
||||
end
|
||||
end
|
||||
|
||||
context 'notifications are present' do
|
||||
context 'when notifications are present' do
|
||||
before do
|
||||
notifications.each(&:reload)
|
||||
end
|
||||
|
Reference in New Issue
Block a user