Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Fixure - success callback never called

$
0
0
     This works fine for me:
    1. $.fixture("/myuri", function(original, settings, headers){
    2.         return [200, "success",{
    3.             "notifications": [
    4.                 {
    5.                     "id": 1,
    6.                     "type": "TEST1",
    7.                     "data": {
    8.                         "test1": "testing1"
    9.                     }
    10.                 },
    11.                 {
    12.                     "id": 2,
    13.                     "type": "TEST2",
    14.                     "data": {
    15.                         "test2": "testing2"
    16.                     }
    17.                 }
    18.             ]
    19.         }, {} ]
    20.     });
    1. $.ajax({
    2.       url : '/myuri',
    3.       type : 'get',
    4.       contentType : 'application/json',
    5.       success : function(data){
    6.             steal.dev.log('fixture data:');
    7.             steal.dev.log(data);
    8.       }
    9. });

    Maybe try replacing the steal.dev.log with console.log() ?

    Viewing all articles
    Browse latest Browse all 3491

    Latest Images

    Trending Articles



    Latest Images