Permalink
Browse files

modified request level exposure test to check more than one statement

  • Loading branch information...
1 parent 836cea9 commit 905d6beed230299f1837b6186fb3eff6397a3f9d @jonpacker jonpacker committed Aug 14, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/express-expose.test.js
@@ -141,9 +141,11 @@ module.exports = {
app.set('views', __dirname + '/views');
app.expose('var user = { name: "tj" };')
+ app.expose('user.id = 50;')
app.get('/', function(req, res) {
res.expose('var lang = "en";');
+ res.expose('var country = "no";');
res.render('index');
});
@@ -155,6 +157,8 @@ module.exports = {
var scope = {};
vm.runInNewContext(res.text, scope);
scope.user.name.should.equal('tj');
+ scope.user.id.should.equal(50);
+ scope.country.should.equal('no');
scope.lang.should.equal('en');
done();
});

0 comments on commit 905d6be

Please sign in to comment.