diff options
| author | Robert | 2017-05-02 12:15:09 +0200 |
|---|---|---|
| committer | jpl | 2017-05-04 10:07:17 +0200 |
| commit | 2c320f8c407322a7307a03faf97cb7b3ce712bbd (patch) | |
| tree | 231e0516e469d2fe0850643c2a461bd4772c9236 /spec | |
| parent | ca9e0232169be60b32cd93f0d486a785ef429411 (diff) | |
| download | chouette-core-2c320f8c407322a7307a03faf97cb7b3ce712bbd.tar.bz2 | |
Refs #3053
passes current_organization down from the controller into Reference.new_from
adds joint models *ReferenceMemeberships to excluded Apartment models
Diffstat (limited to 'spec')
| -rw-r--r--[-rwxr-xr-x] | spec/lib/af83/stored_procedures/clone_schema_spec.rb | 5 | ||||
| -rw-r--r-- | spec/models/referential_spec.rb | 2 | ||||
| -rw-r--r-- | spec/spec_helper.rb | 7 |
3 files changed, 9 insertions, 5 deletions
diff --git a/spec/lib/af83/stored_procedures/clone_schema_spec.rb b/spec/lib/af83/stored_procedures/clone_schema_spec.rb index 4de3379ea..c387ddc7d 100755..100644 --- a/spec/lib/af83/stored_procedures/clone_schema_spec.rb +++ b/spec/lib/af83/stored_procedures/clone_schema_spec.rb @@ -13,7 +13,8 @@ RSpec.describe StoredProcedures do StoredProcedures.create_stored_procedure :clone_schema end - context "meta specs describe source schema's introspection" do + # :meta specs are not run, as the describe the testing methd and not the application + context "meta specs describe source schema's introspection", :meta do it "table information is correctly read" do expect(get_table_information(source_schema, child_table)) .to eq([{"table_schema"=>"source_schema", @@ -31,7 +32,7 @@ RSpec.describe StoredProcedures do expect( get_table_information(target_schema, child_table) ).to be_empty end - it "sequences are correctly read", :meta do + it "sequences are correctly read" do expect(get_sequences(source_schema, child_table)) .to eq([{"sequence_name"=>"#{child_table}_id_seq", "last_value"=>"1", diff --git a/spec/models/referential_spec.rb b/spec/models/referential_spec.rb index 7cf428eb0..2390cc470 100644 --- a/spec/models/referential_spec.rb +++ b/spec/models/referential_spec.rb @@ -27,7 +27,7 @@ describe Referential, :type => :model do context "Cloning referential" do let(:clone) do - Referential.new_from(ref) + Referential.new_from(ref, organisation: ref.organisation) end let(:saved_clone) do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f66d721c9..cda753efe 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -51,8 +51,11 @@ RSpec.configure do |config| #Capybara.exact = true Capybara.javascript_driver = :poltergeist - config.filter_run_excluding :js => true - config.filter_run :wip => true + # :meta tests can be run seperately in case of doubt about the tests themselves + # they serve mainly as an explanataion of complicated tests (as e.g. PG information_schema introspection) + config.filter_run_excluding :meta => true + config.filter_run_excluding :js => true + config.filter_run :wip => true config.run_all_when_everything_filtered = true config.include TokenInputHelper, :type => :feature |
