I have pasted the code in the js section of jsfiddle

You can see my spec testing my DetailCtrl, my DetailCtrl, and a part of my 
config using ui-router

http://jsfiddle.net/64VFd/

I have 10 json files in my data folder with file names like this 1.json, 
2.json, 3.json, 4.json, 5.json, 6.json, 7.json, 8.json, 9.json, 10.json

I made sure to inject $stateParams and $state into my jasmine test. There 
are images in these json files. I want to test that they exist. This the 
error that i am getting, 

Chrome 32.0.1700 (Mac OS X 10.8.4) Controllers Detail Ctrl the images for 
each listing should exist FAILED
Error: Unexpected request: GET data/undefined.json
Expected GET http://localhost:8000/#/listings/undefined

I am pretty sure that injecting $stateParams is enough to retrieve the 
listingId from my route configuration so I can loop through the json files 
and return (respond back with $httpbackend) then flush and then test but 
its not fetching each json file in turn. I have also tried to store the 
$stateParams and the listingId in its own variable to make it more 
explicit. Any help is very appreciated !

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to