Commits

Dan Dirks  committed 21ee50e

Adds test around using env varaibles in browser.site

  • Participants
  • Parent commits f5e1ba2

Comments (0)

Files changed (1)

File test/zombie-world.test.coffee

     assert.deepEqual(world.by, { css: 'css', xpath: 'xpath', label: 'label' }, '@by not set correctly')
     assert(callback.calledOnce, 'callback not called')
 
+  test 'should use environment variables to set site value', ->
+    callback = sinon.spy()
+    world = Object.create(null)
+    server = process.env.SERVER = 'my_server'
+    port = process.env.PORT = '10000'
+
+    World.call(world, callback)
+
+    assert.equal(world.browser.site, "#{server}:#{port}", 'site not set correctly')
+
 
   suite 'api', ->
     setup ->