aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert2017-05-02 12:15:09 +0200
committerRobert2017-05-02 16:44:25 +0200
commit3408fc0023e1c43359a0b52e249d6ce270f2f9d4 (patch)
tree942ea40e9fbb2bbad6082ef6bdf1124407ecde4a
parent9b95304792865eb05305d8fea01c634a5c5d1829 (diff)
downloadchouette-core-3408fc0023e1c43359a0b52e249d6ce270f2f9d4.tar.bz2
working on #3053 [amend me]
-rw-r--r--spec/lib/af83/stored_procedures/clone_schema_with_organisation_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/lib/af83/stored_procedures/clone_schema_with_organisation_spec.rb b/spec/lib/af83/stored_procedures/clone_schema_with_organisation_spec.rb
new file mode 100644
index 000000000..8a16f73c6
--- /dev/null
+++ b/spec/lib/af83/stored_procedures/clone_schema_with_organisation_spec.rb
@@ -0,0 +1,21 @@
+require 'spec_helper'
+
+RSpec.describe StoredProcedures do
+ context "clone schema with data" do
+ before do
+ seed_schema "source_schema"
+ end
+
+ context "before cloning source schema is set up correctly w/o target_schema" do
+ it "with two different organisations" do
+ expect(Organisation.count).to eq(2)
+ end
+ end
+ end
+
+ private
+ def seed_schema schema_name
+ source_org, target_org = 2.times.map{ create :organisation }
+
+ end
+end