@@ -118,20 +118,16 @@ describe 'Utils', () ->
118
118
text = ' hello<script>alert(1)</script> <p onclick="alert(1)" ng-show=\' false\' >xxx</p>'
119
119
expect (Utils .cleanHTML text).toBe ' hello <p>xxx</p>'
120
120
121
- it ' should respect whitelist for enterprise edition ' , ->
121
+ it ' should respect whitelist from server ' , ->
122
122
host = ' http://first.com'
123
123
whitelist = ' http://second.com,http://third.com'
124
- expect (Utils .hostIsAllowed host, ' *' , yes ).toBe yes
125
- expect (Utils .hostIsAllowed host, host, yes ).toBe yes
126
- expect (Utils .hostIsAllowed host, whitelist, yes ).toBe no
127
-
128
- it ' should ignore whitelist for non enterprise editions' , ->
129
- host = ' http://first.com'
130
- whitelist = ' http://second.com,http://third.com'
131
- expect (Utils .hostIsAllowed host, ' *' , no ).toBe no
132
- expect (Utils .hostIsAllowed host, host, no ).toBe no
133
- expect (Utils .hostIsAllowed host, whitelist, no ).toBe no
134
- expect (Utils .hostIsAllowed ' http://guides.neo4j.com' , whitelist, no ).toBe yes
124
+ expect (Utils .hostIsAllowed host, ' *' ).toBe yes
125
+ expect (Utils .hostIsAllowed host, null ).toBe no
126
+ expect (Utils .hostIsAllowed host, ' ' ).toBe no
127
+ expect (Utils .hostIsAllowed host, host).toBe yes
128
+ expect (Utils .hostIsAllowed host, whitelist).toBe no
129
+ expect (Utils .hostIsAllowed ' http://guides.neo4j.com' , null ).toBe yes
130
+ expect (Utils .hostIsAllowed ' http://guides.neo4j.com' , ' ' ).toBe yes
135
131
136
132
it ' should merge two arrays with documents without duplicates' , ->
137
133
arr1 = [getDocument (' MATCH (n) RETURN n' ), getDocument (' //My script\n RETURN "me"' )]
0 commit comments