From e4a00626d85de82cf7825111bbce89784ea4cbc8 Mon Sep 17 00:00:00 2001 From: Di Peng Date: Wed, 8 Jun 2011 11:18:41 -0700 Subject: Should have replaced all instances of element('input[name=something]').val() with input('name').val() Closes #376 --- src/service/location.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/service') diff --git a/src/service/location.js b/src/service/location.js index 0cfa2e83..f03dc009 100644 --- a/src/service/location.js +++ b/src/service/location.js @@ -39,7 +39,7 @@ var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+) it('should initialize the input field', function() { - expect(using('.doc-example-live').element('input[name=$location.hash]').val()). + expect(using('.doc-example-live').input('$location.hash').val()). toBe('!/api/angular.service.$location'); }); @@ -52,14 +52,14 @@ var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+) it('should set the hash to a test string with test link is presed', function() { using('.doc-example-live').element('#ex-test').click(); - expect(using('.doc-example-live').element('input[name=$location.hash]').val()). + expect(using('.doc-example-live').input('$location.hash').val()). toBe('myPath?name=misko'); }); it('should reset $location when reset link is pressed', function() { using('.doc-example-live').input('$location.hash').enter('foo'); using('.doc-example-live').element('#ex-reset').click(); - expect(using('.doc-example-live').element('input[name=$location.hash]').val()). + expect(using('.doc-example-live').input('$location.hash').val()). toBe('!/api/angular.service.$location'); }); -- cgit v1.2.3