spec/javascripts/faye-authentication_spec.js in faye-authentication-0.1.0 vs spec/javascripts/faye-authentication_spec.js in faye-authentication-0.2.0

- old
+ new

@@ -1,16 +1,16 @@ describe('faye-authentication', function() { describe('constructor', function() { it('sets endpoint to /faye by default', function() { - var auth = new FayeAuthentication(); + var auth = new FayeAuthentication(new Faye.Client('http://example.com')); expect(auth.endpoint()).toBe('/faye/auth'); }); it('can specify a custom endpoint', function() { - var auth = new FayeAuthentication('/custom'); + var auth = new FayeAuthentication(new Faye.Client('http://example.com'), '/custom'); expect(auth.endpoint()).toBe('/custom'); }); }); @@ -39,10 +39,9 @@ it('should make an ajax request with the correct params', function(done) { this.client.subscribe('/foobar'); var self = this; setTimeout(function() { var request = jasmine.Ajax.requests.mostRecent(); - console.log(request); expect(request.data()['message[channel]'][0]).toBe('/foobar'); done(); }, 500); });