]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | describe("Ext.data.operation.Read", function() {\r |
2 | \r | |
3 | var op;\r | |
4 | \r | |
5 | function makeOperation(cfg) {\r | |
6 | op = new Ext.data.operation.Read(cfg);\r | |
7 | }\r | |
8 | \r | |
9 | afterEach(function() {\r | |
10 | op = null;\r | |
11 | });\r | |
12 | \r | |
13 | describe("execute", function() {\r | |
14 | it("should call the proxy read method and pass itself", function() {\r | |
15 | var proxy = new Ext.data.proxy.Proxy();\r | |
16 | spyOn(proxy, 'read').andReturn(new Ext.data.Request());\r | |
17 | makeOperation({\r | |
18 | proxy: proxy\r | |
19 | });\r | |
20 | op.execute();\r | |
21 | expect(proxy.read).toHaveBeenCalledWith(op);\r | |
22 | });\r | |
23 | }); \r | |
24 | });\r |