Skip to content

Instantly share code, notes, and snippets.

@feroult
Last active August 29, 2015 14:01
Show Gist options
  • Save feroult/76d2d76fc80e3ec592d4 to your computer and use it in GitHub Desktop.
Save feroult/76d2d76fc80e3ec592d4 to your computer and use it in GitHub Desktop.
Appengine devserver login/logout with QUnit Page JS
// See qunit-pages: https://github.com/murer/qunit-page
function login(page, user) {
page.step('login', function() {
page.stop();
$.get("/_ah/logout?continue=/blank.html", function(data) {
console.info("logout");
$.post('/_ah/login?continue=/blank.html', {
'email' : user + '@wavez',
'continue' : '/blank.html',
'action' : 'Log In'
}, function(data) {
console.info("login");
page.start();
});
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment