Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit ea2518f

Browse files
committedAug 26, 2015
test($parse): fix csp setup
Run the parse interpreter for csp enabled tests
1 parent 7e67e52 commit ea2518f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎test/ng/parseSpec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1681,8 +1681,9 @@ describe('parser', function() {
16811681

16821682
beforeEach(module(function($provide) {
16831683
$provide.decorator('$sniffer', function($delegate) {
1684-
$delegate.csp = cspEnabled;
1685-
return $delegate;
1684+
expect($delegate.csp.noUnsafeEval === true ||
1685+
$delegate.csp.noUnsafeEval === false).toEqual(true);
1686+
$delegate.csp.noUnsafeEval = cspEnabled;
16861687
});
16871688
}, provideLog));
16881689

@@ -2120,9 +2121,8 @@ describe('parser', function() {
21202121

21212122
expect(scope.$eval('items[1] = "abc"')).toEqual("abc");
21222123
expect(scope.$eval('items[1]')).toEqual("abc");
2123-
// Dont know how to make this work....
2124-
// expect(scope.$eval('books[1] = "moby"')).toEqual("moby");
2125-
// expect(scope.$eval('books[1]')).toEqual("moby");
2124+
expect(scope.$eval('books[1] = "moby"')).toEqual("moby");
2125+
expect(scope.$eval('books[1]')).toEqual("moby");
21262126
});
21272127

21282128
it('should evaluate grouped filters', function() {

0 commit comments

Comments
 (0)