"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "spec/requests/topics_controller_spec.rb" between
discourse-2.5.2.tar.gz and discourse-2.5.3.tar.gz

About: Discourse is a "next-generation" forum platform for community discussions.

topics_controller_spec.rb  (discourse-2.5.2):topics_controller_spec.rb  (discourse-2.5.3)
skipping to change at line 2771 skipping to change at line 2771
it 'should raise the right error' do it 'should raise the right error' do
post "/t/#{topic.id}/timer.json", params: { post "/t/#{topic.id}/timer.json", params: {
time: 10, time: 10,
status_type: 'something' status_type: 'something'
} }
expect(response.status).to eq(400) expect(response.status).to eq(400)
expect(response.body).to include('status_type') expect(response.body).to include('status_type')
end end
end end
end end
context 'when logged in as a TL4 user' do
it "raises an error if the user can't see the topic" do
user.update!(trust_level: TrustLevel[4])
sign_in(user)
pm_topic = Fabricate(:private_message_topic)
post "/t/#{pm_topic.id}/timer.json", params: {
time: '24',
status_type: TopicTimer.types[1]
}
expect(response.status).to eq(403)
expect(response.parsed_body["error_type"]).to eq('invalid_access')
end
end
end end
describe '#invite' do describe '#invite' do
describe 'when not logged in' do describe 'when not logged in' do
it "should return the right response" do it "should return the right response" do
post "/t/#{topic.id}/invite.json", params: { post "/t/#{topic.id}/invite.json", params: {
email: 'jake@adventuretime.ooo' email: 'jake@adventuretime.ooo'
} }
expect(response.status).to eq(403) expect(response.status).to eq(403)
 End of changes. 1 change blocks. 
0 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)