Commit 1babbd436d11f04d5d84e482cbe493b68c81f020
1 parent
2d1179b0
Exists in
colab
and in
4 other branches
Removed unused afterEach.
Improved sinon assert to verify if the call to $.post was made with specific parameters. Signed off by: Daniel Miranda <danielkza2@gmail.com>
Showing
1 changed file
with
1 additions
and
3 deletions
Show diff stats
spec/javascripts/module/graphic_spec.js.coffee
... | ... | @@ -39,8 +39,6 @@ describe "Module.Graphic", -> |
39 | 39 | |
40 | 40 | assert.isTrue(@drawer.slideUp.calledOnce) |
41 | 41 | |
42 | - after -> | |
43 | - | |
44 | 42 | describe 'load', -> |
45 | 43 | before -> |
46 | 44 | @graphic = new Module.Graphic(@container, @metric_name, @module_id) |
... | ... | @@ -50,7 +48,7 @@ describe "Module.Graphic", -> |
50 | 48 | |
51 | 49 | @graphic.load() |
52 | 50 | |
53 | - sinon.assert.calledOnce($.post) | |
51 | + sinon.assert.calledOnce($.post, '/modules/' + @module_id + '/metric_history', {metric_name: @metric_name, container: @container}) | |
54 | 52 | |
55 | 53 | describe 'display', -> |
56 | 54 | beforeEach -> | ... | ... |