GUI -- Added mechanism to test device view.
Themed device view.

Change-Id: I471ec56b94c927d834f8067d06efce33ddfa4596
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 ecfcba7..5537d88 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
@@ -25,6 +25,16 @@
 
     beforeEach(module('onosUtil', 'onosRemote'));
 
+    beforeEach(module(function($provide) {
+        $provide.factory('$location', function (){
+            return {
+                protocol: function () { return 'http'; },
+                host: function () { return 'foo'; },
+                port: function () { return '80'; }
+            };
+        })
+    }));
+
     beforeEach(inject(function (_$log_, _$httpBackend_, FnService, RestService) {
         $log = _$log_;
         $httpBackend = _$httpBackend_;
@@ -50,10 +60,10 @@
     it('should fetch remote data', function () {
         var called = 0,
             capture = null;
-        $httpBackend.expectGET('/bar').respond(mockData);
+        $httpBackend.whenGET(/.*/).respond(mockData);
         spyOn($log, 'warn');
 
-        rs.get('/bar', function (data) {
+        rs.get('bar', function (data) {
             called++;
             capture = data;
         });
@@ -69,10 +79,10 @@
     it('should fail to fetch remote data', function () {
         var called = 0,
             capture = null;
-        $httpBackend.expectGET('/bar').respond(404, 'Not Found');
+        $httpBackend.whenGET(/.*/).respond(404, 'Not Found');
         spyOn($log, 'warn');
 
-        rs.get('/bar', function (data) {
+        rs.get('bar', function (data) {
             called++;
             capture = data;
         });
@@ -82,9 +92,8 @@
         $httpBackend.flush();
         expect(called).toEqual(0);
         expect(capture).toBeNull();
-        expect($log.warn)
-            .toHaveBeenCalledWith('Failed to retrieve JSON data: /bar',
-                                    404, 'Not Found');
+        expect($log.warn).toHaveBeenCalledWith(
+            'Failed to retrieve JSON data: http://foo:80/ui/rs/bar', 404, 'Not Found');
     });
 
 });