DEV: Use proper wording for contexts in specs

This commit is contained in:
Loïc Guitaut
2022-07-27 18:14:14 +02:00
committed by Loïc Guitaut
parent 02987e05d5
commit 3eaac56797
337 changed files with 2172 additions and 2723 deletions

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
RSpec.describe SimilarTopicsController do
context 'similar_to' do
describe 'similar_to' do
let(:title) { 'this title is long enough to search for' }
let(:raw) { 'this body is long enough to search for' }
@ -40,7 +40,7 @@ RSpec.describe SimilarTopicsController do
SiteSetting.minimum_topics_similar = 30
end
describe "With enough topics" do
context "with enough topics" do
it "deletes to Topic.similar_to if there are more topics than `minimum_topics_similar`" do
Topic.stubs(:count).returns(50)
post
@ -54,7 +54,7 @@ RSpec.describe SimilarTopicsController do
expect(similar_topics.first["topic_id"]).to eq(topic.id)
end
describe "with a logged in user" do
context "with a logged in user" do
before do
private_post; post
reindex_posts