Skip to content

Instantly share code, notes, and snippets.

@thelinuxlich
Created August 27, 2012 15:21
Show Gist options
  • Save thelinuxlich/3489449 to your computer and use it in GitHub Desktop.
Save thelinuxlich/3489449 to your computer and use it in GitHub Desktop.
"Mudar status do item quando requisitado": function(){
this.xhr.respondWith([200, { "Content-Type": "application/json" },
'{"id": 1}']);
VM.itemNovo("Lavar a louça");
VM.adicionarItem();
this.xhr.respond();
VM.mudarStatusItem(VM.todoItens()[0]);
this.xhr.respond();
expect(VM.todoItens()[0].status()).toBe(true);
VM.mudarStatusItem(VM.todoItens()[0]);
this.xhr.respond();
expect(VM.todoItens()[0].status()).toBe(false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment