spec/javascripts/faye-authentication_spec.js in faye-authentication-1.7.0 vs spec/javascripts/faye-authentication_spec.js in faye-authentication-1.8.0
- old
+ new
@@ -10,9 +10,19 @@
it('can specify a custom endpoint', function() {
var auth = new FayeAuthentication(new Faye.Client('http://example.com'), '/custom');
expect(auth.endpoint()).toBe('/custom');
});
+ it('sets a retry delay by default', function() {
+ var auth = new FayeAuthentication(new Faye.Client('http://example.com'));
+ expect(auth._options.retry_delay).toBe(1000);
+ });
+
+ it('allows to specify a custom retry delay', function() {
+ var auth = new FayeAuthentication(new Faye.Client('http://example.com'), null, {retry_delay: 500});
+ expect(auth._options.retry_delay).toBe(500);
+ });
+
});
describe('authentication_required', function() {
beforeEach(function() {