aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/xhrSpec.js
AgeCommit message (Collapse)Author
2011-08-19feat($xhr,$resource): expose response headers in callbacksKarl Seamon
all $xhr*, $resource and related mocks now have access to headers from their callbacks
2011-07-27feat($xhr): add custom error callback to $xhr, $xhr.cache, $xhr.bulk, $resourceKarl Seamon
Closes #408
2011-07-18feat(strict mode): adding strict mode flag to all js filesIgor Minar
the flag must be in all src and test files so that we get the benefit of running in the strict mode even in jstd the following script was used to modify all files: for file in `find src test -name "*.js"`; do echo -e "'use strict';\n" > temp.txt cat $file >> temp.txt mv temp.txt $file done
2011-06-30feat:$xhr: provide access to $xhr header defaultsIgor Minar
$xhr header defaults are now exposed as $xhr.defaults.headers.common and $xhr.default.headers.<httpmethod>. This allows applications to configure their defaults as needed. This commit doesn't allow headers to be set per request, only per application. Per request change would require api change, which I tried to avoid *for now*.
2011-05-31Rename deprecated wasCalled() -> toHaveBeenCalled() in all specsVojta Jina
As well as wasNotCalled(), wasCalledWith(), wasNotCalledWith()
2011-03-11Added XSRF prevention logic to $xhr serviceMisko Hevery
2011-03-11Consider all 2xx responses as OK, not just 200Misko Hevery
2011-03-02$xhr service now autodetects and strips )]}',\nIgor Minar
")]}\',\n" is a commonly used security prefix added to json http responses iat google and elsewhere in order to prevent certain cross-site attacks $xhr service now autodetects the prefix and strips it before deserializing the json. the implementation should be more flexible to allow for wider range of prefixes, but we need this one right now and can address other usecases later.
2011-02-15split up services into individual filesIgor Minar
- split up services into files under src/service - split up specs into files under test/service - rewrite all specs so that they don't depend on one global forEach - get rid of obsolete code and tests in ng:switch - rename mock $log spec from "$log" to "$log mock"