Missed a spot when redefining a method.

This commit is contained in:
Guo Xiang Tan
2017-05-26 13:00:17 +08:00
parent e57d2f5cb8
commit 144b810d0e
2 changed files with 19 additions and 2 deletions

View File

@ -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 = {