Cleaned up urlBase() readability.
Updated unit tests, and added a test for the app context in the URL.

Change-Id: I110b62ff8366a503c3309df0f26a7dd213ae0c5f
diff --git a/web/gui/src/main/webapp/tests/app/fw/remote/rest-spec.js b/web/gui/src/main/webapp/tests/app/fw/remote/rest-spec.js
index cd859ba..406da03 100644
--- a/web/gui/src/main/webapp/tests/app/fw/remote/rest-spec.js
+++ b/web/gui/src/main/webapp/tests/app/fw/remote/rest-spec.js
@@ -18,21 +18,24 @@
  ONOS GUI -- Remote -- REST Service - Unit Tests
  */
 describe('factory: fw/remote/rest.js', function() {
-    var $log, $httpBackend, fs, rs, promise;
+    var $log, $httpBackend, fs, rs;
 
     beforeEach(module('onosUtil', 'onosRemote'));
 
     beforeEach(module(function($provide) {
-        $provide.factory('$location', function (){
+        $provide.factory('$location', function () {
             return {
                 protocol: function () { return 'http'; },
                 host: function () { return 'foo'; },
                 port: function () { return '80'; },
                 search: function() {
                     return {debug: 'true'};
+                },
+                absUrl: function () {
+                    return 'http://foo:123/onos/ui/rs/path';
                 }
             };
-        })
+        });
     }));
 
     beforeEach(inject(function (_$log_, _$httpBackend_, FnService, RestService) {