Skip to content

Commit

Permalink
made the click function above the jquery function in plots_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Souravirus committed Jul 8, 2018
1 parent 42c735c commit 9dcae48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/javascripts/plots2_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ describe("Plots2", function() {
});


$('#like-button-1').trigger('click');

// should trigger the following and our ajaxSpy should return a fake response of "4":
var response;
jQuery.getJSON("/likes/node/1/create").done(function(data){
response = data;
});

// then triggering like.js code
$('#like-button-1').trigger('click');

expect(response).to.eql('4');
//expect($('#like-count-1').html()).to.eql('4'); // passing
Expand Down

0 comments on commit 9dcae48

Please sign in to comment.