DEV: Use describe for methods in specs

This commit is contained in:
Loïc Guitaut
2022-07-27 12:21:10 +02:00
committed by Loïc Guitaut
parent f1c3670d74
commit 296aad430a
69 changed files with 214 additions and 214 deletions

View File

@ -65,7 +65,7 @@ describe TopicQuery do
end
end
context "#list_topics_by" do
describe "#list_topics_by" do
it "allows users to view their own invisible topics" do
_topic = Fabricate(:topic, user: user)
@ -77,7 +77,7 @@ describe TopicQuery do
end
context "#prioritize_pinned_topics" do
describe "#prioritize_pinned_topics" do
it "does the pagination correctly" do
num_topics = 15
per_page = 3
@ -503,7 +503,7 @@ describe TopicQuery do
end
end
context "#list_top_for" do
describe "#list_top_for" do
it "lists top for the week" do
Fabricate(:topic, like_count: 1000, posts_count: 100)
TopTopic.refresh!
@ -892,7 +892,7 @@ describe TopicQuery do
end
context '#list_new' do
describe '#list_new' do
context 'without a new topic' do
it "has no new topics" do
@ -969,7 +969,7 @@ describe TopicQuery do
end
context '#list_posted' do
describe '#list_posted' do
let(:topics) { topic_query.list_posted.topics }
it "returns blank when there are no posted topics" do
@ -1023,7 +1023,7 @@ describe TopicQuery do
end
end
context '#list_unseen' do
describe '#list_unseen' do
it "returns an empty list when there aren't topics" do
expect(topic_query.list_unseen.topics).to be_blank
end
@ -1074,7 +1074,7 @@ describe TopicQuery do
end
end
context '#list_related_for' do
describe '#list_related_for' do
let(:user) do
Fabricate(:admin)