Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1708)

Unified Diff: test/test_app.js

Issue 7007047: Add user login support.
Patch Set: Add user login support. Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/index.html ('k') | test/test_app_hotkeys.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_app.js
=== modified file 'test/test_app.js'
--- test/test_app.js 2012-12-03 20:24:44 +0000
+++ test/test_app.js 2013-01-02 20:39:49 +0000
@@ -119,6 +119,7 @@
});
YUI(GlobalConfig).use(['juju-gui', 'juju-tests-utils'], function(Y) {
+
describe('Application Connection State', function() {
var container;
@@ -128,7 +129,7 @@
it('should be able to handle env connection status changes', function() {
var juju = Y.namespace('juju'),
- conn = new(Y.namespace('juju-tests.utils')).SocketStub(),
+ conn = new (Y.namespace('juju-tests.utils')).SocketStub(),
env = new juju.Environment({conn: conn}),
app = new Y.juju.App({env: env, container: container}),
reset_called = false,
@@ -153,11 +154,14 @@
};
env.connect();
conn.open();
+ // We need to fake the connection event.
+ env.set('connected', true);
reset_called.should.equal(true);
// trigger a second time and verify
reset_called = false;
conn.open();
+ env.set('connected', true);
reset_called.should.equal(true);
});
@@ -229,6 +233,8 @@
env.get_endpoints = function(services, callback) {
get_endpoints_count += 1;
};
+ // We need to fake the connection event.
+ env.set('connected', true);
// Inject default data, should only get_endpoints once.
injectData(app);
get_endpoints_count.should.equal(1);
« no previous file with comments | « test/index.html ('k') | test/test_app_hotkeys.js » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b