ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject ambari git commit: AMBARI-17762. Update tests (onechiporenko)
Date Mon, 18 Jul 2016 08:41:20 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 04676558d -> 492396bd3


AMBARI-17762. Update tests (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/492396bd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/492396bd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/492396bd

Branch: refs/heads/trunk
Commit: 492396bd325a1aa7a57f02489cbd12ce6e7cc33e
Parents: 0467655
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Mon Jul 18 11:39:26 2016 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Mon Jul 18 11:39:26 2016 +0300

----------------------------------------------------------------------
 .../stack_upgrade_history_controller_test.js    |  4 ++--
 .../test/controllers/wizard/step7_test.js       |  2 +-
 .../upgrade_history_details_view_test.js        |  1 -
 .../stack_upgrade/upgrade_history_view_test.js  | 24 +++++++++-----------
 4 files changed, 14 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/492396bd/ambari-web/test/controllers/main/admin/stack_upgrade_history_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_upgrade_history_controller_test.js
b/ambari-web/test/controllers/main/admin/stack_upgrade_history_controller_test.js
index bbfce19..6bd817b 100644
--- a/ambari-web/test/controllers/main/admin/stack_upgrade_history_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/stack_upgrade_history_controller_test.js
@@ -92,14 +92,14 @@ describe('App.MainAdminStackUpgradeHistoryController', function() {
           }
         ]};
       controller.loadUpgradeRecordSuccessCallback(data);
-      expect(controller.get('upgradeData') == null).to.be.false;
+      expect(controller.get('upgradeData')).to.be.not.null;
     });
 
     it("data is null", function() {
       var data = null;
       controller.set('upgradeData', null)
       controller.loadUpgradeRecordSuccessCallback(data);
-      expect(controller.get('upgradeData') == null).to.be.true;
+      expect(controller.get('upgradeData')).to.be.null;
     });
   });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/492396bd/ambari-web/test/controllers/wizard/step7_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js
index 94b222a..f54802e 100644
--- a/ambari-web/test/controllers/wizard/step7_test.js
+++ b/ambari-web/test/controllers/wizard/step7_test.js
@@ -1427,7 +1427,7 @@ describe('App.InstallerStep7Controller', function () {
         ]
       });
       installerStep7Controller.toggleIssuesFilter();
-      expect(installerStep7Controller.get('selectedService.serviceName')).to.eql('service2');
+      expect(installerStep7Controller.get('selectedService.serviceName')).to.be.equal('service2');
     });
   });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/492396bd/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_details_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_details_view_test.js
b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_details_view_test.js
index ab38e34..bfaa34e 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_details_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_details_view_test.js
@@ -19,7 +19,6 @@
 
 var App = require('app');
 require('views/main/admin/stack_upgrade/upgrade_history_details_view');
-var testHelpers = require('test/helpers');
 
 describe('App.MainAdminStackUpgradeHistoryDetailsView', function () {
   var view;

http://git-wip-us.apache.org/repos/asf/ambari/blob/492396bd/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
index d68a854..bb25d09 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
@@ -19,7 +19,6 @@
 
 var App = require('app');
 require('views/main/admin/stack_upgrade/upgrade_history_view');
-var testHelpers = require('test/helpers');
 
 describe('App.MainAdminStackUpgradeHistoryView', function () {
   var view;
@@ -63,32 +62,32 @@ describe('App.MainAdminStackUpgradeHistoryView', function () {
 
     it('All should return all records', function(){
       this.mock.returns(records);
-      var filteredResults = view.filterBy('ALL')
-      expect(filteredResults.length == 4).to.be.true
+      var filteredResults = view.filterBy('ALL');
+      expect(filteredResults).to.have.property('length').equal(4);
     });
 
     it('Filter aborted upgrades', function(){
       this.mock.returns(records);
-      var filteredResults = view.filterBy('UPGRADE_ABORTED')
-      expect(filteredResults.length == 1).to.be.true
+      var filteredResults = view.filterBy('UPGRADE_ABORTED');
+      expect(filteredResults).to.have.property('length').equal(1);
     });
 
     it('Filter completed upgrades', function(){
       this.mock.returns(records);
-      var filteredResults = view.filterBy('UPGRADE_COMPLETED')
-      expect(filteredResults.length == 1).to.be.true
+      var filteredResults = view.filterBy('UPGRADE_COMPLETED');
+      expect(filteredResults).to.have.property('length').equal(1);
     });
 
     it('Filter aborted downgrades', function(){
       this.mock.returns(records);
-      var filteredResults = view.filterBy('DOWNGRADE_ABORTED')
-      expect(filteredResults.length == 1).to.be.true
+      var filteredResults = view.filterBy('DOWNGRADE_ABORTED');
+      expect(filteredResults).to.have.property('length').equal(1);
     });
 
     it('Filter completed downgrades', function(){
       this.mock.returns(records);
-      var filteredResults = view.filterBy('DOWNGRADE_COMPLETED')
-      expect(filteredResults.length == 1).to.be.true
+      var filteredResults = view.filterBy('DOWNGRADE_COMPLETED');
+      expect(filteredResults).to.have.property('length').equal(1);
     });
   });
 
@@ -148,8 +147,7 @@ describe('App.MainAdminStackUpgradeHistoryView', function () {
       ]);
       view.selectCategory(event);
     });
-    afterEach(function () {
-    });
+
     it("categories[0].isSelected false", function() {
       expect(view.get('categories')[0].get('isSelected')).to.be.false;
     });


Mime
View raw message