2015-02-04 06:22:11 +00:00
|
|
|
describe "UrlValidator", ->
|
|
|
|
|
|
|
|
|
|
beforeEach ->
|
2015-02-10 03:32:18 +00:00
|
|
|
this.fixtures = fixture.load("site_validator_spec.html", append=false)
|
2015-02-04 06:22:11 +00:00
|
|
|
this.server = sinon.fakeServer.create();
|
|
|
|
|
window.jamClient = sinon.stub()
|
2015-02-10 03:32:18 +00:00
|
|
|
this.url_validator = new JK.UrlValidator($(".site_validator#teaspoon_url"))
|
2015-02-04 06:22:11 +00:00
|
|
|
this.url_validator.init()
|
2015-02-10 03:32:18 +00:00
|
|
|
$('body').append(this.site_validator.input_div)
|
|
|
|
|
this.site_validator.site_input.val('http://www.jamkazam.com')
|
2015-02-04 06:22:11 +00:00
|
|
|
window.gon = {}
|
|
|
|
|
window.gon.isNativeClient = true
|
|
|
|
|
|
|
|
|
|
afterEach ->
|
|
|
|
|
this.server.restore();
|
|
|
|
|
|
|
|
|
|
it "displays validator widget", ->
|
2015-02-10 03:32:18 +00:00
|
|
|
# this.site_validator.url_input.focus()
|
|
|
|
|
# expect(this.site_validator.checkmark).toBeVisible()
|