couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject fauxton commit: updated refs/heads/master to 9ee086e
Date Fri, 05 Sep 2014 16:48:13 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 7eca51c37 -> 9ee086eda


rename resourcesSpec.js to configSpec.js


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/9ee086ed
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/9ee086ed
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/9ee086ed

Branch: refs/heads/master
Commit: 9ee086eda959f060e27cb542e01774c96efcc697
Parents: 7eca51c
Author: Robert Kowalski <rok@kowalski.gd>
Authored: Fri Sep 5 18:49:49 2014 +0200
Committer: Robert Kowalski <rok@kowalski.gd>
Committed: Fri Sep 5 18:49:49 2014 +0200

----------------------------------------------------------------------
 app/addons/config/tests/configSpec.js    | 97 +++++++++++++++++++++++++++
 app/addons/config/tests/resourcesSpec.js | 97 ---------------------------
 2 files changed, 97 insertions(+), 97 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9ee086ed/app/addons/config/tests/configSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/config/tests/configSpec.js b/app/addons/config/tests/configSpec.js
new file mode 100644
index 0000000..8699e36
--- /dev/null
+++ b/app/addons/config/tests/configSpec.js
@@ -0,0 +1,97 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+define([
+      'api',
+      'addons/config/resources',
+      'addons/config/views',
+      'testUtils'
+], function (FauxtonAPI, Resources, Views, testUtils) {
+  var assert = testUtils.assert,
+      ViewSandbox = testUtils.ViewSandbox;
+
+  describe("Config: TableRow", function () {
+    var tabMenu, optionModel;
+
+    beforeEach(function () {
+      optionModel = new Resources.OptionModel({
+        section: "foo",
+        name: "bar"
+      });
+
+      tabMenu = new Views.TableRow({
+        model: optionModel,
+        uniqueName: function () {
+          return false;
+        }
+      });
+    });
+
+    describe("editing Items", function () {
+      var viewSandbox;
+      beforeEach(function (done) {
+        viewSandbox = new ViewSandbox();
+        viewSandbox.renderView(tabMenu, done);
+      });
+
+      afterEach(function () {
+        viewSandbox.remove();
+      });
+
+      it("click on save should save the model and render", function () {
+        var renderSpy = sinon.stub(tabMenu, 'render');
+        var saveSpy = sinon.stub(optionModel, 'save');
+
+        var $fields = tabMenu.$('.js-edit-value').filter(function (el) {
+          return $(this).find('[name="value"]').length;
+        });
+
+        $fields.find('.js-edit-value').trigger('dblclick');
+        $fields.find('.js-save-value').trigger('click');
+
+        assert.ok(renderSpy.calledOnce);
+        assert.ok(saveSpy.calledOnce);
+      });
+
+      it("pressing enter should save the model and render", function () {
+        var renderSpy = sinon.stub(tabMenu, 'render');
+        var saveSpy = sinon.stub(optionModel, 'save');
+
+        var e = $.Event("keyup");
+        e.keyCode = 13;
+
+        var $fields = tabMenu.$('.js-edit-value').filter(function (el) {
+          return $(this).find('[name="value"]').length;
+        });
+
+        $fields.find('.js-value-input').trigger(e);
+
+        assert.ok(renderSpy.calledOnce);
+        assert.ok(saveSpy.calledOnce);
+      });
+
+      it("pressing Esc hides the field", function () {
+        var e = $.Event("keyup");
+        e.keyCode = 27;
+        tabMenu.$('.js-value-input').trigger(e);
+
+        assert.ok(tabMenu.$('.js-edit-value-form').hasClass('js-hidden'));
+      });
+
+      it("pressing Cancel hides the field", function () {
+        tabMenu.$('.js-edit-value').trigger('dblclick');
+        tabMenu.$('.js-cancel-value').trigger('click');
+
+        assert.ok(tabMenu.$('.js-edit-value-form').hasClass('js-hidden'));
+      });
+    });
+  });
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9ee086ed/app/addons/config/tests/resourcesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/config/tests/resourcesSpec.js b/app/addons/config/tests/resourcesSpec.js
deleted file mode 100644
index 8699e36..0000000
--- a/app/addons/config/tests/resourcesSpec.js
+++ /dev/null
@@ -1,97 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-define([
-      'api',
-      'addons/config/resources',
-      'addons/config/views',
-      'testUtils'
-], function (FauxtonAPI, Resources, Views, testUtils) {
-  var assert = testUtils.assert,
-      ViewSandbox = testUtils.ViewSandbox;
-
-  describe("Config: TableRow", function () {
-    var tabMenu, optionModel;
-
-    beforeEach(function () {
-      optionModel = new Resources.OptionModel({
-        section: "foo",
-        name: "bar"
-      });
-
-      tabMenu = new Views.TableRow({
-        model: optionModel,
-        uniqueName: function () {
-          return false;
-        }
-      });
-    });
-
-    describe("editing Items", function () {
-      var viewSandbox;
-      beforeEach(function (done) {
-        viewSandbox = new ViewSandbox();
-        viewSandbox.renderView(tabMenu, done);
-      });
-
-      afterEach(function () {
-        viewSandbox.remove();
-      });
-
-      it("click on save should save the model and render", function () {
-        var renderSpy = sinon.stub(tabMenu, 'render');
-        var saveSpy = sinon.stub(optionModel, 'save');
-
-        var $fields = tabMenu.$('.js-edit-value').filter(function (el) {
-          return $(this).find('[name="value"]').length;
-        });
-
-        $fields.find('.js-edit-value').trigger('dblclick');
-        $fields.find('.js-save-value').trigger('click');
-
-        assert.ok(renderSpy.calledOnce);
-        assert.ok(saveSpy.calledOnce);
-      });
-
-      it("pressing enter should save the model and render", function () {
-        var renderSpy = sinon.stub(tabMenu, 'render');
-        var saveSpy = sinon.stub(optionModel, 'save');
-
-        var e = $.Event("keyup");
-        e.keyCode = 13;
-
-        var $fields = tabMenu.$('.js-edit-value').filter(function (el) {
-          return $(this).find('[name="value"]').length;
-        });
-
-        $fields.find('.js-value-input').trigger(e);
-
-        assert.ok(renderSpy.calledOnce);
-        assert.ok(saveSpy.calledOnce);
-      });
-
-      it("pressing Esc hides the field", function () {
-        var e = $.Event("keyup");
-        e.keyCode = 27;
-        tabMenu.$('.js-value-input').trigger(e);
-
-        assert.ok(tabMenu.$('.js-edit-value-form').hasClass('js-hidden'));
-      });
-
-      it("pressing Cancel hides the field", function () {
-        tabMenu.$('.js-edit-value').trigger('dblclick');
-        tabMenu.$('.js-cancel-value').trigger('click');
-
-        assert.ok(tabMenu.$('.js-edit-value-form').hasClass('js-hidden'));
-      });
-    });
-  });
-});


Mime
View raw message