mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-22 05:22:24 -05:00
16 lines
647 B
CoffeeScript
16 lines
647 B
CoffeeScript
PaymentsView = require 'views/account/PaymentsView'
|
|
Payments = require 'collections/Payments'
|
|
factories = require 'test/app/factories'
|
|
|
|
describe 'PaymentsView', ->
|
|
|
|
it 'displays the payment "description" if the payment\'s productID is "custom"', ->
|
|
view = new PaymentsView()
|
|
payment = factories.makePayment({productID: 'custom', description: 'Custom Description' })
|
|
view.payments.fakeRequests[0].respondWith({
|
|
status: 200
|
|
responseText: new Payments([payment]).stringify()
|
|
})
|
|
view.render()
|
|
expect(_.contains(view.$el.text(), 'Custom Description')).toBe(true)
|
|
jasmine.demoEl(view.$('#site-content-area'))
|