aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorAlban Peignier2018-02-22 19:18:26 +0100
committerAlban Peignier2018-02-22 19:18:26 +0100
commit02cd9a9e5d05ab9858e6de27e38cd6b56b919d69 (patch)
tree2537cfa43a2d1d99008f86bbd7756bb37a772e5e /spec
parent81ad0ea87ad2986cbad2a4ba98f2c2be194e0cee (diff)
downloadchouette-core-02cd9a9e5d05ab9858e6de27e38cd6b56b919d69.tar.bz2
Add a spec to verify to Referential migration count after creation. Refs #6010
Diffstat (limited to 'spec')
-rw-r--r--spec/models/referential_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/referential_spec.rb b/spec/models/referential_spec.rb
index 2d4649b87..025ad80f9 100644
--- a/spec/models/referential_spec.rb
+++ b/spec/models/referential_spec.rb
@@ -43,6 +43,16 @@ describe Referential, :type => :model do
end
end
+ context "schema creation" do
+
+ it "should create a schema named as the slug" do
+ referential = FactoryGirl.create :referential
+ expect(referential.migration_count).to be ActiveRecord::Migrator.get_all_versions.count
+ expect(referential.migration_count).to be > 300
+ end
+
+ end
+
context "Cloning referential" do
let(:clone) do
Referential.new_from(ref, [])