mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Missed a spot when redefining a method.
This commit is contained in:
@ -4,6 +4,22 @@ describe "Discobot Certificate" do
|
||||
let(:user) { Fabricate(:user, name: 'Jeff Atwood') }
|
||||
|
||||
describe 'when viewing the certificate' do
|
||||
it 'should return the right text' do
|
||||
params = {
|
||||
date: Time.zone.now.strftime("%b %d %Y"),
|
||||
user_id: user.id
|
||||
}
|
||||
|
||||
stub_request(:get, /letter_avatar_proxy/).to_return(status: 200)
|
||||
|
||||
stub_request(:get, "http://test.localhost//images/d-logo-sketch-small.png")
|
||||
.to_return(status: 200)
|
||||
|
||||
xhr :get, '/discobot/certificate.svg', params
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
|
||||
describe 'when params are missing' do
|
||||
it "should raise the right errors" do
|
||||
params = {
|
||||
|
Reference in New Issue
Block a user