Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(modal): fix messages on modal test failed
Browse files Browse the repository at this point in the history
- Change to use resolved & rejected values instead of promises in message
  • Loading branch information
onjiro authored and wesleycho committed Mar 16, 2015
1 parent 99af5f8 commit ab919f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modal/test/modal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('$modal', function () {
toBeResolvedWith: function(value) {
var resolved;
this.message = function() {
return 'Expected "' + angular.mock.dump(this.actual) + '" to be resolved with "' + value + '".';
return 'Expected "' + angular.mock.dump(resolved) + '" to be resolved with "' + value + '".';
};
this.actual.then(function(result){
resolved = result;
Expand All @@ -53,7 +53,7 @@ describe('$modal', function () {
toBeRejectedWith: function(value) {
var rejected;
this.message = function() {
return 'Expected "' + angular.mock.dump(this.actual) + '" to be rejected with "' + value + '".';
return 'Expected "' + angular.mock.dump(rejected) + '" to be rejected with "' + value + '".';
};
this.actual.then(angular.noop, function(reason){
rejected = reason;
Expand Down

0 comments on commit ab919f9

Please sign in to comment.