mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
Second review fixes
This commit is contained in:
@ -747,20 +747,19 @@ describe TopicsController do
|
||||
expect(IncomingLink.count).to eq(1)
|
||||
end
|
||||
|
||||
it "doesn't renders the print view by default" do
|
||||
user = Fabricate(:user)
|
||||
get :show, topic_id: topic.id, slug: topic.slug, print: true
|
||||
context 'print' do
|
||||
|
||||
expect(response).to be_forbidden
|
||||
end
|
||||
it "doesn't renders the print view when disabled" do
|
||||
SiteSetting.max_prints_per_hour_per_user = 0
|
||||
get :show, topic_id: topic.id, slug: topic.slug, print: true
|
||||
expect(response).to be_forbidden
|
||||
end
|
||||
|
||||
it 'renders the print view when enabled' do
|
||||
SiteSetting.max_prints_per_hour_per_user = 10
|
||||
|
||||
user = Fabricate(:user)
|
||||
get :show, topic_id: topic.id, slug: topic.slug, print: true
|
||||
|
||||
expect(response).to be_successful
|
||||
it 'renders the print view when enabled' do
|
||||
SiteSetting.max_prints_per_hour_per_user = 10
|
||||
get :show, topic_id: topic.id, slug: topic.slug, print: true
|
||||
expect(response).to be_successful
|
||||
end
|
||||
end
|
||||
|
||||
it 'records redirects' do
|
||||
|
Reference in New Issue
Block a user