summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-01-14 12:56:34 +0100
committerAzul <azul@leap.se>2014-01-14 12:56:34 +0100
commit93fc98f709f6682387227498f4413fda47e25c30 (patch)
tree01efdc5a228f9469f4ef6e3c24a81d91797aa0c1
parent566eee7fa3433af443ffe99449377ab935b8fcc7 (diff)
ensure auto_update_design_docs is false
-rw-r--r--core/config/initializers/couchrest_model.rb3
-rw-r--r--users/test/unit/user_test.rb5
2 files changed, 8 insertions, 0 deletions
diff --git a/core/config/initializers/couchrest_model.rb b/core/config/initializers/couchrest_model.rb
new file mode 100644
index 0000000..ce4f41a
--- /dev/null
+++ b/core/config/initializers/couchrest_model.rb
@@ -0,0 +1,3 @@
+CouchRest::Model::Base.configure do |config|
+ config.auto_update_design_doc = false
+end
diff --git a/users/test/unit/user_test.rb b/users/test/unit/user_test.rb
index c797623..ffbb7d8 100644
--- a/users/test/unit/user_test.rb
+++ b/users/test/unit/user_test.rb
@@ -7,6 +7,11 @@ class UserTest < ActiveSupport::TestCase
@user = FactoryGirl.build(:user)
end
+ test "design docs in database are authorative" do
+ assert !User.design_doc.auto_update,
+ "Automatic update of design docs should be disabled"
+ end
+
test "test set of attributes should be valid" do
@user.valid?
assert_equal Hash.new, @user.errors.messages