From 33b59ecf9b9d4a400d3e351a6a0edfd0ef3629af Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 4 Jan 2024 11:03:18 +0000 Subject: [PATCH 001/334] upgrade rails to 4.1.6. Many query broken, but at least the web server start. --- Gemfile | 221 +++++----- Gemfile.lock | 465 ++++++++++---------- app/controllers/application_controller.rb | 4 +- app/controllers/registrations_controller.rb | 4 +- app/models/listing_change.rb | 2 - config/environments/development.rb | 64 +-- config/environments/production.rb | 89 ++-- config/environments/staging.rb | 89 ++-- config/environments/test.rb | 43 +- config/initializers/assets.rb | 10 + config/initializers/cookies_serializer.rb | 3 + config/initializers/mime_types.rb | 1 - config/initializers/secret_token.rb | 7 - public/403.html | 26 -- public/404.html | 61 ++- public/422.html | 61 ++- public/500.html | 59 ++- 17 files changed, 679 insertions(+), 530 deletions(-) create mode 100644 config/initializers/assets.rb create mode 100644 config/initializers/cookies_serializer.rb delete mode 100644 config/initializers/secret_token.rb delete mode 100644 public/403.html diff --git a/Gemfile b/Gemfile index c3520a1bca..7cbf592d3a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,78 +1,80 @@ source 'https://rubygems.org' -gem 'rails', '4.0.6' +ruby '2.3.1' + +gem 'rails', '4.1.16' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' -gem 'actionpack-action_caching' -gem 'actionpack-page_caching' -gem 'active_model_serializers', '~> 0.8.4' -gem 'activeresource' -gem 'dalli' -gem 'pg', '~> 0.17.1' -gem 'activeuuid', '~> 0.6.0' -gem 'pg_array_parser' +gem 'actionpack-action_caching', '1.2.0' +gem 'actionpack-page_caching', '1.1.1' +gem 'active_model_serializers', '0.8.4' +gem 'activeresource', '4.1.0' +gem 'dalli', '2.7.10' +gem 'pg', '0.17.1' +gem 'activeuuid', '0.6.1' # TODO: should remove when upgrade to Rails 6. +gem 'pg_array_parser', '0.0.9' # gem 'activerecord-postgres-hstore' -gem 'nested-hstore' -gem 'pg_search', '~> 0.6.0' # 0.5.7 -gem 'foreigner' -gem 'oj' # optimised JSON (picked by multi_json) -gem 'nokogiri', '>= 1.8.5' -gem 'inherited_resources', '~> 1.7.0' -gem 'traco', '~> 2.0.0' +gem 'nested-hstore', '0.0.5' +gem 'pg_search', '0.6.4' +gem 'foreigner', '1.5.0' +gem 'oj', '2.15.0' # optimised JSON (picked by multi_json) +gem 'nokogiri', '1.10.3' +gem 'inherited_resources', '1.7.2' # TODO: need upgrade when upgrade to Rails 5 +gem 'traco', '2.0.0' # gem 'strong_parameters' -gem 'protected_attributes' -gem 'devise', '~> 3.5.10' # '>= 3.5.4' -gem 'cancan' -gem 'ahoy_matey' -gem 'gon' -gem 'wicked', '~> 1.3.3' -gem 'groupdate' -gem "chartkick" -gem 'rubyzip', '>= 1.0.0' - -gem 'sidekiq', '< 5' -gem 'sidekiq-status' -gem 'sidekiq-unique-jobs', '~> 4.0.17' -gem 'redis-rails', '~> 4.0.0' - -gem 'whenever', :require => false -gem 'httparty' - -gem 'sprockets', '~> 2.12.5' # upgrading to 3 breaks handlebars/tilt -gem 'ember-rails', '~> 0.14.1' -gem 'ember-source', '~> 1.6.0' +gem 'protected_attributes', '1.1.4' # TODO: Only support Rails version < 5 (https://github.com/rails/protected_attributes) +gem 'devise', '4.0.0' +gem 'cancan', '1.6.10' +gem 'ahoy_matey', '1.0.1' +gem 'gon', '5.2.0' +gem 'wicked', '1.3.3' +gem 'groupdate', '2.4.0' +gem "chartkick", '1.3.2' +gem 'rubyzip', '1.1.7' + +gem 'sidekiq', '4.1.1' +gem 'sidekiq-status', '0.6.0' +gem 'sidekiq-unique-jobs', '4.0.18' +gem 'redis-rails', '4.0.0' + +gem 'whenever', '0.9.4', :require => false +gem 'httparty', '0.16.2' + +gem 'sprockets', '2.12.5' # upgrading to 3 breaks handlebars/tilt +gem 'ember-rails', '0.14.1' +gem 'ember-source', '1.6.1' gem 'ember-data-source', '0.14' gem 'handlebars-source', '1.0.12' gem 'jquery-rails', '2.1.4' # do not upgrade until https://github.com/jquery/jquery/pull/1142 isd pulled into jquery-rails -gem 'jquery-mousewheel-rails', '~> 0.0.9' -gem 'jquery-cookie-rails', '~> 1.3.1.1' -gem 'bootstrap-sass', '~> 2.3.2.2' -gem 'kaminari' -gem 'select2-rails', '~> 3.5.4' #initSelection deprecated on upgrade to version 4 -gem 'nested_form', '~> 0.3.2' -gem 'acts-as-taggable-on', '~> 4.0.0' -gem 'carrierwave' -gem 'prawn', '~> 0.13.2' -gem 'pdfkit' -gem 'wkhtmltopdf-binary', '~> 0.9.9' - -gem 'underscore-rails' -gem "font-awesome-rails" +gem 'jquery-mousewheel-rails', '0.0.9' +gem 'jquery-cookie-rails', '1.3.1.1' +gem 'bootstrap-sass', '2.3.2.2' +gem 'kaminari', '1.2.2' +gem 'select2-rails', '3.5.10' #initSelection deprecated on upgrade to version 4 +gem 'nested_form', '0.3.2' +gem 'acts-as-taggable-on', '4.0.0' +gem 'carrierwave', '0.10.0' +gem 'prawn', '0.13.2' +gem 'pdfkit', '0.8.4.2' +gem 'wkhtmltopdf-binary', '0.9.9.3' + +gem 'underscore-rails', '1.4.3' +gem "font-awesome-rails", '4.5.0.1' gem 'aws-sdk', '~> 2' -gem 'rails-observers' +gem 'rails-observers', '0.1.5' # TODO: a feature that removed since Rails 4... # Gems used for assets -gem 'sass-rails', '~> 5.0.0' -gem 'coffee-rails', '~> 4.0.0' +gem 'sass-rails', '5.0.7' +gem 'coffee-rails', '4.0.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby -gem 'uglifier', '>= 1.0.3' -gem 'susy', '~>2.2.14' +gem 'uglifier', '2.7.2' +gem 'susy', '2.2.14' # To use ActiveModel has_secure_password @@ -87,82 +89,81 @@ gem 'susy', '~>2.2.14' # To use debugger # gem 'ruby-debug19', :require => 'ruby-debug' -gem 'rest-client', require: false +gem 'rest-client', '1.8.0', require: false group :development do - gem "better_errors", '~>1.1.0' - gem "binding_of_caller", '>=0.7.2' - gem 'immigrant' - gem "guard-livereload" - gem "yajl-ruby" - gem "rack-livereload" - gem "guard-bundler" - gem 'annotate', ">=2.5.0" + gem "better_errors", '1.1.0' + gem 'immigrant', '0.1.4' + gem "guard-livereload", '1.1.3' + gem "yajl-ruby", '1.1.0' + gem "rack-livereload", '0.3.11' + gem "guard-bundler", '1.0.0' + gem 'annotate', "2.5.0" + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'spring' # TODO: upgrade when upgrade Ruby/Rails. # gem 'sextant' # Deploy with Capistrano - gem 'capistrano', '~> 3.11.0', require: false - gem 'capistrano-rails', '~> 1.4.0', require: false - gem 'capistrano-bundler', '~> 1.5.0', require: false - gem 'capistrano-rvm', '~> 0.1.2', require: false - gem 'capistrano-maintenance', '~> 1.0', require: false - gem 'capistrano-passenger', '~> 0.2.0', require: false - gem 'capistrano-local-precompile', '~> 1.2.0', require: false - gem 'capistrano-sidekiq' - gem 'slackistrano', require: false - gem 'brightbox', '>=2.3.9' - gem 'rack-cors', :require => 'rack/cors' - gem 'quiet_assets', '~> 1.1.0' + gem 'capistrano', '3.11.0', require: false + gem 'capistrano-rails', '1.4.0', require: false + gem 'capistrano-bundler', '1.5.0', require: false + gem 'capistrano-rvm', '0.1.2', require: false + gem 'capistrano-maintenance', '1.0.0', require: false + gem 'capistrano-passenger', '0.2.0', require: false + gem 'capistrano-local-precompile', '1.2.0', require: false + gem 'capistrano-sidekiq', '1.0.2' + gem 'slackistrano', '0.1.9', require: false + gem 'brightbox', '2.3.9' + gem 'rack-cors', '0.3.0' ,:require => 'rack/cors' # TODO: remove when upgrade Rails. + gem 'quiet_assets', '1.1.0' gem 'webrick', '1.3.1' - gem 'jslint_on_rails' - gem 'git_pretty_accept' - gem 'rubocop', '~> 0.40.0', require: false - gem 'rbnacl', '>= 3.2', '< 5.0' - gem 'rbnacl-libsodium' - gem 'bcrypt_pbkdf', '>= 1.0', '< 2.0' - gem 'ed25519', '>= 1.2', '< 2.0' + gem 'jslint_on_rails', '1.1.1' + gem 'rubocop', '0.40.0', require: false + gem 'rbnacl', '4.0.2' + gem 'rbnacl-libsodium', '1.0.16' + gem 'bcrypt_pbkdf', '1.1.0' + gem 'ed25519', '1.2.4' # @TODO: bring back when ruby updated to > 2.6 # gem 'net-ssh', '7.0.0.beta1' # openssl 3.0 compatibility @see https://stackoverflow.com/q/72068406/1090438 end group :test, :development do - gem "rspec-rails", '~> 3.0.1' - gem 'rspec-collection_matchers' - gem "rspec-mocks" + gem "rspec-rails", '3.0.2' + gem 'rspec-collection_matchers', '1.1.3' + gem "rspec-mocks", '3.0.4' gem "json_spec", '1.1.5' - gem "database_cleaner", ">=1.2.0" - gem "timecop" - gem "launchy" - gem 'byebug' + gem "database_cleaner", "1.2.0" # TODO, should remove after upgrade Rails. + gem "timecop", '0.6.3' + gem "launchy", '2.4.3' + gem 'byebug', '3.2.0' end group :test do - gem "codeclimate-test-reporter", require: nil - gem "factory_girl_rails", "~> 4.0" - gem 'simplecov', :require => false - gem 'coveralls', :require => false - gem 'capybara', '~> 2.2.0' + gem "codeclimate-test-reporter", '0.1.1', require: nil # TODO, should be removed + gem "factory_girl_rails", '4.2.1' + gem 'simplecov', '0.9.1', :require => false + gem 'coveralls', '0.7.1', :require => false + gem 'capybara', '2.2.1' end -gem 'rake', '~> 10.0.3' +gem 'rake', '10.0.4' -gem 'slim' +gem 'slim', '1.3.6' # if you require 'sinatra' you get the DSL extended to Object -gem 'sinatra', '>= 1.3.0', :require => nil +gem 'sinatra', '1.3.5', :require => nil -gem 'memcache-client' +gem 'memcache-client', '1.8.5' -gem 'jquery-ui-rails', '~> 4.1.0' +gem 'jquery-ui-rails', '4.1.2' -gem 'geoip' +gem 'geoip', '1.3.5' # track who created or edited a given object -gem 'clerk' -gem 'paper_trail', '~> 4.0' -gem 'request_store', '~> 1.1' +gem 'clerk', '0.2.2' +gem 'paper_trail', '4.2.0' +gem 'request_store', '1.3.2' -gem 'rails-secrets', '~> 1.0.2' -gem 'dotenv-rails' +gem 'dotenv-rails', '2.0.1' -gem 'sitemap_generator' +gem 'sitemap_generator', '5.1.0' -gem 'appsignal' -gem 'test-unit', '~> 3.1' # annoyingly, rails console won't start without it in staging / production +gem 'appsignal', '1.3.3' +gem 'test-unit', '3.1.5' # annoyingly, rails console won't start without it in staging / production diff --git a/Gemfile.lock b/Gemfile.lock index 1cc78f2727..0871ad19e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,31 +2,33 @@ GEM remote: https://rubygems.org/ specs: Ascii85 (1.0.3) - actionmailer (4.0.6) - actionpack (= 4.0.6) - mail (~> 2.5.4) - actionpack (4.0.6) - activesupport (= 4.0.6) - builder (~> 3.1.0) - erubis (~> 2.7.0) + actionmailer (4.1.16) + actionpack (= 4.1.16) + actionview (= 4.1.16) + mail (~> 2.5, >= 2.5.4) + actionpack (4.1.16) + actionview (= 4.1.16) + activesupport (= 4.1.16) rack (~> 1.5.2) rack-test (~> 0.6.2) actionpack-action_caching (1.2.0) actionpack (>= 4.0.0, < 6) actionpack-page_caching (1.1.1) actionpack (>= 4.0.0, < 6) + actionview (4.1.16) + activesupport (= 4.1.16) + builder (~> 3.1) + erubis (~> 2.7.0) active_model_serializers (0.8.4) activemodel (>= 3.0) - activemodel (4.0.6) - activesupport (= 4.0.6) - builder (~> 3.1.0) - activerecord (4.0.6) - activemodel (= 4.0.6) - activerecord-deprecated_finders (~> 1.0.2) - activesupport (= 4.0.6) - arel (~> 4.0.0) - activerecord-deprecated_finders (1.0.4) - activerecord-postgres-hstore (0.7.6) + activemodel (4.1.16) + activesupport (= 4.1.16) + builder (~> 3.1) + activerecord (4.1.16) + activemodel (= 4.1.16) + activesupport (= 4.1.16) + arel (~> 5.0.0) + activerecord-postgres-hstore (0.7.8) activerecord (>= 3.1) pg-hstore (>= 1.1.5) rake @@ -34,18 +36,19 @@ GEM activemodel (~> 4.0) activesupport (~> 4.0) rails-observers (~> 0.1.2) - activesupport (4.0.6) + activesupport (4.1.16) i18n (~> 0.6, >= 0.6.9) - minitest (~> 4.2) - multi_json (~> 1.3) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) thread_safe (~> 0.1) - tzinfo (~> 0.3.37) + tzinfo (~> 1.1) activeuuid (0.6.1) activerecord (>= 3.1) uuidtools acts-as-taggable-on (4.0.0) activerecord (>= 4.0) - addressable (2.3.6) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) afm (0.2.2) ahoy_matey (1.0.1) addressable @@ -55,39 +58,39 @@ GEM request_store user_agent_parser uuidtools - airbrussh (1.3.1) + airbrussh (1.5.0) sshkit (>= 1.6.1, != 1.7.0) annotate (2.5.0) rake appsignal (1.3.3) rack thread_safe - arel (4.0.2) - ast (2.2.0) - aws-sdk (2.6.44) - aws-sdk-resources (= 2.6.44) - aws-sdk-core (2.6.44) + arel (5.0.1.20140414130214) + ast (2.4.2) + aws-eventstream (1.2.0) + aws-sdk (2.11.632) + aws-sdk-resources (= 2.11.632) + aws-sdk-core (2.11.632) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-resources (2.6.44) - aws-sdk-core (= 2.6.44) - aws-sigv4 (1.0.0) + aws-sdk-resources (2.11.632) + aws-sdk-core (= 2.11.632) + aws-sigv4 (1.6.1) + aws-eventstream (~> 1, >= 1.0.2) barber (0.12.2) ember-source (>= 1.0, < 3.1) execjs (>= 1.2, < 3) - bcrypt (3.1.12) + bcrypt (3.1.20) bcrypt_pbkdf (1.1.0) better_errors (1.1.0) coderay (>= 1.0.0) erubis (>= 2.6.6) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) bootstrap-sass (2.3.2.2) sass (~> 3.2) brightbox (2.3.9) capistrano (>= 2.5) browser (0.6.0) - builder (3.1.4) + builder (3.2.4) byebug (3.2.0) columnize (~> 0.8) debugger-linecache (~> 1.2) @@ -133,7 +136,7 @@ GEM sentient_user (>= 0.3.3) codeclimate-test-reporter (0.1.1) simplecov (>= 0.7.1, < 1.0.0) - coderay (1.0.9) + coderay (1.1.3) coffee-rails (4.0.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) @@ -141,9 +144,9 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - columnize (0.8.9) - concurrent-ruby (1.1.5) - connection_pool (2.2.0) + columnize (0.9.0) + concurrent-ruby (1.2.2) + connection_pool (2.2.5) coveralls (0.7.1) multi_json (~> 1.3) rest-client @@ -152,26 +155,24 @@ GEM thor dalli (2.7.10) database_cleaner (1.2.0) - debug_inspector (0.0.2) debugger-linecache (1.2.0) - devise (3.5.10) + devise (4.0.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 3.2.6, < 5) + railties (>= 4.1.0, < 5.1) responders - thread_safe (~> 0.1) warden (~> 1.2.3) - diff-lcs (1.3) + diff-lcs (1.5.0) docile (1.1.5) - domain_name (0.5.20160216) + domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.0.1) dotenv-rails (2.0.1) dotenv (= 2.0.1) ed25519 (1.2.4) - em-websocket (0.4.0) + em-websocket (0.5.3) eventmachine (>= 0.12.9) - http_parser.rb (~> 0.5.3) + http_parser.rb (~> 0) ember-data-source (0.14) ember-source ember-rails (0.14.1) @@ -186,8 +187,8 @@ GEM ember-source (1.6.1) handlebars-source (~> 1.0) erubis (2.7.0) - eventmachine (1.0.7) - execjs (2.6.0) + eventmachine (1.2.7) + execjs (2.9.0) factory_girl (4.2.0) activesupport (>= 3.0.0) factory_girl_rails (4.2.1) @@ -198,12 +199,9 @@ GEM railties (>= 3.2, < 5.1) foreigner (1.5.0) activerecord (>= 3.0.0) - geocoder (1.2.2) + formatador (1.1.0) + geocoder (1.8.2) geoip (1.3.5) - git (1.2.6) - git_pretty_accept (0.3.1) - git - methadone (~> 1.3.1) gon (5.2.0) actionpack (>= 2.3.0) json @@ -211,11 +209,11 @@ GEM request_store (>= 1.0.5) groupdate (2.4.0) activesupport (>= 3) - guard (1.6.2) - listen (>= 0.6.0) + guard (1.8.3) + formatador (>= 0.2.4) + listen (~> 1.3) lumberjack (>= 1.0.2) pry (>= 0.9.10) - terminal-table (>= 1.4.3) thor (>= 0.14.6) guard-bundler (1.0.0) bundler (~> 1.0) @@ -225,14 +223,14 @@ GEM guard (>= 1.5.0) multi_json (~> 1.0) handlebars-source (1.0.12) - has_scope (0.6.0) - actionpack (>= 3.2, < 5) - activesupport (>= 3.2, < 5) + has_scope (0.7.2) + actionpack (>= 4.1) + activesupport (>= 4.1) hashery (2.1.2) hike (1.2.3) - http-cookie (1.0.2) + http-cookie (1.0.5) domain_name (~> 0.5) - http_parser.rb (0.5.3) + http_parser.rb (0.8.0) httparty (0.16.2) multi_xml (>= 0.5.2) i18n (0.9.5) @@ -245,7 +243,7 @@ GEM has_scope (~> 0.6) railties (>= 3.2, < 5.2.x) responders - jmespath (1.3.1) + jmespath (1.6.2) jquery-cookie-rails (1.3.1.1) railties (>= 3.2.0, < 5.0) jquery-mousewheel-rails (0.0.9) @@ -256,37 +254,48 @@ GEM jquery-ui-rails (4.1.2) railties (>= 3.1.0) jslint_on_rails (1.1.1) - json (2.2.0) + json (1.8.6) json_spec (1.1.5) multi_json (~> 1.0) rspec (>= 2.0, < 4.0) - kaminari (0.14.1) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) + kaminari (1.2.2) + activesupport (>= 4.1.0) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) + actionview + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) + activerecord + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) launchy (2.4.3) addressable (~> 2.3) - listen (0.7.2) - lumberjack (1.0.2) - mail (2.5.5) - mime-types (~> 1.16) - treetop (~> 1.4.8) + listen (1.3.1) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + rb-kqueue (>= 0.2) + lumberjack (1.2.10) + mail (2.7.1) + mini_mime (>= 0.1.1) memcache-client (1.8.5) - methadone (1.3.1) - bundler - method_source (0.8.1) - mime-types (1.25.1) + method_source (1.0.0) + mime-types (2.99.3) + mini_mime (1.1.2) mini_portile2 (2.4.0) - minitest (4.7.5) + minitest (5.15.0) multi_json (1.15.0) multi_xml (0.6.0) + mutex_m (0.1.2) nested-hstore (0.0.5) activerecord activerecord-postgres-hstore activesupport nested_form (0.3.2) - net-scp (2.0.0) - net-ssh (>= 2.6.5, < 6.0.0) - net-ssh (4.2.0) + net-scp (4.0.0) + net-ssh (>= 2.6.5, < 8.0.0) + net-ssh (6.1.0) netrc (0.11.0) nokogiri (1.10.3) mini_portile2 (~> 2.4.0) @@ -296,8 +305,8 @@ GEM activerecord (>= 3.0, < 6.0) activesupport (>= 3.0, < 6.0) request_store (~> 1.1) - parser (2.3.1.0) - ast (~> 2.2) + parser (2.7.2.0) + ast (~> 2.4.1) pdf-reader (1.4.1) Ascii85 (~> 1.0.0) afm (~> 0.2.1) @@ -312,53 +321,58 @@ GEM activerecord (>= 3.1) activesupport (>= 3.1) arel - polyglot (0.3.5) - power_assert (0.2.4) - powerpack (0.1.1) + power_assert (2.0.3) + powerpack (0.1.3) prawn (0.13.2) pdf-reader (~> 1.2) ruby-rc4 ttfunk (~> 1.0.3) protected_attributes (1.1.4) activemodel (>= 4.0.1, < 5.0) - pry (0.9.11.4) - coderay (~> 1.0.5) - method_source (~> 0.8) - slop (~> 3.4) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + public_suffix (4.0.7) quiet_assets (1.1.0) railties (>= 3.1, < 5.0) rack (1.5.5) rack-cors (0.3.0) rack-livereload (0.3.11) rack - rack-protection (1.4.0) + rack-protection (1.5.5) rack rack-test (0.6.3) rack (>= 1.0) - rails (4.0.6) - actionmailer (= 4.0.6) - actionpack (= 4.0.6) - activerecord (= 4.0.6) - activesupport (= 4.0.6) + rails (4.1.16) + actionmailer (= 4.1.16) + actionpack (= 4.1.16) + actionview (= 4.1.16) + activemodel (= 4.1.16) + activerecord (= 4.1.16) + activesupport (= 4.1.16) bundler (>= 1.3.0, < 2.0) - railties (= 4.0.6) + railties (= 4.1.16) sprockets-rails (~> 2.0) rails-observers (0.1.5) activemodel (>= 4.0) - rails-secrets (1.0.2) - rails (>= 3.2.0, <= 4.1.0) - railties (4.0.6) - actionpack (= 4.0.6) - activesupport (= 4.0.6) + railties (4.1.16) + actionpack (= 4.1.16) + activesupport (= 4.1.16) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (2.0.0) + rainbow (2.2.2) + rake rake (10.0.4) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rb-kqueue (0.2.8) + ffi (>= 0.5.0) rbnacl (4.0.2) ffi rbnacl-libsodium (1.0.16) rbnacl (>= 3.0.1) - redis (3.3.0) + redis (3.3.5) redis-actionpack (4.0.1) actionpack (~> 4) redis-rack (~> 1.5.0) @@ -375,7 +389,7 @@ GEM redis-store (~> 1.1.0) redis-store (1.1.7) redis (>= 2.2) - referer-parser (0.2.2) + referer-parser (0.3.0) request_store (1.3.2) responders (1.1.2) railties (>= 3.2, < 4.2) @@ -411,7 +425,7 @@ GEM rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - ruby-progressbar (1.7.5) + ruby-progressbar (1.13.0) ruby-rc4 (0.1.5) rubyzip (1.1.7) sass (3.4.25) @@ -423,7 +437,7 @@ GEM tilt (>= 1.1, < 3) select2-rails (3.5.10) thor (~> 0.14) - sentient_user (0.3.3) + sentient_user (0.4.0) railties (>= 3.1) sidekiq (4.1.1) concurrent-ruby (~> 1.0) @@ -451,7 +465,7 @@ GEM slim (1.3.6) temple (~> 0.5.5) tilt (~> 1.3.3) - slop (3.4.3) + spring (1.7.2) sprockets (2.12.5) hike (~> 1.2) multi_json (~> 1.0) @@ -461,39 +475,39 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) - sshkit (1.18.2) + sshkit (1.21.7) + mutex_m net-scp (>= 1.1.2) net-ssh (>= 2.8.0) susy (2.2.14) sass (>= 3.3.0, < 3.5) + sync (0.5.0) temple (0.5.5) - term-ansicolor (1.3.0) + term-ansicolor (1.7.1) tins (~> 1.0) - terminal-table (1.4.5) test-unit (3.1.5) power_assert thor (0.20.3) thread_safe (0.3.6) tilt (1.3.7) timecop (0.6.3) - tins (1.3.3) + tins (1.32.1) + sync traco (2.0.0) activerecord (>= 3.0) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) ttfunk (1.0.3) - tzinfo (0.3.46) + tzinfo (1.2.11) + thread_safe (~> 0.1) uglifier (2.7.2) execjs (>= 0.3.0) json (>= 1.8.0) underscore-rails (1.4.3) unf (0.1.4) unf_ext - unf_ext (0.0.7.2) - unicode-display_width (1.0.5) - user_agent_parser (2.1.5) - uuidtools (2.1.4) + unf_ext (0.0.9.1) + unicode-display_width (1.8.0) + user_agent_parser (2.5.1) + uuidtools (2.2.0) warden (1.2.7) rack (>= 1.0) webrick (1.3.1) @@ -510,118 +524,119 @@ PLATFORMS ruby DEPENDENCIES - actionpack-action_caching - actionpack-page_caching - active_model_serializers (~> 0.8.4) - activeresource - activeuuid (~> 0.6.0) - acts-as-taggable-on (~> 4.0.0) - ahoy_matey - annotate (>= 2.5.0) - appsignal + actionpack-action_caching (= 1.2.0) + actionpack-page_caching (= 1.1.1) + active_model_serializers (= 0.8.4) + activeresource (= 4.1.0) + activeuuid (= 0.6.1) + acts-as-taggable-on (= 4.0.0) + ahoy_matey (= 1.0.1) + annotate (= 2.5.0) + appsignal (= 1.3.3) aws-sdk (~> 2) - bcrypt_pbkdf (>= 1.0, < 2.0) - better_errors (~> 1.1.0) - binding_of_caller (>= 0.7.2) - bootstrap-sass (~> 2.3.2.2) - brightbox (>= 2.3.9) - byebug - cancan - capistrano (~> 3.11.0) - capistrano-bundler (~> 1.5.0) - capistrano-local-precompile (~> 1.2.0) - capistrano-maintenance (~> 1.0) - capistrano-passenger (~> 0.2.0) - capistrano-rails (~> 1.4.0) - capistrano-rvm (~> 0.1.2) - capistrano-sidekiq - capybara (~> 2.2.0) - carrierwave - chartkick - clerk - codeclimate-test-reporter - coffee-rails (~> 4.0.0) - coveralls - dalli - database_cleaner (>= 1.2.0) - devise (~> 3.5.10) - dotenv-rails - ed25519 (>= 1.2, < 2.0) + bcrypt_pbkdf (= 1.1.0) + better_errors (= 1.1.0) + bootstrap-sass (= 2.3.2.2) + brightbox (= 2.3.9) + byebug (= 3.2.0) + cancan (= 1.6.10) + capistrano (= 3.11.0) + capistrano-bundler (= 1.5.0) + capistrano-local-precompile (= 1.2.0) + capistrano-maintenance (= 1.0.0) + capistrano-passenger (= 0.2.0) + capistrano-rails (= 1.4.0) + capistrano-rvm (= 0.1.2) + capistrano-sidekiq (= 1.0.2) + capybara (= 2.2.1) + carrierwave (= 0.10.0) + chartkick (= 1.3.2) + clerk (= 0.2.2) + codeclimate-test-reporter (= 0.1.1) + coffee-rails (= 4.0.1) + coveralls (= 0.7.1) + dalli (= 2.7.10) + database_cleaner (= 1.2.0) + devise (= 4.0.0) + dotenv-rails (= 2.0.1) + ed25519 (= 1.2.4) ember-data-source (= 0.14) - ember-rails (~> 0.14.1) - ember-source (~> 1.6.0) - factory_girl_rails (~> 4.0) - font-awesome-rails - foreigner - geoip - git_pretty_accept - gon - groupdate - guard-bundler - guard-livereload + ember-rails (= 0.14.1) + ember-source (= 1.6.1) + factory_girl_rails (= 4.2.1) + font-awesome-rails (= 4.5.0.1) + foreigner (= 1.5.0) + geoip (= 1.3.5) + gon (= 5.2.0) + groupdate (= 2.4.0) + guard-bundler (= 1.0.0) + guard-livereload (= 1.1.3) handlebars-source (= 1.0.12) - httparty - immigrant - inherited_resources (~> 1.7.0) - jquery-cookie-rails (~> 1.3.1.1) - jquery-mousewheel-rails (~> 0.0.9) + httparty (= 0.16.2) + immigrant (= 0.1.4) + inherited_resources (= 1.7.2) + jquery-cookie-rails (= 1.3.1.1) + jquery-mousewheel-rails (= 0.0.9) jquery-rails (= 2.1.4) - jquery-ui-rails (~> 4.1.0) - jslint_on_rails + jquery-ui-rails (= 4.1.2) + jslint_on_rails (= 1.1.1) json_spec (= 1.1.5) - kaminari - launchy - memcache-client - nested-hstore - nested_form (~> 0.3.2) - nokogiri (>= 1.8.5) - oj - paper_trail (~> 4.0) - pdfkit - pg (~> 0.17.1) - pg_array_parser - pg_search (~> 0.6.0) - prawn (~> 0.13.2) - protected_attributes - quiet_assets (~> 1.1.0) - rack-cors - rack-livereload - rails (= 4.0.6) - rails-observers - rails-secrets (~> 1.0.2) - rake (~> 10.0.3) - rbnacl (>= 3.2, < 5.0) - rbnacl-libsodium - redis-rails (~> 4.0.0) - request_store (~> 1.1) - rest-client - rspec-collection_matchers - rspec-mocks - rspec-rails (~> 3.0.1) - rubocop (~> 0.40.0) - rubyzip (>= 1.0.0) - sass-rails (~> 5.0.0) - select2-rails (~> 3.5.4) - sidekiq (< 5) - sidekiq-status - sidekiq-unique-jobs (~> 4.0.17) - simplecov - sinatra (>= 1.3.0) - sitemap_generator - slackistrano - slim - sprockets (~> 2.12.5) - susy (~> 2.2.14) - test-unit (~> 3.1) - timecop - traco (~> 2.0.0) - uglifier (>= 1.0.3) - underscore-rails + kaminari (= 1.2.2) + launchy (= 2.4.3) + memcache-client (= 1.8.5) + nested-hstore (= 0.0.5) + nested_form (= 0.3.2) + nokogiri (= 1.10.3) + oj (= 2.15.0) + paper_trail (= 4.2.0) + pdfkit (= 0.8.4.2) + pg (= 0.17.1) + pg_array_parser (= 0.0.9) + pg_search (= 0.6.4) + prawn (= 0.13.2) + protected_attributes (= 1.1.4) + quiet_assets (= 1.1.0) + rack-cors (= 0.3.0) + rack-livereload (= 0.3.11) + rails (= 4.1.16) + rails-observers (= 0.1.5) + rake (= 10.0.4) + rbnacl (= 4.0.2) + rbnacl-libsodium (= 1.0.16) + redis-rails (= 4.0.0) + request_store (= 1.3.2) + rest-client (= 1.8.0) + rspec-collection_matchers (= 1.1.3) + rspec-mocks (= 3.0.4) + rspec-rails (= 3.0.2) + rubocop (= 0.40.0) + rubyzip (= 1.1.7) + sass-rails (= 5.0.7) + select2-rails (= 3.5.10) + sidekiq (= 4.1.1) + sidekiq-status (= 0.6.0) + sidekiq-unique-jobs (= 4.0.18) + simplecov (= 0.9.1) + sinatra (= 1.3.5) + sitemap_generator (= 5.1.0) + slackistrano (= 0.1.9) + slim (= 1.3.6) + spring + sprockets (= 2.12.5) + susy (= 2.2.14) + test-unit (= 3.1.5) + timecop (= 0.6.3) + traco (= 2.0.0) + uglifier (= 2.7.2) + underscore-rails (= 1.4.3) webrick (= 1.3.1) - whenever - wicked (~> 1.3.3) - wkhtmltopdf-binary (~> 0.9.9) - yajl-ruby + whenever (= 0.9.4) + wicked (= 1.3.3) + wkhtmltopdf-binary (= 0.9.9.3) + yajl-ruby (= 1.1.0) + +RUBY VERSION + ruby 2.3.1p112 BUNDLED WITH 1.17.3 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4c70ed0ed9..248dbef014 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -39,8 +39,8 @@ def access_denied_error(exception) def configure_permitted_parameters extra_parameters = [:name, :is_cites_authority, :organisation, :geo_entity_id] - devise_parameter_sanitizer.for(:sign_up).push(*extra_parameters) - devise_parameter_sanitizer.for(:account_update).push(*extra_parameters) + devise_parameter_sanitizer.permit(:sign_up).push(*extra_parameters) + devise_parameter_sanitizer.permit(:account_update).push(*extra_parameters) end private diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 68fb4e419a..a8d32a4a21 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -4,12 +4,12 @@ def update successfully_updated = if needs_password?(@user, params) - @user.update_with_password(devise_parameter_sanitizer.sanitize(:account_update)) + @user.update_with_password(devise_parameter_sanitizer.permit(:account_update)) else # remove the virtual current_password attribute # update_without_password doesn't know how to ignore it params[:user].delete(:current_password) - @user.update_without_password(devise_parameter_sanitizer.sanitize(:account_update)) + @user.update_without_password(devise_parameter_sanitizer.permit(:account_update)) end if successfully_updated diff --git a/app/models/listing_change.rb b/app/models/listing_change.rb index 98a6955b13..bf5d0c17ef 100644 --- a/app/models/listing_change.rb +++ b/app/models/listing_change.rb @@ -72,8 +72,6 @@ class ListingChange < ActiveRecord::Base joins(:change_type).where(:"change_types.designation_id" => designation_id) } - scope :none, -> { where("1 = 0") } - def effective_at_formatted effective_at ? effective_at.strftime('%d/%m/%Y') : '' end diff --git a/config/environments/development.rb b/config/environments/development.rb index cb760648ed..bf8ff92da1 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -6,55 +6,59 @@ # since you don't have to restart the web server when you make code changes. config.cache_classes = false - # Log error messages when you accidentally call methods on nil. - # config.whiny_nils = true + # Do not eager load code on boot. + config.eager_load = false - # Show full error reports and disable caching + # Show full error reports and disable caching. config.consider_all_requests_local = true - config.action_controller.perform_caching = true - config.cache_store = :redis_store + config.action_controller.perform_caching = false - # Don't care if the mailer can't send + # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false - config.action_mailer.default_url_options = { - host: Rails.application.secrets.mailer['host'] || 'http://localhost:3000' - } + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log - ActionMailer::Base.default from: Rails.application.secrets.mailer['from'] + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load - # config.action_mailer.delivery_method = :letter_opener - # Mail server configuration. Development use mailcatcher. - config.action_mailer.delivery_method = :smtp - config.action_mailer.smtp_settings = { address: Rails.application.secrets.mailer['address'], port: 1025 } + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log + # Adds additional error checking when serving assets at runtime. + # Checks for improperly declared sprockets dependencies. + # Raises helpful error messages. + config.assets.raise_runtime_errors = true - # Only use best-standards-support built into browsers - # config.action_dispatch.best_standards_support = :builtin + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true - # Raise exception on mass assignment protection for Active Record models + # TODO: Only support Rails version < 5 + # GEM `protected_attributes` settings (https://github.com/rails/protected_attributes#errors) config.active_record.mass_assignment_sanitizer = :strict - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 + # Custom cache settings + config.cache_store = :redis_store - # Do not compress assets - config.assets.js_compressor = false + # Custom ember settings + config.ember.variant = :development - # Expands the lines which load the assets - config.assets.debug = true + # Custom email settings + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { address: Rails.application.secrets.mailer['address'], port: 1025 } + config.action_mailer.default_url_options = { + host: Rails.application.secrets.mailer['host'] || 'http://localhost:3000' + } + ActionMailer::Base.default from: Rails.application.secrets.mailer['from'] + # CORS settings + # TODO: Rails 5 should build-in, need change this part when upgrade. config.middleware.use Rack::Cors do allow do origins '*' resource '*', :headers => :any, :methods => [:get, :post, :delete, :put, :options, :head] end end - - config.ember.variant = :development - - config.eager_load = false end diff --git a/config/environments/production.rb b/config/environments/production.rb index d5cc256cd9..8aee84b182 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,62 +1,86 @@ SAPI::Application.configure do # Settings specified here will take precedence over those in config/application.rb - # Code is not reloaded between requests + # Code is not reloaded between requests. config.cache_classes = true - # Full error reports are disabled and caching is turned on + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Disable Rails's static asset server (Apache or nginx will already do this) + # Enable Rack::Cache to put a simple HTTP cache in front of your application + # Add `rack-cache` to your Gemfile before enabling this. + # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. + # config.action_dispatch.rack_cache = true + + # Disable Rails's static asset server (Apache or nginx will already do this). config.serve_static_assets = false - # Compress JavaScripts and CSS + # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass - # Don't fallback to assets pipeline if a precompiled asset is missed + # Don't fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Generate digests for assets URLs + # Generate digests for assets URLs. config.assets.digest = true - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb - # Specifies the header that your server uses for sending files + # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # See everything in the log (default is :info) - # config.log_level = :debug + # Set to :debug to see everything in the log. + config.log_level = :warn # @see https://github.com/heartcombo/devise#password-reset-tokens-and-rails-logs - # Prepend all log lines with the following tags + # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] - # Use a different logger for distributed setups + # Use a different logger for distributed setups. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - # Use a different cache store in production + # Use a different cache store in production. config.cache_store = :mem_cache_store - # Enable serving of images, stylesheets, and JavaScripts from an asset server + # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = "http://assets.example.com" - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - config.assets.precompile += %w( vendor/* admin.js admin.css trade.js trade.css species.js species.css - pages.css pages.js cites_trade.js cites_trade.css - activities.css activities.js mobile.css) - - # Disable delivery errors, bad email addresses will be ignored + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false - # config.action_mailer.delivery_method = :smtp #for the mac apparently run::sudo postfix start - # Enable threaded mode - # config.threadsafe! + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + # config.i18n.fallbacks = true + config.i18n.fallbacks = false + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Disable automatic flushing of the log to improve performance. + # config.autoflush_log = false + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false + + # Custom ember settings + config.ember.variant = :production + # Custom email settings config.action_mailer.smtp_settings = { domain: Rails.application.secrets.mailer['domain'], address: Rails.application.secrets.mailer['address'], @@ -66,25 +90,8 @@ user_name: Rails.application.secrets.mailer['username'], password: Rails.application.secrets.mailer['password'] } - config.action_mailer.default_url_options = { host: Rails.application.secrets.mailer['host'] } - ActionMailer::Base.default from: Rails.application.secrets.mailer['from'] - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = false - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 - - config.ember.variant = :production - - config.eager_load = true end diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 415767b4c8..e2ca2af5db 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -1,64 +1,86 @@ SAPI::Application.configure do # Settings specified here will take precedence over those in config/application.rb - # Code is not reloaded between requests + # Code is not reloaded between requests. config.cache_classes = true - # Full error reports are disabled and caching is turned on + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true - config.cache_store = :redis_store - # Disable Rails's static asset server (Apache or nginx will already do this) + # Enable Rack::Cache to put a simple HTTP cache in front of your application + # Add `rack-cache` to your Gemfile before enabling this. + # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. + # config.action_dispatch.rack_cache = true + + # Disable Rails's static asset server (Apache or nginx will already do this). config.serve_static_assets = false - # Compress JavaScripts and CSS + # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass - # Don't fallback to assets pipeline if a precompiled asset is missed + # Don't fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - config.assets.js_compressor = :uglifier # Generate digests for assets URLs config.assets.digest = true - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb - # Specifies the header that your server uses for sending files + # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # See everything in the log (default is :info) - # config.log_level = :debug + # Set to :debug to see everything in the log. + config.log_level = :warn # @see https://github.com/heartcombo/devise#password-reset-tokens-and-rails-logs - # Prepend all log lines with the following tags + # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] - # Use a different logger for distributed setups + # Use a different logger for distributed setups. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - # Use a different cache store in production - # config.cache_store = :mem_cache_store + # Use a different cache store in staging. + config.cache_store = :redis_store - # Enable serving of images, stylesheets, and JavaScripts from an asset server + # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = "http://assets.example.com" - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - config.assets.precompile += %w( vendor/* admin.js admin.css trade.js trade.css species.js species.css - pages.css pages.js cites_trade.js cites_trade.css - activities.css activities.js mobile.css) - - # Disable delivery errors, bad email addresses will be ignored + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false - # config.action_mailer.delivery_method = :smtp #for the mac apparently run::sudo postfix start - # Enable threaded mode - # config.threadsafe! + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + # config.i18n.fallbacks = true + config.i18n.fallbacks = false + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Disable automatic flushing of the log to improve performance. + # config.autoflush_log = false + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false + # Custom ember settings + config.ember.variant = :production + + # Custom email settings config.action_mailer.smtp_settings = { domain: Rails.application.secrets.mailer['domain'], address: Rails.application.secrets.mailer['address'], @@ -68,23 +90,8 @@ user_name: Rails.application.secrets.mailer['username'], password: Rails.application.secrets.mailer['password'] } - config.action_mailer.default_url_options = { host: Rails.application.secrets.mailer['host'] } - ActionMailer::Base.default from: Rails.application.secrets.mailer['from'] - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = false - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 - - config.ember.variant = :production end diff --git a/config/environments/test.rb b/config/environments/test.rb index 519cacc9f0..4fee60957b 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -7,21 +7,24 @@ # and recreated between test runs. Don't rely on the data there! config.cache_classes = true - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + # config.eager_load = false + config.eager_load = true - # Log error messages when you accidentally call methods on nil - # config.whiny_nils = true + # Configure static asset server for tests with Cache-Control for performance. + config.serve_static_assets = true + config.static_cache_control = 'public, max-age=3600' - # Show full error reports and disable caching + # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false - # Raise exceptions instead of rendering exception templates + # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false - # Disable request forgery protection in test environment + # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false # Tell Action Mailer not to deliver emails to the real world. @@ -29,19 +32,25 @@ # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test - config.action_mailer.default_url_options = { - host: Rails.application.secrets.mailer['host'] - } + # Print deprecation notices to the stderr + config.active_support.deprecation = :stderr - ActionMailer::Base.default from: Rails.application.secrets.mailer['from'] + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true - # Raise exception on mass assignment protection for Active Record models + # TODO: Only support Rails version < 5 + # GEM `protected_attributes` settings (https://github.com/rails/protected_attributes#errors) config.active_record.mass_assignment_sanitizer = :strict - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr + # Custom cache settings + config.cache_store = :null_store + # Custom ember settings config.ember.variant = :development - config.cache_store = :null_store - config.eager_load = true + + # Custom email settings + config.action_mailer.default_url_options = { + host: Rails.application.secrets.mailer['host'] + } + ActionMailer::Base.default from: Rails.application.secrets.mailer['from'] end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 0000000000..5adf6bd379 --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,10 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +Rails.application.config.assets.precompile += %w( vendor/* admin.js admin.css trade.js trade.css species.js species.css + pages.css pages.js cites_trade.js cites_trade.css + activities.css activities.js mobile.css) diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb new file mode 100644 index 0000000000..7f70458dee --- /dev/null +++ b/config/initializers/cookies_serializer.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index 72aca7e441..dc1899682b 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -2,4 +2,3 @@ # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb deleted file mode 100644 index ea55480454..0000000000 --- a/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -SAPI::Application.config.secret_token = Rails.application.secrets.secret_key_base diff --git a/public/403.html b/public/403.html deleted file mode 100644 index 75aa4dd7bd..0000000000 --- a/public/403.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - Access forbidden - - - - - -
-

Access forbidden

-

You may not have the permissions to access this page.

-
- - diff --git a/public/404.html b/public/404.html index 9a48320a5f..2c12191098 100644 --- a/public/404.html +++ b/public/404.html @@ -1,26 +1,69 @@ + The page you were looking for doesn't exist (404) -
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+ diff --git a/public/422.html b/public/422.html index 83660ab187..ea2dac362d 100644 --- a/public/422.html +++ b/public/422.html @@ -1,26 +1,69 @@ + The change you wanted was rejected (422) -
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+ diff --git a/public/500.html b/public/500.html index f3648a0dbc..35bad156ab 100644 --- a/public/500.html +++ b/public/500.html @@ -1,25 +1,68 @@ + We're sorry, but something went wrong (500) -
-

We're sorry, but something went wrong.

+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+ From 905c0066cc31dd6dd09c5585cd0adb2df3ab9140 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 4 Jan 2024 11:43:30 +0000 Subject: [PATCH 002/334] https://guides.rubyonrails.org/v4.1/upgrading_ruby_on_rails.html section 2.2, 2.5, 2.10 --- app/views/shared/_alerts.html.erb | 5 ++++- bin/rails | 11 +++++++++++ bin/rake | 8 ++++++++ bin/spring | 15 +++++++++++++++ config/application.rb | 2 -- config/initializers/cookies_serializer.rb | 3 ++- 6 files changed, 40 insertions(+), 4 deletions(-) create mode 100755 bin/rails create mode 100755 bin/rake create mode 100755 bin/spring diff --git a/app/views/shared/_alerts.html.erb b/app/views/shared/_alerts.html.erb index 8521b876e4..09374096f3 100644 --- a/app/views/shared/_alerts.html.erb +++ b/app/views/shared/_alerts.html.erb @@ -1,5 +1,8 @@ <% flash.each do |name, msg| %> - <%= content_tag :div, :class => "alert #{[:error, :alert].include?(name) ? "alert-error" : "alert-success" }" do %> + <% + # https://guides.rubyonrails.org/v4.1/upgrading_ruby_on_rails.html#flash-structure-changes + %> + <%= content_tag :div, :class => "alert #{["error", "alert"].include?(name.to_s) ? "alert-error" : "alert-success" }" do %> × <%= msg %> <% end %> diff --git a/bin/rails b/bin/rails new file mode 100755 index 0000000000..91546f2ed3 --- /dev/null +++ b/bin/rails @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. + +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) +require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 0000000000..615dea9089 --- /dev/null +++ b/bin/rake @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +require 'bundler/setup' +load Gem.bin_path('rake', 'rake') diff --git a/bin/spring b/bin/spring new file mode 100755 index 0000000000..7fe232c3aa --- /dev/null +++ b/bin/spring @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast. +# It gets overwritten when you run the `spring binstub` command. + +unless defined?(Spring) + require 'rubygems' + require 'bundler' + + if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)) + Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) } + gem 'spring', match[1] + require 'spring/binstub' + end +end diff --git a/config/application.rb b/config/application.rb index 1698a05142..7338884eaa 100644 --- a/config/application.rb +++ b/config/application.rb @@ -45,8 +45,6 @@ class Application < Rails::Application # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' - config.i18n.enforce_available_locales = true - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index 7f70458dee..ad39a37501 100644 --- a/config/initializers/cookies_serializer.rb +++ b/config/initializers/cookies_serializer.rb @@ -1,3 +1,4 @@ # Be sure to restart your server when you modify this file. -Rails.application.config.action_dispatch.cookies_serializer = :json +# https://guides.rubyonrails.org/v4.1/upgrading_ruby_on_rails.html#cookies-serializer +Rails.application.config.action_dispatch.cookies_serializer = :hybrid From b684c562d131a1435a68046d852bf71dfe23cb25 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 4 Jan 2024 12:01:24 +0000 Subject: [PATCH 003/334] https://guides.rubyonrails.org/v4.1/upgrading_ruby_on_rails.html#mutator-methods-called-on-relation --- app/controllers/admin/references_controller.rb | 2 +- app/controllers/checklist/downloads_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/references_controller.rb b/app/controllers/admin/references_controller.rb index 5c33740b65..10c28ce53f 100644 --- a/app/controllers/admin/references_controller.rb +++ b/app/controllers/admin/references_controller.rb @@ -13,7 +13,7 @@ def index def autocomplete @references = Reference.search(params[:query]). order(:citation) - @references.map! do |r| + @references = @references.map do |r| { :id => r.id, :value => r.citation diff --git a/app/controllers/checklist/downloads_controller.rb b/app/controllers/checklist/downloads_controller.rb index 23690e82b3..77326b0357 100644 --- a/app/controllers/checklist/downloads_controller.rb +++ b/app/controllers/checklist/downloads_controller.rb @@ -7,7 +7,7 @@ class Checklist::DownloadsController < ApplicationController def index ids = params[:ids] || "" @downloads = Download.where(:id => ids).order('updated_at DESC').limit(5) - @downloads.map! { |v| v.attributes.except("filename", "path") } + @downloads = @downloads.map { |v| v.attributes.except("filename", "path") } @downloads.each do |v| v["updated_at"] = v["updated_at"].strftime("%A, %e %b %Y %H:%M") end From 6ee65bf0eec72574cbb201ae6a9c80d0b6c8d3f1 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 4 Jan 2024 12:37:14 +0000 Subject: [PATCH 004/334] https://guides.rubyonrails.org/v4.1/upgrading_ruby_on_rails.html#rendering-content-from-string --- app/controllers/admin/designations_controller.rb | 2 +- app/controllers/admin/events_controller.rb | 2 +- app/controllers/admin/instruments_controller.rb | 2 +- app/controllers/admin/references_controller.rb | 2 +- app/controllers/admin/taxonomies_controller.rb | 2 +- app/controllers/checklist/downloads_controller.rb | 10 +++++----- app/controllers/checklist/taxon_concepts_controller.rb | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/controllers/admin/designations_controller.rb b/app/controllers/admin/designations_controller.rb index 6a2fe8a7db..0860b30a3c 100644 --- a/app/controllers/admin/designations_controller.rb +++ b/app/controllers/admin/designations_controller.rb @@ -6,7 +6,7 @@ def index @custom_title = 'MEAs' index! do |format| format.json { - render :text => end_of_association_chain.order(:name). + render :json => end_of_association_chain.order(:name). select([:id, :name]).map { |d| { :value => d.id, :text => d.name } }.to_json } end diff --git a/app/controllers/admin/events_controller.rb b/app/controllers/admin/events_controller.rb index cc079c2a94..2e88f79bb5 100644 --- a/app/controllers/admin/events_controller.rb +++ b/app/controllers/admin/events_controller.rb @@ -6,7 +6,7 @@ def index load_associations index! do |format| format.json { - render :text => end_of_association_chain.order(:effective_at, :name). + render :json => end_of_association_chain.order(:effective_at, :name). select([:id, :name]).map { |d| { :value => d.id, :text => d.name } }.to_json } end diff --git a/app/controllers/admin/instruments_controller.rb b/app/controllers/admin/instruments_controller.rb index 25c3c76326..746c93f7cb 100644 --- a/app/controllers/admin/instruments_controller.rb +++ b/app/controllers/admin/instruments_controller.rb @@ -5,7 +5,7 @@ def index load_associations index! do |format| format.json { - render :text => end_of_association_chain.order(:name). + render :json => end_of_association_chain.order(:name). select([:id, :name]).map { |d| { :value => d.id, :text => d.name } }.to_json } end diff --git a/app/controllers/admin/references_controller.rb b/app/controllers/admin/references_controller.rb index 10c28ce53f..d9db02c3db 100644 --- a/app/controllers/admin/references_controller.rb +++ b/app/controllers/admin/references_controller.rb @@ -4,7 +4,7 @@ class Admin::ReferencesController < Admin::StandardAuthorizationController def index index! do |format| format.json { - render :text => end_of_association_chain.order(:citation). + render :json => end_of_association_chain.order(:citation). select([:id, :citation]).map { |d| { :value => d.id, :text => d.citation } }.to_json } end diff --git a/app/controllers/admin/taxonomies_controller.rb b/app/controllers/admin/taxonomies_controller.rb index d16cc989c9..33d1ef7ece 100644 --- a/app/controllers/admin/taxonomies_controller.rb +++ b/app/controllers/admin/taxonomies_controller.rb @@ -4,7 +4,7 @@ class Admin::TaxonomiesController < Admin::StandardAuthorizationController def index index! do |format| format.json { - render :text => end_of_association_chain.order(:name). + render :json => end_of_association_chain.order(:name). select([:id, :name]).map { |d| { :value => d.id, :text => d.name } }.to_json } end diff --git a/app/controllers/checklist/downloads_controller.rb b/app/controllers/checklist/downloads_controller.rb index 77326b0357..b2dfbeaf4d 100644 --- a/app/controllers/checklist/downloads_controller.rb +++ b/app/controllers/checklist/downloads_controller.rb @@ -12,7 +12,7 @@ def index v["updated_at"] = v["updated_at"].strftime("%A, %e %b %Y %H:%M") end - render :text => @downloads.to_json + render :json => @downloads.to_json end # POST downloads/ @@ -27,14 +27,14 @@ def create @download = @download.attributes.except("filename", "path") @download["updated_at"] = @download["updated_at"].strftime("%A, %e %b %Y %H:%M") - render :text => @download.to_json + render :json => @download.to_json end # GET downloads/:id/ def show @download = Download.find(params[:id]) - render :text => { status: @download.status }.to_json + render :json => { status: @download.status } end # GET downloads/:id/download @@ -53,7 +53,7 @@ def download :filename => @download.filename, :type => @download.format) else - render :text => { error: "Download not processed" }.to_json + render :json => { error: "Download not processed" } end end @@ -90,7 +90,7 @@ def send_download end def not_found - render :text => { error: "No downloads available" }.to_json + render :json => { error: "No downloads available" } end end diff --git a/app/controllers/checklist/taxon_concepts_controller.rb b/app/controllers/checklist/taxon_concepts_controller.rb index a750ce9e75..b632c68971 100644 --- a/app/controllers/checklist/taxon_concepts_controller.rb +++ b/app/controllers/checklist/taxon_concepts_controller.rb @@ -23,7 +23,7 @@ def autocomplete end def summarise_filters - render :text => Checklist::Checklist.new(params).summarise_filters + render :plain => Checklist::Checklist.summarise_filters(params) end private From 7fc48bd7ab7f9ac590782e14b0b22c2a9419595f Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 4 Jan 2024 14:33:37 +0000 Subject: [PATCH 005/334] Implicit joins https://www.fastruby.io/blog/rails/upgrades/upgrade-rails-from-4-0-to-4-1.html#active-record --- app/serializers/species/show_taxon_concept_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/species/show_taxon_concept_serializer.rb b/app/serializers/species/show_taxon_concept_serializer.rb index e5f9e9a9a5..702d577a47 100644 --- a/app/serializers/species/show_taxon_concept_serializer.rb +++ b/app/serializers/species/show_taxon_concept_serializer.rb @@ -156,7 +156,7 @@ def cache_key end def nomenclature_notification - outputs = NomenclatureChange::Output.includes("nomenclature_change").where( + outputs = NomenclatureChange::Output.includes(:nomenclature_change).references(:nomenclature_change).where( " (taxon_concept_id = ? OR new_taxon_concept_id = ?) AND nomenclature_changes.created_at > ? AND nomenclature_changes.status = 'submitted' From 0b4ac9ec43c77cfa0d4ffe422d8706b869574ebb Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 4 Jan 2024 15:56:31 +0000 Subject: [PATCH 006/334] rollback devise change, until we find a way to test. Add comment for now --- app/controllers/application_controller.rb | 5 +++-- app/controllers/registrations_controller.rb | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 248dbef014..57994c14c0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -38,9 +38,10 @@ def access_denied_error(exception) end def configure_permitted_parameters + # TODO: deprecations https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#400rc1---2016-02-01 extra_parameters = [:name, :is_cites_authority, :organisation, :geo_entity_id] - devise_parameter_sanitizer.permit(:sign_up).push(*extra_parameters) - devise_parameter_sanitizer.permit(:account_update).push(*extra_parameters) + devise_parameter_sanitizer.for(:sign_up).push(*extra_parameters) + devise_parameter_sanitizer.for(:account_update).push(*extra_parameters) end private diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index a8d32a4a21..b84a68717f 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -4,12 +4,14 @@ def update successfully_updated = if needs_password?(@user, params) - @user.update_with_password(devise_parameter_sanitizer.permit(:account_update)) + # TODO: deprecations https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#400rc1---2016-02-01 + @user.update_with_password(devise_parameter_sanitizer.sanitize(:account_update)) else # remove the virtual current_password attribute # update_without_password doesn't know how to ignore it params[:user].delete(:current_password) - @user.update_without_password(devise_parameter_sanitizer.permit(:account_update)) + # TODO: deprecations https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#400rc1---2016-02-01 + @user.update_without_password(devise_parameter_sanitizer.sanitize(:account_update)) end if successfully_updated From 15fb9d3e4ed888b852de215632afdc0febf07199 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 4 Jan 2024 16:40:55 +0000 Subject: [PATCH 007/334] keep devise 4 default value --- config/initializers/devise.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 371de896dc..cb44a8a1a3 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -120,6 +120,7 @@ # db field (see migrations). Until confirmed, new email is stored in # unconfirmed_email column, and copied to email column on successful confirmation. # config.reconfirmable = true + config.reconfirmable = false # Keep Devise 4.0 default value 'false'. Devise 4.1 default value changed to true. # Defines which key will be used when confirming an account # config.confirmation_keys = [ :email ] @@ -142,7 +143,7 @@ # Email regex used to validate email formats. It simply asserts that # one (and only one) @ exists in the given string. This is mainly # to give user feedback and not to assert the e-mail validity. - # config.email_regexp = /\A[^@]+@[^@]+\z/ + config.email_regexp = /\A[^@\s]+@([^@\s]+\.)+[^@\W]+\z/ # Keep Devise 4.0 default value. 4.1 has new default value. # ==> Configuration for :timeoutable # The time you want to timeout the user session without activity. After this From 45bfba82558dd845859886476d397faa38822fda Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 4 Jan 2024 17:26:32 +0000 Subject: [PATCH 008/334] Don't use redis cache. Should not share redis server with sidekiq. The default redis eviction policies is noeviction, which not for cache. --- config/environments/development.rb | 2 +- config/environments/staging.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index bf8ff92da1..ca3dd5acb7 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -40,7 +40,7 @@ config.active_record.mass_assignment_sanitizer = :strict # Custom cache settings - config.cache_store = :redis_store + config.cache_store = :memory_store, { size: 64.megabytes } # Custom ember settings config.ember.variant = :development diff --git a/config/environments/staging.rb b/config/environments/staging.rb index e2ca2af5db..3024161223 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -51,7 +51,7 @@ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in staging. - config.cache_store = :redis_store + config.cache_store = :memory_store, { size: 64.megabytes } # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = "http://assets.example.com" From 239067a274b8fb6b8abef9540ba9faedda2a0a03 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Mon, 8 Jan 2024 15:10:21 +0000 Subject: [PATCH 009/334] make sure FROM xxx AS yyy in SQL (AS is needed for Arel) --- app/controllers/api/v1/eu_decisions_controller.rb | 2 +- app/controllers/trade/statistics_controller.rb | 2 +- app/models/api_request.rb | 2 +- app/models/document_search.rb | 8 ++++---- app/models/events_by_type_stats.rb | 2 +- .../nomenclature_change/cascading_notes_processor.rb | 2 +- app/models/species/documents_export.rb | 2 +- app/models/species/id_manual_documents_export.rb | 2 +- app/models/taxon_concept.rb | 2 +- app/models/trade/filter.rb | 2 +- app/models/trade/inclusion_validation_rule.rb | 4 ++-- .../species/show_taxon_concept_serializer.rb | 6 +++--- .../species/show_taxon_concept_serializer_cites.rb | 10 +++++----- .../species/show_taxon_concept_serializer_cms.rb | 2 +- lib/modules/trade/appendix_report.rb | 2 +- lib/modules/trade/grouping/trade_plus_static.rb | 2 +- .../species_without_legislation_or_trade_report.rb | 2 +- 17 files changed, 27 insertions(+), 27 deletions(-) diff --git a/app/controllers/api/v1/eu_decisions_controller.rb b/app/controllers/api/v1/eu_decisions_controller.rb index b77978e2e1..bb132a17cc 100644 --- a/app/controllers/api/v1/eu_decisions_controller.rb +++ b/app/controllers/api/v1/eu_decisions_controller.rb @@ -16,7 +16,7 @@ def permitted_params end def eu_decision_search(params) - list = EuDecision.from('api_eu_decisions_view eu_decisions'). + list = EuDecision.from('api_eu_decisions_view AS eu_decisions'). select(eu_decision_select_attrs). joins('LEFT JOIN eu_suspensions_applicability_view v ON eu_decisions.id = v.id'). order(<<-SQL diff --git a/app/controllers/trade/statistics_controller.rb b/app/controllers/trade/statistics_controller.rb index 52032bcb07..5bacbbed14 100644 --- a/app/controllers/trade/statistics_controller.rb +++ b/app/controllers/trade/statistics_controller.rb @@ -14,7 +14,7 @@ def index where("created_at::DATE BETWEEN ? AND ?", @start_date, @end_date). where('created_at != updated_at'). count - @taxon_concepts_in_trade = Trade::Shipment.from('(SELECT taxon_concept_id FROM trade_shipments GROUP BY taxon_concept_id) s').count + @taxon_concepts_in_trade = Trade::Shipment.from('(SELECT taxon_concept_id FROM trade_shipments GROUP BY taxon_concept_id) AS s').count end def summary_creation diff --git a/app/models/api_request.rb b/app/models/api_request.rb index a49d2fdd74..1e4259ae2c 100644 --- a/app/models/api_request.rb +++ b/app/models/api_request.rb @@ -40,7 +40,7 @@ def self.top_50_most_active_users ] ).group(:user_id). where('user_id IS NOT NULL') - self.from("(#{subquery.to_sql}) api_requests"). + self.from("(#{subquery.to_sql}) AS api_requests"). order('cnt DESC').limit(50) end diff --git a/app/models/document_search.rb b/app/models/document_search.rb index beb8ed8f61..5ae49b7ecc 100644 --- a/app/models/document_search.rb +++ b/app/models/document_search.rb @@ -56,7 +56,7 @@ def initialize_params(options) end def initialize_query - @query = Document.from("#{table_name} documents") + @query = Document.from("#{table_name} AS documents") @query = @query.where(is_public: true) unless @show_private add_conditions_for_event add_conditions_for_document @@ -202,7 +202,7 @@ def select_and_group_query ) AS document_language_versions SQL @query = Document.from( - '(' + @query.to_sql + ') documents' + '(' + @query.to_sql + ') AS documents' ).select(columns + "," + aggregators).group(columns) end @@ -230,13 +230,13 @@ def locale_document def self.documents_need_refreshing? Document.where('updated_at > ?', REFRESH_INTERVAL.minutes.ago).limit(1).count > 0 || - Document.count < Document.from('api_documents_mview documents').count + Document.count < Document.from('api_documents_mview AS documents').count end def self.citations_need_refreshing? DocumentCitation.where('updated_at > ?', REFRESH_INTERVAL.minutes.ago).limit(1).count > 0 || DocumentCitation.count < DocumentCitation.select('DISTINCT id'). - from('document_citations_mview citations').count + from('document_citations_mview AS citations').count end def self.refresh_documents diff --git a/app/models/events_by_type_stats.rb b/app/models/events_by_type_stats.rb index fe531553dc..af3d514b84 100644 --- a/app/models/events_by_type_stats.rb +++ b/app/models/events_by_type_stats.rb @@ -29,7 +29,7 @@ def data AND w.end_date > ahoy_events.time GROUP BY start_date ORDER BY start_date - ) q + ) AS q SQL ).select([:start_date, :taxon_concept_cnt, :search_cnt]) end diff --git a/app/models/nomenclature_change/cascading_notes_processor.rb b/app/models/nomenclature_change/cascading_notes_processor.rb index c5da1fe666..d5c3d2b50d 100644 --- a/app/models/nomenclature_change/cascading_notes_processor.rb +++ b/app/models/nomenclature_change/cascading_notes_processor.rb @@ -77,7 +77,7 @@ def descendents_for_note_cascading(taxon_concept) :sanitize_sql_array, [subquery, taxon_concept_id: taxon_concept.id] ) TaxonConcept.from( - "(#{sanitized_subquery}) taxon_concepts" + "(#{sanitized_subquery}) AS taxon_concepts" ) end diff --git a/app/models/species/documents_export.rb b/app/models/species/documents_export.rb index cb67639890..09b67aa6cd 100644 --- a/app/models/species/documents_export.rb +++ b/app/models/species/documents_export.rb @@ -1,7 +1,7 @@ class Species::DocumentsExport < Species::CsvCopyExport def query - rel = Document.from("#{table_name} documents"). + rel = Document.from("#{table_name} AS documents"). order('event_type, date_raw, title') rel.select(sql_columns) end diff --git a/app/models/species/id_manual_documents_export.rb b/app/models/species/id_manual_documents_export.rb index fbc35e5402..dbea909b4c 100644 --- a/app/models/species/id_manual_documents_export.rb +++ b/app/models/species/id_manual_documents_export.rb @@ -1,7 +1,7 @@ class Species::IdManualDocumentsExport < Species::CsvCopyExport def query - rel = Document.from("#{table_name} documents") + rel = Document.from("#{table_name} AS documents") .where(document_type: ['Document::IdManual', 'Document::VirtualCollege']) .order('volume, manual_id') rel.select(sql_columns) diff --git a/app/models/taxon_concept.rb b/app/models/taxon_concept.rb index d40fdd39a3..9eb2da6797 100644 --- a/app/models/taxon_concept.rb +++ b/app/models/taxon_concept.rb @@ -321,7 +321,7 @@ def eu_listed end def standard_taxon_concept_references - TaxonConceptReference.from('api_taxon_references_view taxon_concept_references'). + TaxonConceptReference.from('api_taxon_references_view AS taxon_concept_references'). where(taxon_concept_id: self.id, is_standard: true) end diff --git a/app/models/trade/filter.rb b/app/models/trade/filter.rb index 7e7b612c00..7ed83f13d4 100644 --- a/app/models/trade/filter.rb +++ b/app/models/trade/filter.rb @@ -26,7 +26,7 @@ def initialize_params(options) end def initialize_query - @query = Trade::Shipment.from("#{@shipments_view} trade_shipments") + @query = Trade::Shipment.from("#{@shipments_view} AS trade_shipments") unless @taxon_concepts_ids.empty? cascading_ranks = diff --git a/app/models/trade/inclusion_validation_rule.rb b/app/models/trade/inclusion_validation_rule.rb index 6dc14c15ab..c561aaa566 100644 --- a/app/models/trade/inclusion_validation_rule.rb +++ b/app/models/trade/inclusion_validation_rule.rb @@ -150,7 +150,7 @@ def matching_records_grouped(annual_report_upload) 'COUNT(*) AS error_count', 'ARRAY_AGG(id) AS matching_records_ids' ] - ).from(Arel.sql("(#{matching_records_arel(table_name).to_sql}) matching_records")). + ).from(Arel.sql("(#{matching_records_arel(table_name).to_sql}) AS matching_records")). group(column_names_for_display).having( required_column_names.map { |cn| "#{cn} IS NOT NULL" }.join(' AND ') ) @@ -160,7 +160,7 @@ def matching_records(annual_report_upload) table_name = annual_report_upload.sandbox.table_name sandbox_klass = Trade::SandboxTemplate.ar_klass(table_name) sandbox_klass.select('*'). - from(Arel.sql("(#{matching_records_arel(table_name).to_sql}) matching_records")) + from(Arel.sql("(#{matching_records_arel(table_name).to_sql}) AS matching_records")) end # Returns records from sandbox where values in column_names are not null diff --git a/app/serializers/species/show_taxon_concept_serializer.rb b/app/serializers/species/show_taxon_concept_serializer.rb index 702d577a47..a990d9a46d 100644 --- a/app/serializers/species/show_taxon_concept_serializer.rb +++ b/app/serializers/species/show_taxon_concept_serializer.rb @@ -91,7 +91,7 @@ def ancestors end def common_names - CommonName.from('api_common_names_view common_names'). + CommonName.from('api_common_names_view AS common_names'). where(taxon_concept_id: object.id). select("language_name_en AS lang"). select("string_agg(name, ', ') AS names"). @@ -109,7 +109,7 @@ def common_names end def distributions_with_tags_and_references - Distribution.from('api_distributions_view distributions'). + Distribution.from('api_distributions_view AS distributions'). where(taxon_concept_id: object.id). select("name_en AS name, name_en AS country, ARRAY_TO_STRING(tags, ',') AS tags_list, ARRAY_TO_STRING(citations, '; ') AS country_references"). order('name_en').all @@ -120,7 +120,7 @@ def distributions end def distributions_with_tags_and_references_trimmed - Distribution.from('api_distributions_view distributions'). + Distribution.from('api_distributions_view AS distributions'). where(taxon_concept_id: object.id). select("iso_code2, ARRAY_TO_STRING(tags, ',') AS tags_list"). order('iso_code2').all diff --git a/app/serializers/species/show_taxon_concept_serializer_cites.rb b/app/serializers/species/show_taxon_concept_serializer_cites.rb index 6421350f22..4da10c10a7 100644 --- a/app/serializers/species/show_taxon_concept_serializer_cites.rb +++ b/app/serializers/species/show_taxon_concept_serializer_cites.rb @@ -43,7 +43,7 @@ def include_eu_listing? end def quotas - Quota.from('api_cites_quotas_view trade_restrictions'). + Quota.from('api_cites_quotas_view AS trade_restrictions'). where(" trade_restrictions.taxon_concept_id IN (:object_and_children) OR ( @@ -86,7 +86,7 @@ def quotas end def cites_suspensions - CitesSuspension.from('api_cites_suspensions_view trade_restrictions'). + CitesSuspension.from('api_cites_suspensions_view AS trade_restrictions'). where(" trade_restrictions.taxon_concept_id IN (:object_and_children) OR ( @@ -135,7 +135,7 @@ def eu_decisions # The following variables are used to temporarily force the Anthozoa negative opinion # for Cambodia to cascade down and show regardless of the children distributions. anthozoa_statement, ancestors_field = force_anthozoa_statement.values_at(*%i(statement ancestors_field)) - EuDecision.from('api_eu_decisions_view eu_decisions'). + EuDecision.from('api_eu_decisions_view AS eu_decisions'). where(" eu_decisions.taxon_concept_id IN (?) OR ( @@ -190,7 +190,7 @@ def eu_decision_select_attrs end def cites_listing_changes - rel = MCitesListingChange.from('api_cites_listing_changes_view listing_changes_mview'). + rel = MCitesListingChange.from('api_cites_listing_changes_view AS listing_changes_mview'). where( 'listing_changes_mview.taxon_concept_id' => object_and_children ) @@ -257,7 +257,7 @@ def cites_listing_changes end def eu_listing_changes - rel = MEuListingChange.from('api_eu_listing_changes_view listing_changes_mview'). + rel = MEuListingChange.from('api_eu_listing_changes_view AS listing_changes_mview'). where( 'listing_changes_mview.taxon_concept_id' => object_and_children ) diff --git a/app/serializers/species/show_taxon_concept_serializer_cms.rb b/app/serializers/species/show_taxon_concept_serializer_cms.rb index 60aff1f8ff..a9bc8a8631 100644 --- a/app/serializers/species/show_taxon_concept_serializer_cms.rb +++ b/app/serializers/species/show_taxon_concept_serializer_cms.rb @@ -26,7 +26,7 @@ def include_cms_listing? end def cms_listing_changes - MCmsListingChange.from('cms_listing_changes_mview listing_changes_mview'). + MCmsListingChange.from('cms_listing_changes_mview AS listing_changes_mview'). where( 'listing_changes_mview.taxon_concept_id' => object_and_children, 'listing_changes_mview.show_in_history' => true diff --git a/lib/modules/trade/appendix_report.rb b/lib/modules/trade/appendix_report.rb index e76eec9dc6..6945ac7621 100644 --- a/lib/modules/trade/appendix_report.rb +++ b/lib/modules/trade/appendix_report.rb @@ -17,7 +17,7 @@ def initialize(shipments_rel) SQL ).uniq - @query = Trade::Shipment.from("(#{@query.to_sql}) s"). + @query = Trade::Shipment.from("(#{@query.to_sql}) AS s"). select([ 's.id', :legacy_shipment_number, :taxon_concept_id, :full_name, :year, :appendix, diff --git a/lib/modules/trade/grouping/trade_plus_static.rb b/lib/modules/trade/grouping/trade_plus_static.rb index 61490aaf34..ef21c05d1a 100644 --- a/lib/modules/trade/grouping/trade_plus_static.rb +++ b/lib/modules/trade/grouping/trade_plus_static.rb @@ -319,7 +319,7 @@ def taxonomic_query(opts) #{quantity_condition(quantity_field)} ORDER BY value DESC #{limit} - ) row + ) AS row SQL end diff --git a/lib/modules/trade/species_without_legislation_or_trade_report.rb b/lib/modules/trade/species_without_legislation_or_trade_report.rb index 8c01180536..e63eaa55b2 100644 --- a/lib/modules/trade/species_without_legislation_or_trade_report.rb +++ b/lib/modules/trade/species_without_legislation_or_trade_report.rb @@ -68,7 +68,7 @@ def initialize kingdom_name, phylum_name, class_name, order_name, family_name, genus_name, species_name, full_name, author_year, name_status, cites_listed_descendants, eu_listed_descendants, taxonomic_position - ) taxon_concepts + ) AS taxon_concepts SQL ) @report_query = @query.select([ From 235cc99bf0c9e6048afad7d28843bebdfe885dd9 Mon Sep 17 00:00:00 2001 From: Daniel Perrett Date: Mon, 8 Jan 2024 14:45:29 +0000 Subject: [PATCH 010/334] Fix test failure(s) on Rails 4.1 where update_all no longer takes two arguments --- app/models/document_collection_order.rb | 7 ++++--- app/workers/update_taxonomy_worker.rb | 5 +++-- lib/modules/sapi/stored_procedures.rb | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/models/document_collection_order.rb b/app/models/document_collection_order.rb index 0ee1f0ae86..bd01727751 100644 --- a/app/models/document_collection_order.rb +++ b/app/models/document_collection_order.rb @@ -23,10 +23,11 @@ def show def update(id_sort_index_hash) id_sort_index_hash.each do |id, sort_index| - Document.update_all( + Document.where([ + 'id = :id OR primary_language_document_id = :id', + id: id + ]).update_all( { sort_index: sort_index, updated_at: DateTime.now }, - ['id = :id OR primary_language_document_id = :id', - id: id] ) end DocumentSearch.clear_cache diff --git a/app/workers/update_taxonomy_worker.rb b/app/workers/update_taxonomy_worker.rb index d8c48ee9e0..4d128e14b4 100644 --- a/app/workers/update_taxonomy_worker.rb +++ b/app/workers/update_taxonomy_worker.rb @@ -15,9 +15,10 @@ def perform Species::TaxonConceptPrefixMatcher.increment_cache_iterator Checklist::Checklist.increment_cache_iterator - TaxonConcept.update_all( - 'updated_at = touched_at', + TaxonConcept.where( 'touched_at IS NOT NULL AND touched_at > updated_at' + ).update_all( + 'updated_at = touched_at', ) end end diff --git a/lib/modules/sapi/stored_procedures.rb b/lib/modules/sapi/stored_procedures.rb index 01db014d4a..e928f0dec4 100644 --- a/lib/modules/sapi/stored_procedures.rb +++ b/lib/modules/sapi/stored_procedures.rb @@ -36,9 +36,10 @@ def self.rebuild Species::TaxonConceptPrefixMatcher.increment_cache_iterator Checklist::Checklist.increment_cache_iterator - TaxonConcept.update_all( - 'updated_at = touched_at', + TaxonConcept.where( 'touched_at IS NOT NULL AND touched_at > updated_at' + ).update_all( + 'updated_at = touched_at', ) end end From 47870be105fde295eab4969a68feec7dddb5afbb Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Mon, 8 Jan 2024 17:02:41 +0000 Subject: [PATCH 011/334] fix SQL --- app/models/species/listings_export.rb | 14 +++++++++++--- app/models/trade/inclusion_validation_rule.rb | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/app/models/species/listings_export.rb b/app/models/species/listings_export.rb index 01411efd46..7e1d644c91 100644 --- a/app/models/species/listings_export.rb +++ b/app/models/species/listings_export.rb @@ -23,9 +23,7 @@ def initialize(designation, filters) end def query - rel = MTaxonConcept.from(table_name). - select(sql_columns). - order('taxonomic_position') + rel = MTaxonConcept.from(table_name).select(sql_columns_with_table_name).order('taxonomic_position') rel = if @geo_entities_ids MTaxonConceptFilterByAppendixPopulationQuery.new( @@ -54,4 +52,14 @@ def table_name "#{designation_name}_species_listing_mview" end + # IMPORTANT NOTE: + # After upgrading to Rails 4.1 (Arel 5.0.1), Rails injects the table name in front of column names. + # For example: From `SELECT taxon_concept_id FROM...` to `SELECT trade_sandbox_template.taxon_concept_id FROM...`. + # There is nothing inherently wrong with Rails, but it doesn't work well with this project, which involves many + # highly customized low-level SQL queries. + # In this case the FROM clause aliases a name which does not have a model. + # A quick and temporary solution for now is to manually inject the correct table name ourselves. + def sql_columns_with_table_name + sql_columns.map{ |sql_column| "#{table_name}.#{sql_column}" } + end end diff --git a/app/models/trade/inclusion_validation_rule.rb b/app/models/trade/inclusion_validation_rule.rb index c561aaa566..2ba8603e29 100644 --- a/app/models/trade/inclusion_validation_rule.rb +++ b/app/models/trade/inclusion_validation_rule.rb @@ -91,6 +91,10 @@ def column_names_for_matching column_names end + def column_names_for_display_with_custom_table_name(table_name:) + column_names_for_display.map{ |column_name| "#{table_name}.#{column_name}" } + end + def column_names_for_display if column_names.include? ('taxon_concept_id') column_names << 'accepted_taxon_name' @@ -145,13 +149,20 @@ def matching_records_grouped(annual_report_upload) table_name = annual_report_upload.sandbox.table_name Trade::SandboxTemplate. select( - column_names_for_display + + # IMPORTANT NOTE: + # After upgrading to Rails 4.1 (Arel 5.0.1), Rails injects the table name in front of column names. + # For example: From `SELECT taxon_concept_id FROM...` to `SELECT trade_sandbox_template.taxon_concept_id FROM...`. + # There is nothing inherently wrong with Rails, but it doesn't work well with this project, which involves many + # highly customized low-level SQL queries. + # In this case the FROM clause aliases a name which does not have a model. + # A quick and temporary solution for now is to manually inject the correct table name ourselves. + column_names_for_display_with_custom_table_name(table_name: 'matching_records') + [ 'COUNT(*) AS error_count', 'ARRAY_AGG(id) AS matching_records_ids' ] ).from(Arel.sql("(#{matching_records_arel(table_name).to_sql}) AS matching_records")). - group(column_names_for_display).having( + group(column_names_for_display_with_custom_table_name(table_name: 'matching_records')).having( required_column_names.map { |cn| "#{cn} IS NOT NULL" }.join(' AND ') ) end From 35b9432a9e0be01728ec2bd78fb270101bc8c23c Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Mon, 8 Jan 2024 17:26:26 +0000 Subject: [PATCH 012/334] Implicit joins --- app/models/document_citation.rb | 2 +- app/models/listing_change.rb | 4 ++-- app/models/species/listings_export.rb | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/models/document_citation.rb b/app/models/document_citation.rb index 724978e610..bd4853db53 100644 --- a/app/models/document_citation.rb +++ b/app/models/document_citation.rb @@ -40,7 +40,7 @@ def duplicates(comparison_attributes_override = {}) relation = DocumentCitation. select('document_citations.*'). where(document_id: self.document_id). - includes(:document_citation_taxon_concepts). + includes(:document_citation_taxon_concepts).references(:document_citation_taxon_concepts) where('document_citation_taxon_concepts.taxon_concept_id' => taxon_concept_id) geo_entities_ids = document_citation_geo_entities.pluck(:geo_entity_id) if !geo_entities_ids.empty? diff --git a/app/models/listing_change.rb b/app/models/listing_change.rb index bf5d0c17ef..7373e86458 100644 --- a/app/models/listing_change.rb +++ b/app/models/listing_change.rb @@ -135,14 +135,14 @@ def duplicates(comparison_attributes_override = {}) ) ) if party_listing_distribution - relation = relation.includes(:party_listing_distribution).where( + relation = relation.includes(:party_listing_distribution).references(:party_listing_distribution).where( party_listing_distribution.comparison_conditions( party_listing_distribution.comparison_attributes.except(:listing_change_id) ) ) end if annotation - relation = relation.includes(:annotation).where( + relation = relation.includes(:annotation).references(:annotation).where( annotation.comparison_conditions ) end diff --git a/app/models/species/listings_export.rb b/app/models/species/listings_export.rb index 7e1d644c91..3f231e6e76 100644 --- a/app/models/species/listings_export.rb +++ b/app/models/species/listings_export.rb @@ -57,7 +57,6 @@ def table_name # For example: From `SELECT taxon_concept_id FROM...` to `SELECT trade_sandbox_template.taxon_concept_id FROM...`. # There is nothing inherently wrong with Rails, but it doesn't work well with this project, which involves many # highly customized low-level SQL queries. - # In this case the FROM clause aliases a name which does not have a model. # A quick and temporary solution for now is to manually inject the correct table name ourselves. def sql_columns_with_table_name sql_columns.map{ |sql_column| "#{table_name}.#{sql_column}" } From 7177b111964e5fce010fab8932c024323df3b90c Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 10:47:20 +0000 Subject: [PATCH 013/334] https://stackoverflow.com/questions/23358906/rails-select-and-count-dont-seem-to-play-nice --- app/models/species/taxon_concept_prefix_matcher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/species/taxon_concept_prefix_matcher.rb b/app/models/species/taxon_concept_prefix_matcher.rb index f0d7a5874f..b871d402e8 100644 --- a/app/models/species/taxon_concept_prefix_matcher.rb +++ b/app/models/species/taxon_concept_prefix_matcher.rb @@ -14,7 +14,7 @@ def results end def total_cnt - (@taxon_concept_query || !@ranks.empty?) && @query.count || 0 + (@taxon_concept_query || !@ranks.empty?) && @query.count(:all) || 0 end private From 80149588f9817d8b1c8aa8aebe41638f0d18b040 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 11:00:43 +0000 Subject: [PATCH 014/334] https://stackoverflow.com/questions/23358906/rails-select-and-count-dont-seem-to-play-nice --- app/models/document_search.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/document_search.rb b/app/models/document_search.rb index 5ae49b7ecc..37c9002232 100644 --- a/app/models/document_search.rb +++ b/app/models/document_search.rb @@ -13,14 +13,14 @@ def initialize(options, interface) initialize_query end - #TODO temporarly removing pagination here because of the new cascading feature. Add it back after the refactor of the SQL mviews + #TODO temporarly removing pagination here because of the new cascading feature. Add it back after the refactor of the SQL mviews def results @query #.limit(@per_page).offset(@offset) end def total_cnt if admin_interface? - @query.count + @query.count(:all) else query = "SELECT count(*) AS count_all FROM (#{@query.to_sql}) x" count = ActiveRecord::Base.connection.execute(query).first.try(:[], "count_all").to_i From 05993d5935d21a7de9b6d31c3efa6e35d095e030 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 11:47:08 +0000 Subject: [PATCH 015/334] fix .count() --- app/controllers/admin/documents_controller.rb | 2 +- app/controllers/api/v1/events_controller.rb | 2 +- app/controllers/api/v1/sources_controller.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/documents_controller.rb b/app/controllers/admin/documents_controller.rb index 78373bd4b4..4b034a59e7 100644 --- a/app/controllers/admin/documents_controller.rb +++ b/app/controllers/admin/documents_controller.rb @@ -88,7 +88,7 @@ def collection # TO DO: figure out if the cascading feature has been completed, and if so move the # pagination back into the search class and out of the controllers. @documents = Kaminari::PaginatableArray.new( - @search.cached_results.limit(@search.per_page).offset(@search.offset), + @search.cached_results.limit(@search.per_page).offset(@search.offset).to_a, limit: @search.per_page, offset: @search.offset, total_count: @search.cached_total_cnt diff --git a/app/controllers/api/v1/events_controller.rb b/app/controllers/api/v1/events_controller.rb index d3500217b9..bcc6f950ba 100644 --- a/app/controllers/api/v1/events_controller.rb +++ b/app/controllers/api/v1/events_controller.rb @@ -7,7 +7,7 @@ def index order('type, published_at DESC') render :json => @events, :each_serializer => Species::EventSerializer, - :meta => { :total => @events.count } + :meta => { :total => @events.count(:all) } end end diff --git a/app/controllers/api/v1/sources_controller.rb b/app/controllers/api/v1/sources_controller.rb index dae664fb61..912a226e88 100644 --- a/app/controllers/api/v1/sources_controller.rb +++ b/app/controllers/api/v1/sources_controller.rb @@ -6,6 +6,6 @@ def index @sources = Source.all(:order => "code") render :json => @sources, :each_serializer => Species::SourceSerializer, - :meta => { :total => @sources.count } + :meta => { :total => @sources.count(:all) } end end From 6c4601591dca111d31462b4da9e0321e1e992894 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 11:52:59 +0000 Subject: [PATCH 016/334] fix all() --- app/controllers/api/v1/purposes_controller.rb | 2 +- app/controllers/api/v1/sources_controller.rb | 4 ++-- app/controllers/api/v1/terms_controller.rb | 2 +- app/controllers/api/v1/units_controller.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/api/v1/purposes_controller.rb b/app/controllers/api/v1/purposes_controller.rb index 1920ae1f19..8b124c1050 100644 --- a/app/controllers/api/v1/purposes_controller.rb +++ b/app/controllers/api/v1/purposes_controller.rb @@ -3,7 +3,7 @@ class Api::V1::PurposesController < ApplicationController { :locale => "en" }.merge(c.params.select { |k, v| !v.blank? && "locale" == k }) } def index - @purposes = Purpose.all(:order => "code") + @purposes = Purpose.all.order(:code) render :json => @purposes, :each_serializer => Species::PurposeSerializer, :meta => { :total => @purposes.count } diff --git a/app/controllers/api/v1/sources_controller.rb b/app/controllers/api/v1/sources_controller.rb index 912a226e88..5f2c12df31 100644 --- a/app/controllers/api/v1/sources_controller.rb +++ b/app/controllers/api/v1/sources_controller.rb @@ -3,9 +3,9 @@ class Api::V1::SourcesController < ApplicationController { :locale => "en" }.merge(c.params.select { |k, v| !v.blank? && "locale" == k }) } def index - @sources = Source.all(:order => "code") + @sources = Source.all.order(:code) render :json => @sources, :each_serializer => Species::SourceSerializer, - :meta => { :total => @sources.count(:all) } + :meta => { :total => @sources.count } end end diff --git a/app/controllers/api/v1/terms_controller.rb b/app/controllers/api/v1/terms_controller.rb index 66686cac9d..59274f4d23 100644 --- a/app/controllers/api/v1/terms_controller.rb +++ b/app/controllers/api/v1/terms_controller.rb @@ -3,7 +3,7 @@ class Api::V1::TermsController < ApplicationController { :locale => "en" }.merge(c.params.select { |k, v| !v.blank? && "locale" == k }) } def index - @terms = Term.all(:order => "code") + @terms = Term.all.order(:code) render :json => @terms, :each_serializer => Species::TermSerializer, :meta => { :total => @terms.count } diff --git a/app/controllers/api/v1/units_controller.rb b/app/controllers/api/v1/units_controller.rb index c28094f81d..c90ebb8fbc 100644 --- a/app/controllers/api/v1/units_controller.rb +++ b/app/controllers/api/v1/units_controller.rb @@ -3,7 +3,7 @@ class Api::V1::UnitsController < ApplicationController { :locale => "en" }.merge(c.params.select { |k, v| !v.blank? && "locale" == k }) } def index - @units = Unit.all(:order => "code") + @units = Unit.all.order(:code) render :json => @units, :each_serializer => Species::UnitSerializer, :meta => { :total => @units.count } From 38bf185e187e72b146cc87445ae7a61bee54dced Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 11:57:53 +0000 Subject: [PATCH 017/334] fix count() --- app/models/api_request.rb | 2 +- app/models/species/search.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/api_request.rb b/app/models/api_request.rb index 1e4259ae2c..db1f36e95c 100644 --- a/app/models/api_request.rb +++ b/app/models/api_request.rb @@ -47,7 +47,7 @@ def self.top_50_most_active_users def self.recent_requests(user = nil) query = self.select([:response_status, :created_at]).recent.order(:response_status) query = query.where(user_id: user.id) if user - query.group(:response_status).group_by_day(:created_at, format: "%Y-%m-%d").count + query.group(:response_status).group_by_day(:created_at, format: "%Y-%m-%d").count(:all) end def self.requests_by_response_status(user = nil) diff --git a/app/models/species/search.rb b/app/models/species/search.rb index 92aeb62665..12f0b6aeb1 100644 --- a/app/models/species/search.rb +++ b/app/models/species/search.rb @@ -18,7 +18,7 @@ def results end def total_cnt - @query.count + @query.count(:all) end def ids From 73086e615899229071be2220ffeeab930717e032 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 11:58:03 +0000 Subject: [PATCH 018/334] bugfix --- app/models/document_citation.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/document_citation.rb b/app/models/document_citation.rb index bd4853db53..424f5f4952 100644 --- a/app/models/document_citation.rb +++ b/app/models/document_citation.rb @@ -40,7 +40,8 @@ def duplicates(comparison_attributes_override = {}) relation = DocumentCitation. select('document_citations.*'). where(document_id: self.document_id). - includes(:document_citation_taxon_concepts).references(:document_citation_taxon_concepts) + includes(:document_citation_taxon_concepts). + references(:document_citation_taxon_concepts). where('document_citation_taxon_concepts.taxon_concept_id' => taxon_concept_id) geo_entities_ids = document_citation_geo_entities.pluck(:geo_entity_id) if !geo_entities_ids.empty? From f111d36413305086baf050fa7cc4ae750720ae59 Mon Sep 17 00:00:00 2001 From: Daniel Perrett Date: Mon, 8 Jan 2024 15:42:58 +0000 Subject: [PATCH 019/334] Add more AS for aliasing to hopefully appease Arel --- app/models/trade/shipments_comptab_export.rb | 2 +- app/models/trade/shipments_export.rb | 4 ++-- app/models/trade/shipments_gross_exports_export.rb | 2 +- lib/tasks/elibrary/importable.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/trade/shipments_comptab_export.rb b/app/models/trade/shipments_comptab_export.rb index 5ee1148713..66fbc73d8d 100644 --- a/app/models/trade/shipments_comptab_export.rb +++ b/app/models/trade/shipments_comptab_export.rb @@ -16,7 +16,7 @@ def query_sql(options) select_columns = sql_columns.each_with_index.map do |c, i| "#{c} AS \"#{headers[i]}\"" end - "SELECT #{select_columns.join(', ')} FROM (#{subquery_sql(options)}) subquery" + "SELECT #{select_columns.join(', ')} FROM (#{subquery_sql(options)}) AS subquery" end def subquery_sql(options) diff --git a/app/models/trade/shipments_export.rb b/app/models/trade/shipments_export.rb index 10132a97ae..a5fd36b36c 100644 --- a/app/models/trade/shipments_export.rb +++ b/app/models/trade/shipments_export.rb @@ -61,7 +61,7 @@ def query_sql(options) select_columns = sql_columns.each_with_index.map do |c, i| "#{c} AS \"#{headers[i]}\"" end - "SELECT #{select_columns.join(', ')} FROM (#{raw_query(options)}) subquery" + "SELECT #{select_columns.join(', ')} FROM (#{raw_query(options)}) AS subquery" end def internal? @@ -78,7 +78,7 @@ def table_name def copy_stmt # escape quotes around attributes for psql - # Requires UTF8 encoding for diacritics. + # Requires UTF8 encoding for diacritics. sql = <<-PSQL \\COPY (#{query_sql(:limit => !internal?).gsub(/"/, "\\\"")}) TO ? diff --git a/app/models/trade/shipments_gross_exports_export.rb b/app/models/trade/shipments_gross_exports_export.rb index f2b1638fb8..b84c5a08c4 100644 --- a/app/models/trade/shipments_gross_exports_export.rb +++ b/app/models/trade/shipments_gross_exports_export.rb @@ -14,7 +14,7 @@ def query_sql(options) select_columns = sql_columns.each_with_index.map do |c, i| "#{c} AS \"#{headers[i]}\"" end + years_columns - "SELECT #{select_columns.join(', ')} FROM (#{ct_subquery_sql(options)}) ct_subquery" + "SELECT #{select_columns.join(', ')} FROM (#{ct_subquery_sql(options)}) AS ct_subquery" end def resource_name diff --git a/lib/tasks/elibrary/importable.rb b/lib/tasks/elibrary/importable.rb index 1cdaaa2b66..4a0fc13209 100644 --- a/lib/tasks/elibrary/importable.rb +++ b/lib/tasks/elibrary/importable.rb @@ -43,7 +43,7 @@ def copy_from_csv(path_to_file, table_name, db_columns) def print_query_counts queries = { 'rows_in_import_file' => "SELECT COUNT(*) FROM #{table_name}" } - queries['rows_to_insert'] = "SELECT COUNT(*) FROM (#{rows_to_insert_sql}) t" + queries['rows_to_insert'] = "SELECT COUNT(*) FROM (#{rows_to_insert_sql}) AS t" queries.each do |q_name, q| res = ActiveRecord::Base.connection.execute(q) puts "#{res[0]['count']} #{q_name.humanize}" From 6e6310bfe066273a6f9135c77ed2c402acb8b6e8 Mon Sep 17 00:00:00 2001 From: Daniel Perrett Date: Tue, 9 Jan 2024 14:47:41 +0000 Subject: [PATCH 020/334] Fix a failing test (CitesSuspensionNotification) - the failure was in setup --- spec/factories.rb | 5 +++++ spec/models/cites_suspension_notification_spec.rb | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/spec/factories.rb b/spec/factories.rb index a3ad92e8c6..b3b5484197 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -62,6 +62,11 @@ start_notification end + factory :cites_suspension_confirmation do + factory :confirmation_notification, :class => 'CitesSuspensionNotification' + factory :confirmed_suspension, :class => 'CitesSuspension' + end + factory :quota do taxon_concept unit diff --git a/spec/models/cites_suspension_notification_spec.rb b/spec/models/cites_suspension_notification_spec.rb index 9a3346080f..6b39650c88 100644 --- a/spec/models/cites_suspension_notification_spec.rb +++ b/spec/models/cites_suspension_notification_spec.rb @@ -75,11 +75,22 @@ end context "when confirmation notification, make sure it gets destroyed" do let!(:cites_suspension) { - create( + # Ideally we would create this in a single statement but on upgrading + # from rails 4.0 to 4.1 this started failing - the joining table + # was not being passed the correct id in the factory. + # This seems to be the only test which fails for this reason. + suspension = create( :cites_suspension, :start_notification => create_cites_suspension_notification, - :confirmation_notifications => [cites_suspension_notification] ) + + create( + :cites_suspension_confirmation, + :confirmation_notification => cites_suspension_notification, + :confirmed_suspension => suspension, + ) + + suspension } subject { cites_suspension_notification.cites_suspension_confirmations } specify { From d3dbee39028f0a960188835fcb983a41e3d19e26 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 14:50:18 +0000 Subject: [PATCH 021/334] the function seems not in-use. It being trigger by Devise 4.0 but not 3.0. From https://github.com/unepwcmc/SAPI/commit/96610c3ae4dc2332abf295e2c07c38356782d313, we believe this method is for a feature spec which no longer exists in this project. --- spec/spec_helper.rb | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e239952f62..949769fc28 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -102,18 +102,3 @@ def build_attributes(*args) ["id", "created_at", "updated_at", "touched_at"].member?(k) end end - -def sign_up(user, opts = {}) - options = { - terms_and_conditions: true - }.merge(opts) - visit api_path - within('#registration-form') do - fill_in 'user_name', :with => user.name - fill_in 'user_email', :with => user.email - fill_in 'Password', :with => user.password - fill_in 'Password confirmation', :with => user.password - find(:css, "#user_terms_and_conditions").set(options[:terms_and_conditions]) - end - click_button 'Sign up' -end From ab7385ea683cf80a45e0f80aca9e631dc0788f05 Mon Sep 17 00:00:00 2001 From: Daniel Perrett Date: Tue, 9 Jan 2024 16:38:18 +0000 Subject: [PATCH 022/334] Add actual pending message to Submission worker spec, and also stub a call to send emails --- spec/workers/submission_worker_spec.rb | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/spec/workers/submission_worker_spec.rb b/spec/workers/submission_worker_spec.rb index 8f70bb3c48..44ca697554 100644 --- a/spec/workers/submission_worker_spec.rb +++ b/spec/workers/submission_worker_spec.rb @@ -1,5 +1,13 @@ require 'spec_helper' +PENDING_REASON = "Test disabled because SubmissionWorker was disabled in 2019 (c1da775763)" + +class EmailMessageStub + def deliver + # noop + end +end + describe SubmissionWorker do before(:each) do genus = create_cites_eu_genus( @@ -26,9 +34,11 @@ @submitter = FactoryGirl.create(:user, role: User::MANAGER) Trade::ChangelogCsvGenerator.stub(:call).and_return(Tempfile.new('changelog.csv')) SubmissionWorker.any_instance.stub(:upload_on_S3) + NotificationMailer.any_instance.stub(:mail).and_return(EmailMessageStub.new()) end - # Test temporarily disabled because SubmissionWorker has been disabled - pending "when no primary errors" do + context "when no primary errors" do + pending(PENDING_REASON) if PENDING_REASON + before(:each) do @aru = build(:annual_report_upload, :trading_country_id => @argentina.id, :point_of_view => 'I') @aru.save(:validate => false) @@ -56,14 +66,16 @@ SubmissionWorker.new.perform(@aru.id, @submitter.id) Trade::Permit.find_by_number('BBB').should_not be_nil end - pending "when permit previously reported" do + context "when permit previously reported" do before(:each) { create(:permit, :number => 'xxx') } specify { expect { SubmissionWorker.new.perform(@aru.id, @submitter.id) }.to change { Trade::Permit.count }.by(2) } end end - pending "when primary errors present" do + context "when primary errors present" do + pending(PENDING_REASON) if PENDING_REASON + before(:each) do @aru = build(:annual_report_upload) @aru.save(:validate => false) @@ -81,7 +93,9 @@ expect { SubmissionWorker.new.perform(@aru.id, @submitter.id) }.not_to change { Trade::Shipment.count } } end - pending "when reported under a synonym" do + context "when reported under a synonym" do + pending(PENDING_REASON) if PENDING_REASON + before(:each) do @synonym = create_cites_eu_species( :name_status => 'S', @@ -120,5 +134,4 @@ Trade::Shipment.first.reported_taxon_concept_id.should == @synonym.id } end - end From 13251978900fda292cb9b0f1f18eddbc92ac7c78 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 18 Jan 2024 10:46:13 +0000 Subject: [PATCH 023/334] fix PG error for count(). --- app/controllers/api/v1/document_tags_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/document_tags_controller.rb b/app/controllers/api/v1/document_tags_controller.rb index b408186a0a..73566aa541 100644 --- a/app/controllers/api/v1/document_tags_controller.rb +++ b/app/controllers/api/v1/document_tags_controller.rb @@ -7,7 +7,7 @@ def index order([:type, :name]) render :json => @document_tags, :each_serializer => Species::DocumentTagSerializer, - :meta => { :total => @document_tags.count } + :meta => { :total => @document_tags.count(:all) } end end From f392e7e9b9e8d3e165768e3b6518726dfde22025 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 11:20:18 +0000 Subject: [PATCH 024/334] Ruby to 2.5.9; Rails to 4.2.11.3; web server start successfully and able to load landing page --- .gitignore | 3 +- .ruby-version | 2 +- .travis.yml | 2 +- Dockerfile | 12 +- Gemfile | 29 +- Gemfile.lock | 194 +- app/assets/javascripts/application.js | 2 +- app/assets/stylesheets/application.css | 2 +- bin/rails | 9 +- bin/setup | 29 + config.ru | 2 +- config/application.rb | 3 + config/boot.rb | 5 +- config/deploy.rb | 2 +- config/environments/development.rb | 4 + config/environments/production.rb | 23 +- config/environments/staging.rb | 23 +- config/environments/test.rb | 7 +- config/initializers/assets.rb | 3 + .../to_time_preserves_timezone.rb | 10 + rspec_result.txt | 24965 ++++++++++++++++ 21 files changed, 25186 insertions(+), 145 deletions(-) create mode 100755 bin/setup create mode 100644 config/initializers/to_time_preserves_timezone.rb create mode 100644 rspec_result.txt diff --git a/.gitignore b/.gitignore index f3f446bacb..93a1d35346 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,8 @@ # Ignore all logfiles and tempfiles. /coverage /rdoc -/log/*.log +/log/* +!/log/.keep /tmp /private /public/system diff --git a/.ruby-version b/.ruby-version index 2bf1c1ccf3..30f69e8cc5 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.1 +2.5.9 diff --git a/.travis.yml b/.travis.yml index afbe4ce38d..6d30521b76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ cache: bundler bundler_args: --without development production staging sudo: false rvm: - - 2.3.1 + - 2.5.9 addons: postgresql: 9.4 code_climate: diff --git a/Dockerfile b/Dockerfile index c0dbdd9db1..217c4a9659 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,5 @@ # Dockerfile -FROM ruby:2.3.1 - -# The ruby:2.3.1 image is ancient, based of debian jessie which no longer -# receives active security updates. Therefore we must declare the debian -# archive as a source instead. -RUN rm /etc/apt/sources.list && \ - echo "deb http://archive.debian.org/debian-security jessie/updates main" \ - >> /etc/apt/sources.list.d/jessie.list && \ - echo "deb http://archive.debian.org/debian jessie main" \ - >> /etc/apt/sources.list.d/jessie.list \ -; +FROM ruby:2.5.9 # Rails and SAPI has some additional dependencies, e.g. rake requires a JS # runtime, so attempt to get these from apt, where possible diff --git a/Gemfile b/Gemfile index 7cbf592d3a..cd51014bd0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source 'https://rubygems.org' -ruby '2.3.1' +ruby '2.5.9' -gem 'rails', '4.1.16' +gem 'rails', '4.2.11.3' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' @@ -10,17 +10,16 @@ gem 'rails', '4.1.16' gem 'actionpack-action_caching', '1.2.0' gem 'actionpack-page_caching', '1.1.1' gem 'active_model_serializers', '0.8.4' -gem 'activeresource', '4.1.0' +gem 'activeresource', '4.1.0' # TODO: can be removed? Seems no place using this. gem 'dalli', '2.7.10' -gem 'pg', '0.17.1' +gem 'pg', '0.21.0' # TODO: latest 1.5.4, need Rails 5 to upgrade to 1.0.0 gem 'activeuuid', '0.6.1' # TODO: should remove when upgrade to Rails 6. -gem 'pg_array_parser', '0.0.9' -# gem 'activerecord-postgres-hstore' -gem 'nested-hstore', '0.0.5' +gem 'pg_array_parser', '0.0.9' # TODO: latest 0.0.9 +gem 'nested-hstore', '0.1.2' # TODO: latest 0.1.2 @ 2015 gem 'pg_search', '0.6.4' gem 'foreigner', '1.5.0' -gem 'oj', '2.15.0' # optimised JSON (picked by multi_json) -gem 'nokogiri', '1.10.3' +gem 'oj', '3.14.2' # optimised JSON (picked by multi_json) +gem 'nokogiri', '1.12.5' gem 'inherited_resources', '1.7.2' # TODO: need upgrade when upgrade to Rails 5 gem 'traco', '2.0.0' # gem 'strong_parameters' @@ -28,6 +27,7 @@ gem 'protected_attributes', '1.1.4' # TODO: Only support Rails version < 5 (http gem 'devise', '4.0.0' gem 'cancan', '1.6.10' gem 'ahoy_matey', '1.0.1' +gem 'browser', '0.6.0' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 gem 'gon', '5.2.0' gem 'wicked', '1.3.3' gem 'groupdate', '2.4.0' @@ -68,7 +68,7 @@ gem 'rails-observers', '0.1.5' # TODO: a feature that removed since Rails 4... # Gems used for assets gem 'sass-rails', '5.0.7' -gem 'coffee-rails', '4.0.1' +gem 'coffee-rails', '4.1.0' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby @@ -92,15 +92,15 @@ gem 'susy', '2.2.14' gem 'rest-client', '1.8.0', require: false group :development do - gem "better_errors", '1.1.0' + # Access an IRB console on exception pages or by using <%= console %> in views + gem 'web-console', '~> 2.0' gem 'immigrant', '0.1.4' gem "guard-livereload", '1.1.3' - gem "yajl-ruby", '1.1.0' gem "rack-livereload", '0.3.11' gem "guard-bundler", '1.0.0' gem 'annotate', "2.5.0" # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring - gem 'spring' # TODO: upgrade when upgrade Ruby/Rails. + gem 'spring' # gem 'sextant' # Deploy with Capistrano gem 'capistrano', '3.11.0', require: false @@ -133,7 +133,8 @@ group :test, :development do gem "database_cleaner", "1.2.0" # TODO, should remove after upgrade Rails. gem "timecop", '0.6.3' gem "launchy", '2.4.3' - gem 'byebug', '3.2.0' + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 0871ad19e2..0fca79ce25 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,45 +2,49 @@ GEM remote: https://rubygems.org/ specs: Ascii85 (1.0.3) - actionmailer (4.1.16) - actionpack (= 4.1.16) - actionview (= 4.1.16) + actionmailer (4.2.11.3) + actionpack (= 4.2.11.3) + actionview (= 4.2.11.3) + activejob (= 4.2.11.3) mail (~> 2.5, >= 2.5.4) - actionpack (4.1.16) - actionview (= 4.1.16) - activesupport (= 4.1.16) - rack (~> 1.5.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.11.3) + actionview (= 4.2.11.3) + activesupport (= 4.2.11.3) + rack (~> 1.6) rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) actionpack-action_caching (1.2.0) actionpack (>= 4.0.0, < 6) actionpack-page_caching (1.1.1) actionpack (>= 4.0.0, < 6) - actionview (4.1.16) - activesupport (= 4.1.16) + actionview (4.2.11.3) + activesupport (= 4.2.11.3) builder (~> 3.1) erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.3) active_model_serializers (0.8.4) activemodel (>= 3.0) - activemodel (4.1.16) - activesupport (= 4.1.16) + activejob (4.2.11.3) + activesupport (= 4.2.11.3) + globalid (>= 0.3.0) + activemodel (4.2.11.3) + activesupport (= 4.2.11.3) builder (~> 3.1) - activerecord (4.1.16) - activemodel (= 4.1.16) - activesupport (= 4.1.16) - arel (~> 5.0.0) - activerecord-postgres-hstore (0.7.8) - activerecord (>= 3.1) - pg-hstore (>= 1.1.5) - rake + activerecord (4.2.11.3) + activemodel (= 4.2.11.3) + activesupport (= 4.2.11.3) + arel (~> 6.0) activeresource (4.1.0) activemodel (~> 4.0) activesupport (~> 4.0) rails-observers (~> 0.1.2) - activesupport (4.1.16) - i18n (~> 0.6, >= 0.6.9) - json (~> 1.7, >= 1.7.7) + activesupport (4.2.11.3) + i18n (~> 0.7) minitest (~> 5.1) - thread_safe (~> 0.1) + thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) activeuuid (0.6.1) activerecord (>= 3.1) @@ -65,9 +69,9 @@ GEM appsignal (1.3.3) rack thread_safe - arel (5.0.1.20140414130214) + arel (6.0.4) ast (2.4.2) - aws-eventstream (1.2.0) + aws-eventstream (1.3.0) aws-sdk (2.11.632) aws-sdk-resources (= 2.11.632) aws-sdk-core (2.11.632) @@ -75,25 +79,22 @@ GEM jmespath (~> 1.0) aws-sdk-resources (2.11.632) aws-sdk-core (= 2.11.632) - aws-sigv4 (1.6.1) + aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) barber (0.12.2) ember-source (>= 1.0, < 3.1) execjs (>= 1.2, < 3) bcrypt (3.1.20) bcrypt_pbkdf (1.1.0) - better_errors (1.1.0) - coderay (>= 1.0.0) - erubis (>= 2.6.6) + binding_of_caller (1.0.0) + debug_inspector (>= 0.0.1) bootstrap-sass (2.3.2.2) sass (~> 3.2) brightbox (2.3.9) capistrano (>= 2.5) browser (0.6.0) builder (3.2.4) - byebug (3.2.0) - columnize (~> 0.8) - debugger-linecache (~> 1.2) + byebug (11.1.3) cancan (1.6.10) capistrano (3.11.0) airbrussh (>= 1.0.0) @@ -137,25 +138,25 @@ GEM codeclimate-test-reporter (0.1.1) simplecov (>= 0.7.1, < 1.0.0) coderay (1.1.3) - coffee-rails (4.0.1) + coffee-rails (4.1.0) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.12.2) - columnize (0.9.0) concurrent-ruby (1.2.2) - connection_pool (2.2.5) + connection_pool (2.4.1) coveralls (0.7.1) multi_json (~> 1.3) rest-client simplecov (>= 0.7) term-ansicolor thor + crass (1.0.6) dalli (2.7.10) database_cleaner (1.2.0) - debugger-linecache (1.2.0) + debug_inspector (1.2.0) devise (4.0.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -163,6 +164,7 @@ GEM responders warden (~> 1.2.3) diff-lcs (1.5.0) + digest (3.1.1) docile (1.1.5) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) @@ -188,13 +190,13 @@ GEM handlebars-source (~> 1.0) erubis (2.7.0) eventmachine (1.2.7) - execjs (2.9.0) + execjs (2.9.1) factory_girl (4.2.0) activesupport (>= 3.0.0) factory_girl_rails (4.2.1) factory_girl (~> 4.2.0) railties (>= 3.0.0) - ffi (1.15.5) + ffi (1.16.3) font-awesome-rails (4.5.0.1) railties (>= 3.2, < 5.1) foreigner (1.5.0) @@ -202,6 +204,8 @@ GEM formatador (1.1.0) geocoder (1.8.2) geoip (1.3.5) + globalid (0.4.2) + activesupport (>= 4.2.0) gon (5.2.0) actionpack (>= 2.3.0) json @@ -243,6 +247,7 @@ GEM has_scope (~> 0.6) railties (>= 3.2, < 5.2.x) responders + io-wait (0.3.1) jmespath (1.6.2) jquery-cookie-rails (1.3.1.1) railties (>= 3.2.0, < 5.0) @@ -254,7 +259,7 @@ GEM jquery-ui-rails (4.1.2) railties (>= 3.1.0) jslint_on_rails (1.1.1) - json (1.8.6) + json (2.7.1) json_spec (1.1.5) multi_json (~> 1.0) rspec (>= 2.0, < 4.0) @@ -276,30 +281,49 @@ GEM rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) rb-kqueue (>= 0.2) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) lumberjack (1.2.10) - mail (2.7.1) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp memcache-client (1.8.5) method_source (1.0.0) mime-types (2.99.3) mini_mime (1.1.2) - mini_portile2 (2.4.0) + mini_portile2 (2.6.1) minitest (5.15.0) multi_json (1.15.0) multi_xml (0.6.0) - mutex_m (0.1.2) - nested-hstore (0.0.5) + mutex_m (0.2.0) + nested-hstore (0.1.2) activerecord - activerecord-postgres-hstore activesupport nested_form (0.3.2) + net-imap (0.2.2) + digest + net-protocol + strscan + net-pop (0.1.2) + net-protocol + net-protocol (0.1.2) + io-wait + timeout net-scp (4.0.0) net-ssh (>= 2.6.5, < 8.0.0) + net-smtp (0.3.0) + digest + net-protocol + timeout net-ssh (6.1.0) netrc (0.11.0) - nokogiri (1.10.3) - mini_portile2 (~> 2.4.0) - oj (2.15.0) + nokogiri (1.12.5) + mini_portile2 (~> 2.6.1) + racc (~> 1.4) + oj (3.14.2) orm_adapter (0.5.0) paper_trail (4.2.0) activerecord (>= 3.0, < 6.0) @@ -314,8 +338,7 @@ GEM ruby-rc4 ttfunk pdfkit (0.8.4.2) - pg (0.17.1) - pg-hstore (1.2.0) + pg (0.21.0) pg_array_parser (0.0.9) pg_search (0.6.4) activerecord (>= 3.1) @@ -335,7 +358,8 @@ GEM public_suffix (4.0.7) quiet_assets (1.1.0) railties (>= 3.1, < 5.0) - rack (1.5.5) + racc (1.7.3) + rack (1.6.13) rack-cors (0.3.0) rack-livereload (0.3.11) rack @@ -343,21 +367,30 @@ GEM rack rack-test (0.6.3) rack (>= 1.0) - rails (4.1.16) - actionmailer (= 4.1.16) - actionpack (= 4.1.16) - actionview (= 4.1.16) - activemodel (= 4.1.16) - activerecord (= 4.1.16) - activesupport (= 4.1.16) + rails (4.2.11.3) + actionmailer (= 4.2.11.3) + actionpack (= 4.2.11.3) + actionview (= 4.2.11.3) + activejob (= 4.2.11.3) + activemodel (= 4.2.11.3) + activerecord (= 4.2.11.3) + activesupport (= 4.2.11.3) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.16) - sprockets-rails (~> 2.0) + railties (= 4.2.11.3) + sprockets-rails + rails-deprecated_sanitizer (1.0.4) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.9) + activesupport (>= 4.2.0, < 5.0) + nokogiri (~> 1.6) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) rails-observers (0.1.5) activemodel (>= 4.0) - railties (4.1.16) - actionpack (= 4.1.16) - activesupport (= 4.1.16) + railties (4.2.11.3) + actionpack (= 4.2.11.3) + activesupport (= 4.2.11.3) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.2.2) @@ -391,8 +424,9 @@ GEM redis (>= 2.2) referer-parser (0.3.0) request_store (1.3.2) - responders (1.1.2) - railties (>= 3.2, < 4.2) + responders (2.4.1) + actionpack (>= 4.2.0, < 6.0) + railties (>= 4.2.0, < 6.0) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) @@ -465,7 +499,7 @@ GEM slim (1.3.6) temple (~> 0.5.5) tilt (~> 1.3.3) - spring (1.7.2) + spring (3.1.1) sprockets (2.12.5) hike (~> 1.2) multi_json (~> 1.0) @@ -479,6 +513,7 @@ GEM mutex_m net-scp (>= 1.1.2) net-ssh (>= 2.8.0) + strscan (3.0.7) susy (2.2.14) sass (>= 3.3.0, < 3.5) sync (0.5.0) @@ -491,6 +526,7 @@ GEM thread_safe (0.3.6) tilt (1.3.7) timecop (0.6.3) + timeout (0.4.0) tins (1.32.1) sync traco (2.0.0) @@ -506,10 +542,15 @@ GEM unf_ext unf_ext (0.0.9.1) unicode-display_width (1.8.0) - user_agent_parser (2.5.1) + user_agent_parser (2.16.0) uuidtools (2.2.0) warden (1.2.7) rack (>= 1.0) + web-console (2.3.0) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) webrick (1.3.1) whenever (0.9.4) chronic (>= 0.6.3) @@ -518,7 +559,6 @@ GEM wkhtmltopdf-binary (0.9.9.3) xpath (2.1.0) nokogiri (~> 1.3) - yajl-ruby (1.1.0) PLATFORMS ruby @@ -535,10 +575,10 @@ DEPENDENCIES appsignal (= 1.3.3) aws-sdk (~> 2) bcrypt_pbkdf (= 1.1.0) - better_errors (= 1.1.0) bootstrap-sass (= 2.3.2.2) brightbox (= 2.3.9) - byebug (= 3.2.0) + browser (= 0.6.0) + byebug cancan (= 1.6.10) capistrano (= 3.11.0) capistrano-bundler (= 1.5.0) @@ -553,7 +593,7 @@ DEPENDENCIES chartkick (= 1.3.2) clerk (= 0.2.2) codeclimate-test-reporter (= 0.1.1) - coffee-rails (= 4.0.1) + coffee-rails (= 4.1.0) coveralls (= 0.7.1) dalli (= 2.7.10) database_cleaner (= 1.2.0) @@ -584,13 +624,13 @@ DEPENDENCIES kaminari (= 1.2.2) launchy (= 2.4.3) memcache-client (= 1.8.5) - nested-hstore (= 0.0.5) + nested-hstore (= 0.1.2) nested_form (= 0.3.2) - nokogiri (= 1.10.3) - oj (= 2.15.0) + nokogiri (= 1.12.5) + oj (= 3.14.2) paper_trail (= 4.2.0) pdfkit (= 0.8.4.2) - pg (= 0.17.1) + pg (= 0.21.0) pg_array_parser (= 0.0.9) pg_search (= 0.6.4) prawn (= 0.13.2) @@ -598,7 +638,7 @@ DEPENDENCIES quiet_assets (= 1.1.0) rack-cors (= 0.3.0) rack-livereload (= 0.3.11) - rails (= 4.1.16) + rails (= 4.2.11.3) rails-observers (= 0.1.5) rake (= 10.0.4) rbnacl (= 4.0.2) @@ -629,14 +669,14 @@ DEPENDENCIES traco (= 2.0.0) uglifier (= 2.7.2) underscore-rails (= 1.4.3) + web-console (~> 2.0) webrick (= 1.3.1) whenever (= 0.9.4) wicked (= 1.3.3) wkhtmltopdf-binary (= 0.9.9.3) - yajl-ruby (= 1.1.0) RUBY VERSION - ruby 2.3.1p112 + ruby 2.5.9p229 BUNDLED WITH 1.17.3 diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index c67d20f775..cef27ce30c 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -2,7 +2,7 @@ // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 3398fd7ebb..48d80f6e9a 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -3,7 +3,7 @@ * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. + * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. diff --git a/bin/rails b/bin/rails index 91546f2ed3..5191e6927a 100755 --- a/bin/rails +++ b/bin/rails @@ -1,11 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path('../spring', __FILE__) -rescue LoadError => e - raise unless e.message.include?('spring') -end -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) +require_relative '../config/boot' require 'rails/commands' diff --git a/bin/setup b/bin/setup new file mode 100755 index 0000000000..acdb2c1389 --- /dev/null +++ b/bin/setup @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +Dir.chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file: + + puts "== Installing dependencies ==" + system "gem install bundler --conservative" + system "bundle check || bundle install" + + # puts "\n== Copying sample files ==" + # unless File.exist?("config/database.yml") + # system "cp config/database.yml.sample config/database.yml" + # end + + puts "\n== Preparing database ==" + system "bin/rake db:setup" + + puts "\n== Removing old logs and tempfiles ==" + system "rm -f log/*" + system "rm -rf tmp/cache" + + puts "\n== Restarting application server ==" + system "touch tmp/restart.txt" +end diff --git a/config.ru b/config.ru index 41aebeb9ef..bd83b25412 100644 --- a/config.ru +++ b/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) -run SAPI::Application +run Rails.application diff --git a/config/application.rb b/config/application.rb index 7338884eaa..410faee342 100644 --- a/config/application.rb +++ b/config/application.rb @@ -49,6 +49,9 @@ class Application < Rails::Application # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de + # Do not swallow errors in after_commit/after_rollback callbacks. + config.active_record.raise_in_transactional_callbacks = true + # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" diff --git a/config/boot.rb b/config/boot.rb index 4489e58688..6b750f00b1 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,6 +1,3 @@ -require 'rubygems' - -# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/config/deploy.rb b/config/deploy.rb index 482f89d0c5..c3386c3898 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -20,7 +20,7 @@ # set :format, :pretty set :rvm_type, :user -set :rvm_ruby_version, '2.3.1' +set :rvm_ruby_version, '2.5.9' # Default value for :log_level is :debug # set :log_level, :debug diff --git a/config/environments/development.rb b/config/environments/development.rb index ca3dd5acb7..5d6b9da394 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -27,6 +27,10 @@ # number of complex assets. config.assets.debug = true + # Asset digests allow you to set far-future HTTP expiration dates on all assets, + # yet still be able to expire them through the digest params. + config.assets.digest = true + # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. # Raises helpful error messages. diff --git a/config/environments/production.rb b/config/environments/production.rb index 8aee84b182..d29e39071a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -16,11 +16,13 @@ # Enable Rack::Cache to put a simple HTTP cache in front of your application # Add `rack-cache` to your Gemfile before enabling this. - # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. + # For large-scale production use, consider using a caching reverse proxy like + # NGINX, varnish or squid. # config.action_dispatch.rack_cache = true - # Disable Rails's static asset server (Apache or nginx will already do this). - config.serve_static_assets = false + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier @@ -29,19 +31,21 @@ # Don't fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Generate digests for assets URLs. + # Asset digests allow you to set far-future HTTP expiration dates on all assets, + # yet still be able to expire them through the digest params. config.assets.digest = true # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # Set to :debug to see everything in the log. + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. config.log_level = :warn # @see https://github.com/heartcombo/devise#password-reset-tokens-and-rails-logs # Prepend all log lines with the following tags. @@ -54,7 +58,7 @@ config.cache_store = :mem_cache_store # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = "http://assets.example.com" + # config.action_controller.asset_host = 'http://assets.example.com' # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. @@ -68,9 +72,6 @@ # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify - # Disable automatic flushing of the log to improve performance. - # config.autoflush_log = false - # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 3024161223..01c2298fc5 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -16,11 +16,13 @@ # Enable Rack::Cache to put a simple HTTP cache in front of your application # Add `rack-cache` to your Gemfile before enabling this. - # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. + # For large-scale production use, consider using a caching reverse proxy like + # NGINX, varnish or squid. # config.action_dispatch.rack_cache = true - # Disable Rails's static asset server (Apache or nginx will already do this). - config.serve_static_assets = false + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier @@ -29,19 +31,21 @@ # Don't fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Generate digests for assets URLs + # Asset digests allow you to set far-future HTTP expiration dates on all assets, + # yet still be able to expire them through the digest params. config.assets.digest = true # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # Set to :debug to see everything in the log. + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. config.log_level = :warn # @see https://github.com/heartcombo/devise#password-reset-tokens-and-rails-logs # Prepend all log lines with the following tags. @@ -54,7 +58,7 @@ config.cache_store = :memory_store, { size: 64.megabytes } # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = "http://assets.example.com" + # config.action_controller.asset_host = 'http://assets.example.com' # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. @@ -68,9 +72,6 @@ # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify - # Disable automatic flushing of the log to improve performance. - # config.autoflush_log = false - # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new diff --git a/config/environments/test.rb b/config/environments/test.rb index 4fee60957b..dfaa173311 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -13,8 +13,8 @@ # config.eager_load = false config.eager_load = true - # Configure static asset server for tests with Cache-Control for performance. - config.serve_static_assets = true + # Configure static file server for tests with Cache-Control for performance. + config.serve_static_files = true config.static_cache_control = 'public, max-age=3600' # Show full error reports and disable caching. @@ -32,6 +32,9 @@ # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + # Randomize the order test cases are executed. + config.active_support.test_order = :random + # Print deprecation notices to the stderr config.active_support.deprecation = :stderr diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 5adf6bd379..a16bbba3eb 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -3,6 +3,9 @@ # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' +# Add additional assets to the asset load path +# Rails.application.config.assets.paths << Emoji.images_path + # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. Rails.application.config.assets.precompile += %w( vendor/* admin.js admin.css trade.js trade.css species.js species.css diff --git a/config/initializers/to_time_preserves_timezone.rb b/config/initializers/to_time_preserves_timezone.rb new file mode 100644 index 0000000000..8674be3227 --- /dev/null +++ b/config/initializers/to_time_preserves_timezone.rb @@ -0,0 +1,10 @@ +# Be sure to restart your server when you modify this file. + +# Preserve the timezone of the receiver when calling to `to_time`. +# Ruby 2.4 will change the behavior of `to_time` to preserve the timezone +# when converting to an instance of `Time` instead of the previous behavior +# of converting to the local system timezone. +# +# Rails 5.0 introduced this config option so that apps made with earlier +# versions of Rails are not affected when upgrading. +ActiveSupport.to_time_preserves_timezone = true diff --git a/rspec_result.txt b/rspec_result.txt new file mode 100644 index 0000000000..5f230f0f41 --- /dev/null +++ b/rspec_result.txt @@ -0,0 +1,24965 @@ +^Croot@702dd4fc5a07:/SAPI# rspec +Version 2 of the Ruby SDK will enter maintenance mode as of November 20, 2020. To continue receiving service updates and new features, please upgrade to Version 3. More information can be found here: https://aws.amazon.com/blogs/developer/deprecation-schedule-for-aws-sdk-for-ruby-v2/ + +Admin::AhoyEventsController + index + GET index + assigns to @ahoy_events sorted by time DESC + +Admin::AhoyVisitsController + index + GET index + assigns to @ahoy_events sorted by time DESC + +Admin::ChangeTypesController + GET index + assigns @change_types sorted by designation and name + renders the index template + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::CitesAcsController + index + GET index + assigns @cites_acs sorted by name + renders the index template + +Admin::CitesCopsController + index + GET index + assigns @cites_cops sorted by name + renders the index template + +Admin::CitesExtraordinaryMeetingsController + index + GET index + assigns @cites_extraordinary_meetings sorted by name + renders the index template + +Admin::CitesHashAnnotationsController + index + GET index + assigns @annotations sorted by parent_symbol and symbol + renders the index template + +Admin::CitesPcsController + index + GET index + assigns @cites_pcs sorted by name + renders the index template + +Admin::CitesSuspensionNotificationsController + index + GET index + assigns @cites_suspension_notifications sorted by name + renders the index template + +Admin::CitesSuspensionsController + GET index + renders the index template + assigns @cites_suspensions + GET new + renders the new template + assigns @geo_entities (country and territory) with two objects + POST create + renders new when not successful + when successful + renders index + GET edit + renders the edit template + assigns @geo_entities (country and territory) with two objects + PUT update + renders edit when not successful + when successful + redirects to taxon_concepts cites suspensions page + DELETE destroy + redirects after delete + +Admin::CitesTcsController + index + GET index + assigns @cites_tcs sorted by name + renders the index template + +Admin::DesignationsController + GET index + GET index + assigns @designations sorted by name + renders the index template + XHR GET index JSON + renders json for dropdown + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::DistributionsController + XHR GET 'new' + returns http success and renders the new template + assigns @geo_entities (country and territory) with two objects + assigns the distribution variable + XHR POST 'create' + renders create when successful and has an existing reference + renders create when successful and is creating a reference + XHR GET edit + renders the new template + assigns the distribution variable + assigns @geo_entities (country and territory) with two objects + XHR PUT update + responds with 200 when successful + DELETE destroy + redirects after delete + +Admin::DocumentBatchesController + GET new + when no event + renders the new template + when event + renders the new template + POST create + when no event + creates a new Document + redirects to index when successful + does not create a new Document + renders new when not successful + when event + redirects to index when successful + renders new when not successful + +Admin::DocumentsController + index + GET index + assigns @documents sorted by time of creation + search + runs a full text search on title (FAILED - 1) + retrieves documents inclusive of the given start date + retrieves documents inclusive of the given end date + retrieves documents after the given date + retrieves documents before the given date + ignores invalid dates + retrieves documents for taxon concept + retrieves documents for geo entity + by proposal outcome + retrieves documents for tag + by document tags + retrieves documents for review_phase tag + retrieves documents for process_stage tag + when no event + renders the index template + when event + renders the event/documents/index template + assigns @documents for event, sorted by title + when secretariat is logged in + returns only public documents + GET edit + renders the edit template + PUT update + when no event + redirects to index when successful + renders new when not successful + when event + redirects to index when successful + renders new when not successful + with nested review_details attributes + assign review phase to Review + assign process stage to Review + assign recommended category to Review + with nested proposal_details attributes + assign outcome to Proposal + DELETE destroy + redirects after delete + XHR GET JSON autocomplete + When no event specified + returns properly formatted json + When an event is specified + returns properly formatted json + +Admin::EcSrgsController + index + GET index + assigns @ec_srgs sorted by name + renders the index template + +Admin::EuCouncilRegulationsController + index + GET index + assigns @eu_regulations sorted by effective_at + renders the index template + +Admin::EuHashAnnotationsController + index + GET index + assigns @annotations sorted by parent_symbol and symbol + renders the index template + +Admin::EuImplementingRegulationsController + index + GET index + assigns @eu_regulations sorted by effective_at + renders the index template + +Admin::EuOpinionsController + GET index + renders the index template + renders the taxon_concepts_layout + GET new + renders the new template + assigns @geo_entities (country and territory) with two objects + POST create + when successful + when intersessional document is present + redirects to the EU Opinions index + when event is present + redirects to the EU Opinions index + when not successful + renders new + GET edit + renders the edit template + assigns @geo_entities + PUT update + when successful + when eu decision type is present + renders taxon_concepts EU Opinions page + when eu decision type is not present + renders taxon_concepts EU Opinions page + when event is present + renders taxon_concepts EU Opinions page + when event is not present + renders taxon_concepts EU Opinions page + when not successful + when eu decision type is present + renders new + when eu decision type is not present + renders new + when both eu_decision_type and srg_history are empty + renders new + when event is present + renders new + when event is not present + renders new + when both event and intersessional doc are empty + renders new + when both event and intersessional doc are present + renders new + DELETE destroy + redirects after delete + +Admin::EuRegulationsController + index + GET index + assigns @eu_regulations sorted by effective_at + renders the index template + XHR POST activate + renders create when successful + +Admin::EuSuspensionRegulationsController + index + GET index + assigns @eu_suspension_regulations sorted by effective_at + renders the index template + XHR POST activate + renders create when successful + +Admin::EuSuspensionsController + GET index + renders the index template + renders the admin layout + DELETE destroy + redirects after delete + +Admin::EventDocumentsController + ordering + GET show_order + assigns @documents sorted by sort index + POST update_order + updates sort index for collection of documents (FAILED - 2) + +Admin::EventsController + index + GET index + assigns @events sorted by name + renders the index template + XHR GET new + renders the new template + assigns the event variable + XHR POST create + renders create when successful + renders new when not successful + XHR GET edit + renders the edit template + assigns the hybrid_relationship variable + XHR PUT update JSON + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::ExportsController + GET index + renders the index template + GET download with data_type=Names + all +sh: 1: psql: not found + returns taxon concepts names file (FAILED - 3) + redirects when no results + CITES_EU +sh: 1: psql: not found + returns CITES_EU taxon concepts names file (FAILED - 4) + redirects when no results + CMS +sh: 1: psql: not found + returns CMS taxon concepts names file (FAILED - 5) + redirects when no results + GET download with data_type=Distributions + all +sh: 1: psql: not found + returns taxon concepts distributions file (FAILED - 6) + redirects when no results + CITES_EU +sh: 1: psql: not found + returns CITES_EU taxon concepts distributions file (FAILED - 7) + redirects when no results + CMS +sh: 1: psql: not found + returns CMS taxon concepts distributions file (FAILED - 8) + redirects when no results + +Admin::GeoEntitiesController + index + GET index + assigns @geo_entities sorted by name + renders the index template + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update JSON + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::HybridRelationshipsController + XHR GET new + renders the new template + assigns the hybrid_relationship variable + XHR POST create + renders create when successful + renders new when not successful + XHR GET edit + renders the edit template + assigns the hybrid_relationship variable + XHR PUT update + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::InstrumentsController + GET index + GET index + assigns @instruments sorted by name + renders the index template + XHR GET index JSON + renders json for dropdown + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + fails to delete instrument because there are dependent objects + +Admin::LanguagesController + GET index + assigns @languages sorted by iso_code1 + renders the index template + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::ListingChangesController + GET index + assigns @listing_changes sorted by effective_at + renders the index template + renders the admin layout + DELETE destroy + redirects after delete + +Admin::NomenclatureChanges::LumpController + GET show + inputs + renders the inputs template + outputs + renders the outputs template + reassignments + renders the notes template + renders the summary template + when legislation present + renders the legislation template + when no legislation + redirects to next step + POST create + redirects to lump wizard + PUT update + when successful + redirects to next step + when unsuccessful + re-renders step + when last step + when user is secretariat + redirects to admin root path + when user is manager + redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) + Previous button + when step is legislation + renders notes step + when step is summary + when legislation + renders legislation step + when no legislation + redirects to notes step + +Admin::NomenclatureChanges::SplitController + GET show + inputs + renders the inputs template + outputs + renders the outputs template + reassignments + renders the notes template + renders the summary template + when children present + renders the children template + when no children + redirects to next step + when names present + renders the names template + when no names + redirects to next step + when distribution present + renders the distribution template + when no distribution + redirects to next step + when legislation present + renders the legislation template + when no legislation + redirects to next step + POST create + redirects to split wizard + PUT update + when successful + redirects to next step + when unsuccessful + re-renders step + when last step + when user is secretariat + redirects to admin root path + when user is manager + redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) + Previous button + when step is names + when children + renders children template + when no children + redirects to notes step + when step is distribution + when names + renders names template + when no names and no children + redirects to notes step + when step is legislation + when distribution + renders distribution template + when no distribution and no names + redirects to children step + when step is summary + when legislation + renders legislation template + when no legislation and no distribution + redirects to names step + +Admin::NomenclatureChanges::StatusSwapController + GET show + primary_output + renders the primary_output template + swap + renders the swap template + reassignments + when legislation present + renders the legislation template + when no legislation + redirects to next step + summary + renders the summary template + POST create + redirects to status_change wizard + PUT update + when successful + redirects to next step + when unsuccessful + re-renders step + when last step + when user is secretariat + redirects to admin root path + when user is manager + redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) + +Admin::NomenclatureChanges::StatusToAcceptedController + GET show + primary_output + renders the primary_output template + summary + renders the summary template + POST create + redirects to status_change wizard + PUT update + when successful + redirects to next step + when unsuccessful + re-renders step + when last step + when user is secretariat + redirects to admin root path + when user is manager + redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) + +Admin::NomenclatureChanges::StatusToSynonymController + GET show + primary_output + renders the primary_output template + relay + renders the relay template + summary + renders the summary template + POST create + redirects to status_change wizard + PUT update + when successful + redirects to next step + when unsuccessful + re-renders step + when last step + when user is secretariat + redirects to admin root path + when user is manager + redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) + +Admin::NomenclatureChangesController + GET index + assigns @nomenclature_changes sorted by designation and name + renders the index template + DELETE destroy + redirects after delete + +Admin::RanksController + GET index + assigns @ranks sorted by taxonomic position + renders the index template + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::ReferencesController + index + GET index + assigns @references sorted by citation + renders the index template + XHR GET index JSON + renders json for dropdown + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update JSON + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::SpeciesListingsController + index + assigns @species_listings sorted by designation and name + renders the index template + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::SrgHistoriesController + GET index + renders the index template + POST create + when successful + renders the create js template + when not successful + renders new + PUT update + when successful + renders the create js template + when not successful + renders new + DELETE destroy + redirects after delete + +Admin::SynonymRelationshipsController + XHR GET new + renders the new template + assigns the synonym_relationship variable + XHR POST create + renders create when successful + renders new when not successful + XHR GET edit + renders the edit template + assigns the synonym_relationship variable + XHR PUT update + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::TagsController + GET index + renders the index template + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update + when JSON + responds with 200 when successful + responds with json error when not successful + DELETE destroy + redirects after delete + +Admin::TaxonCitesSuspensionsController + GET index + renders the index template + renders the taxon_concepts_layout + GET new + renders the new template + POST create + renders new when not successful + when successful + renders index + GET edit + renders the edit template + PUT update + renders edit when not successful + when successful + renders taxon_concepts cites suspensions page + DELETE destroy + redirects after delete + Authorization for contributors + GET index + renders the index template + renders the taxon_concepts_layout + DELETE destroy + fails to delete and redirects + +Admin::TaxonCommonsController + XHR GET 'new' + returns http success and renders the new template + XHR POST create + renders create when successful + renders new when not successful + XHR GET edit + renders the edit template + assigns the taxon common variable + XHR PUT update + renders create when successful + renders new when not successful + DELETE destroy + redirects after delete + ChangeObserver updates TaxonConcept's dependents_updated_at + when TaxonCommon is changed + updates associated @taxon_concept's + dependents_updated_at when taxon common is updated + updates associated @taxon_concept's + dependents_updated_at when taxon common is deleted + Authorization for contributors + DELETE destroy + fails to delete and redirects + +Admin::TaxonConceptCommentsController + GET index + renders the index template + POST create + redirects to index with notice when success + PUT update + redirects to index with notice when success + +Admin::TaxonConceptReferencesController + XHR POST create + renders create when successful + renders new when not successful + XHR GET edit + renders the edit template + assigns the taxon concept reference variable + XHR PUT update + renders create when successful + renders new when not successful + XHR GET 'new' + returns http success and renders the new template + DELETE destroy + redirects after delete + +Admin::TaxonConceptsController + GET index + renders the index template + redirects if 1 result + assigns taxa in taxonomic order + XHR POST create + renders create when successful + renders new when not successful + renders new_synonym when not successful S + renders new_hybrid when not successful H + renders new_synonym when not successful N + XHR PUT update + when JSON + responds with 200 when successful + responds with json error when not successful + when HTML + redirects to edit when successful + renders edit when not successful + DELETE destroy + redirects after delete + DELETE destroy doesn't work for non managers + redirects to admin root path and doesn't delete + when E-library Viewer + redirects to root path + redirects to root path and doesn't delete + XHR GET JSON autocomplete + returns properly formatted json + +Admin::TaxonEuSuspensionsController + GET index + renders the index template + renders the taxon_concepts_layout + GET new + renders the new template + assigns @geo_entities (country and territory) with two objects + POST create + when successful + redirects to the EU suspensions index + when not successful + renders new + GET edit + renders the edit template + assigns @geo_entities + PUT update + when successful + when eu_decision_type is present + renders taxon_concepts EU suspensions page + when eu_decision_type is not present + renders taxon_concepts EU suspensions page + when not successful + when eu_decision_type is present + renders new + when eu_decision_type is not present + renders new + when both eu_decision_type and srg_history are empty + renders new + DELETE destroy + redirects after delete + Authorization for contributors + GET index + renders the index template + renders the taxon_concepts_layout + DELETE destroy + fails to delete and redirects + +Admin::TaxonListingChangesController + GET index + assigns @listing_changes sorted by effective_at + renders the index template + renders the taxon_concepts_layout + GET new + renders the new template + assigns @listing_change + POST create + renders new when not successful + when successful + redirects to taxon_concept listing_changes page + GET edit + renders the edit template + assigns the listing_change variable + PUT update + renders edit when not successful + redirects to index page and removes annotation when fields cleared + when successful + redirects to taxon_concept listing_changes page + redirects to eu regulation listing changes page when param is set + DELETE destroy + redirects after delete + Authorization for contributors + GET index + renders the index template + renders the taxon_concepts_layout + DELETE destroy + fails to delete and redirects + +Admin::TaxonQuotasController + GET index + renders the index template + renders the taxon_concepts_layout + GET new + renders the new template + assigns @geo_entities (country and territory) with two objects + POST create + renders new when not successful + when successful + renders index + GET edit + renders the edit template + assigns @geo_entities (country and territory) with two objects + PUT update + renders new when not successful + when successful + renders taxon_concepts quotas page + DELETE destroy + redirects after delete + Authorization for contributors + GET index + renders the index template + renders the taxon_concepts_layout + DELETE destroy + fails to delete and redirects + +Admin::TaxonRelationshipsController + GET index + assigns @taxon_relationships + renders the index template + renders the taxon_concepts_layout + XHR POST create + renders create when successful + renders new when not successful + DELETE destroy + when relationship is bidirectional + destroys relationship for taxon concept + should change #count by -2 + destroys relationship for other taxon concept + should change #count by -2 + when relationship is not bidirectional + destroys relationship for taxon concept + should change #count by -1 + destroys relationship for other taxon concept + should change #count by -1 + +Admin::TaxonomiesController + index + GET index + assigns @taxonomies sorted by name + renders the index template + XHR GET index JSON + renders json for dropdown + XHR POST create + renders create when successful + renders new when not successful + XHR PUT update JSON + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + Authorization for contributors + GET index + redirects to admin root + DELETE destroy + fails to delete and redirects to admin_root_path + +Admin::TradeNameRelationshipsController + XHR GET new + renders the new template + assigns the trade_name_relationship variable + XHR POST create + renders create when successful + renders new when not successful + XHR GET edit + renders the edit template + assigns the trade_name_relationship variable + XHR PUT update + responds with 200 when successful + responds with json when not successful + DELETE destroy + redirects after delete + +Admin::UsersController + index + GET index + renders the index template + XHR POST create + renders create when successful + renders new when not successful + XHR GET edit + renders the edit template + assigns the hybrid_relationship variable + XHR PUT update JS + responds with 200 when successful + responds with template new when not successful + DELETE destroy +unknown OID 3802: failed to recognize type of 'validation_report'. It will be treated as String. + redirects after delete + +Api::V1::AutoCompleteTaxonConceptsController +Procedure: taxonomy + GET index + returns 1 result when searching for species name and filtering for rank SPECIES (FAILED - 9) + returns 3 results when searching for species name and not filtering by rank (FAILED - 10) + +Api::V1::DocumentGeoEntitiesController + when searching by taxon concept name +Procedure: taxonomy + returns Poland when searching by wolf (FAILED - 11) + returns 0 geo entities when no match for taxon name (FAILED - 12) + returns all geo entities when no taxon name given (FAILED - 13) + +Api::V1::DocumentsController + GET index returns all documents + GET index contributor + returns all documents + GET index manager + returns all documents + GET index returns only public documents + GET index api user + returns only public documents + GET index no user + returns only public documents + GET index returns only public documents for secretariat role + GET index api user + returns only public documents + show action fails + should return 403 status when permission denied + GET should retrieve documents with no event_type + returns documents with no event_type + download documents + single document selected + should return 404 if file is missing + should return zip file if file is found + multiple documents selected + should return 404 if all files are missing + should return zip file if at least a file is found + cascading documents logic + should get subspecies documents + +Api::V1::EventsController + GET index + returns only E-library events most recent first (FAILED - 14) + +Api::V1::GeoEntitiesController + GET index + returns regions + returns countries & territories + +Api::V1::PurposesController + GET index + returns purposes (FAILED - 15) + +Api::V1::SourcesController + GET index + returns sources (FAILED - 16) + +Api::V1::TaxonConceptsController + GET index + logs with Ahoy with different parameters (FAILED - 17) + +Api::V1::TermsController + GET index + returns terms (FAILED - 18) + +Api::V1::UnitsController + GET index + returns units (FAILED - 19) + +Checklist::GeoEntitiesController + GET index + returns regions + returns countries & territories + +Checklist::TaxonConceptsController + XHR GET JSON autocomplete +Procedure: taxonomy + when searching by accepted name + returns 1 result (FAILED - 20) + when query blank + returns 0 results (FAILED - 21) + +CitesTrade::ExportsController + GET download + raw format + returns count of shipments + comptab +sh: 1: psql: not found + returns comptab shipments file (FAILED - 22) +sh: 1: psql: not found + logs download information from public interface to the TradeDataDownload model (FAILED - 23) + when shipments cannot be retrieved + redirects to home page + +CitesTrade::ShipmentsController + GET index +Procedure: taxonomy + should return all comptab shipments (FAILED - 24) +Procedure: taxonomy + should return all gross_exports shipments (FAILED - 25) +Procedure: taxonomy + should return genus & species shipments when searching by genus (FAILED - 26) +Procedure: taxonomy + should return family, genus & species shipments when searching by family (FAILED - 27) +Procedure: taxonomy + should return genus shipments when searching by taxon (FAILED - 28) + serializer +Procedure: taxonomy + should return comptab export when report_type invalid (FAILED - 29) +Procedure: taxonomy + should return comptab export when report_type = comptab (FAILED - 30) +Procedure: taxonomy + should return gross net export when report_type = gross_exports (FAILED - 31) + +PagesController + GET eu_legislation + assigns annex regulations sorted by effective_at + assigns suspension regulations + +RegistrationsController + when editing own account +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:account_update, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) + should update name +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:account_update, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) + should update password +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:account_update, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) + should not update that account if not valid + when editing another user's account +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:account_update, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) + should not update that account + when signing up +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:account_update, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) +DEPRECATION WARNING: [Devise] Parameter sanitization through a "Devise::ParameterSanitizer#sign_up" method is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method on your sanitizer `initialize` method. + + class Devise::ParameterSanitizer < Devise::ParameterSanitizer + def initialize(*) + super + permit(:sign_up, keys: [:param1, :param2, :param3]) + end + end + (called from block (4 levels) in at /SAPI/spec/controllers/registrations_controller_spec.rb:51) + should create an account with the role set to api (FAILED - 32) + +Species::ExportsController + when data type and filters not given + returns unprocessable entity status + with ip address to csv separator conversion + sets separator to comma with local ip address + sets separator to comma with UK ip address + sets separator to semicolon with AF ip address + sets separator back to comma when a user overrides the encoded default + sets separator to comma when IP address is nil + sets separator to comma when IP address is unknown + +Trade::AnnualReportUploadsController + GET index +sh: 1: psql: not found + should return all annual report uploads (FAILED - 33) +sh: 1: psql: not found + should return annual report uploads in progress (FAILED - 34) + GET show +sh: 1: psql: not found + should return success (FAILED - 35) + POST create +sh: 1: psql: not found + should return success in jQuery File Upload way (FAILED - 36) + should return error in jQuery File Upload way + +Trade::EmberController + GET 'start' + returns http success + +Trade::ExportsController + GET download + raw format + returns count of shipments +sh: 1: psql: not found + does not log download information from the admin interface + when shipments cannot be retrieved + redirects to home page + +Trade::SandboxShipmentsController + PUT update +sh: 1: psql: not found + should return success when taxon_name not set (FAILED - 37) +sh: 1: psql: not found + should return success when taxon_name does not exist (FAILED - 38) + DELETE destroy +sh: 1: psql: not found + should return success (FAILED - 39) + POST update_batch +sh: 1: psql: not found + should return success (FAILED - 40) + POST destroy_batch +sh: 1: psql: not found + should return success (FAILED - 41) + +Trade::ShipmentsController + GET index +Procedure: taxonomy + should return all shipments (FAILED - 42) +Procedure: taxonomy + should return genus & species shipments when searching by genus (FAILED - 43) +Procedure: taxonomy + should return 1 shipment when searching for reporter_type I (FAILED - 44) + PUT update +Procedure: taxonomy + should auto resolve accepted taxon when blank (FAILED - 45) +Procedure: taxonomy + should not auto resolve accepted taxon when given (FAILED - 46) +Procedure: taxonomy + should delete orphaned permits (FAILED - 47) + POST update_batch +Procedure: taxonomy + should change reporter type from I to E (FAILED - 48) +Procedure: taxonomy + should change reporter type from E to I (FAILED - 49) +Procedure: taxonomy + should update year (FAILED - 50) +Procedure: taxonomy + should auto resolve accepted taxon when blank (FAILED - 51) +Procedure: taxonomy + should not auto resolve accepted taxon when given (FAILED - 52) +Procedure: taxonomy + should set permit number to blank and delete orphaned permits (FAILED - 53) + POST destroy_batch +Procedure: taxonomy + should delete 1 shipment (FAILED - 54) +Procedure: taxonomy + should delete 5 shipment (FAILED - 55) +Procedure: taxonomy + should delete 2 shipments (FAILED - 56) +Procedure: taxonomy + should delete 1 shipments (FAILED - 57) +Procedure: taxonomy + should delete all shipments (FAILED - 58) +Procedure: taxonomy + shouldn't delete any shipments (FAILED - 59) +Procedure: taxonomy + should delete 1 shipment (FAILED - 60) +Procedure: taxonomy + should delete 3 shipment (FAILED - 61) +Procedure: taxonomy + should delete 0 shipments (FAILED - 62) +Procedure: taxonomy + should delete 4 shipments (FAILED - 63) +Procedure: taxonomy + should delete orphaned permits (FAILED - 64) + DELETE destroy +Procedure: taxonomy + should delete 1 shipment (FAILED - 65) +Procedure: taxonomy + should delete orphaned permits (FAILED - 66) + +Trade::ValidationErrorsController + PUT update +sh: 1: psql: not found + should update is_ignored (FAILED - 67) + GET show +sh: 1: psql: not found + should return success (FAILED - 68) + +Trade::ValidationRulesController + GET index + should return success + +Admin::NomenclatureChangesHelper + split_blurb + split with input + should match "Genus1 lupus2465" + split with outputs + should match "Genus1 lupus2473" + split with output new taxon + should match "Genus1 lupus2488" + lump_blurb + lump with inputs + should match "Lupus2496 lupus2495" + lump with output + should match "Lupus2528 lupus2527" + lump with output new taxon + should match "Errorus fatalus" + status_change_blurb + status upgrade with primary output + should match "Ridiculus fatalus" + status upgrade with swap + should match "Confundus totalus" + +AdminHelper + edit_icon + ouputs pencil icon for edit + delete_icon + ouputs bin icon for delete + true_false_icon + outputs tick icon for true + outputs blank for false + +ListingChangesHelper + geo_entities_tooltip + outputs all geo entities comma separated + annotation_tooltip + outputs the regular annotation in both short and long English form + hash_annotation_tooltip + outputs the hash annotation in long English form + excluded_geo_entities_tooltip + no exclusions + should output blank exception + geographic exclusion + should list geographic exception + excluded_taxon_concepts_tooltip + no exclusions + should output blank exception + taxonomic exclusion + should list taxonomic exception + +Home page +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:account_update, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) + redirects Data Manager to admin root path +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:account_update, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) + redirects Data Contributor to admin root path +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:account_update, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) + redirects E-library Viewer to public root path +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:sign_up, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) +DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. +Please use the `permit` method to add or remove any key: + + To add any new key, use the `keys` keyword argument: + devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) + + To remove any existing key, use the `except` keyword argument: + devise_parameter_sanitizer.permit(:account_update, except: [:email]) + (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) + redirects API User to public root path + +Annotation + full_name + when parent_symbol given + example at ./spec/models/annotation_spec.rb:33 + when event given + example at ./spec/models/annotation_spec.rb:40 + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + when listing changes + should be falsey + when hashed listing changes + should be falsey + +ApiRequest + top_50_most_active_users + should eq 3398 + recent_requests + example at ./spec/models/api_request_spec.rb:63 (FAILED - 69) + requests_by_response_status + should eq {"200"=>1, "400"=>0, "401"=>0, "404"=>0, "422"=>0, "500"=>1} + requests_by_controller + should eq {"taxon_concepts"=>2, "distributions"=>0, "cites_legislation"=>0, "eu_legislation"=>0, "references"=>0} + +ChangeType + abbreviation + change type with single word name + should == "Wor" + change type with two words name + should == "Wor-Wor" + +Checklist +Procedure: taxonomy + ann_symbol + for species Caiman latirostris + example at ./spec/models/checklist/annotations_spec.rb:16 (FAILED - 70) + for species Panax ginseng + example at ./spec/models/checklist/annotations_spec.rb:20 (FAILED - 71) + +Checklist +Procedure: taxonomy + search by cites populations + when America + example at ./spec/models/checklist/appendix_population_and_region_spec.rb:14 (FAILED - 72) + when Mexico + example at ./spec/models/checklist/appendix_population_and_region_spec.rb:25 (FAILED - 73) + when Canada + example at ./spec/models/checklist/appendix_population_and_region_spec.rb:36 (FAILED - 74) + when Argentina + example at ./spec/models/checklist/appendix_population_and_region_spec.rb:47 (FAILED - 75) + when South America + example at ./spec/models/checklist/appendix_population_and_region_spec.rb:58 (FAILED - 76) + when North America + example at ./spec/models/checklist/appendix_population_and_region_spec.rb:69 (FAILED - 77) + when North America and Argentina + example at ./spec/models/checklist/appendix_population_and_region_spec.rb:81 (FAILED - 78) + +Checklist +Procedure: taxonomy + search by cites populations + when Nepal + example at ./spec/models/checklist/appendix_population_spec.rb:15 (FAILED - 79) + when Poland + example at ./spec/models/checklist/appendix_population_spec.rb:26 (FAILED - 80) + search by cites appendices + when App I + example at ./spec/models/checklist/appendix_population_spec.rb:40 (FAILED - 81) + when App II + example at ./spec/models/checklist/appendix_population_spec.rb:51 (FAILED - 82) + when App III + example at ./spec/models/checklist/appendix_population_spec.rb:62 (FAILED - 83) + search by cites populations and appendices + when Nepal + when App I + example at ./spec/models/checklist/appendix_population_spec.rb:78 (FAILED - 84) + when App II + example at ./spec/models/checklist/appendix_population_spec.rb:90 (FAILED - 85) + when Poland + when App I + example at ./spec/models/checklist/appendix_population_spec.rb:104 (FAILED - 86) + when App II + example at ./spec/models/checklist/appendix_population_spec.rb:116 (FAILED - 87) + when Poland or Nepal + when App I + example at ./spec/models/checklist/appendix_population_spec.rb:130 (FAILED - 88) + when App II + example at ./spec/models/checklist/appendix_population_spec.rb:142 (FAILED - 89) + when App I or II + when Poland + example at ./spec/models/checklist/appendix_population_spec.rb:156 (FAILED - 90) + when Nepal + example at ./spec/models/checklist/appendix_population_spec.rb:168 (FAILED - 91) + +Checklist +Procedure: taxonomy + when filtering by appendix + I + should return Cacatua goffiniana (FAILED - 92) + should not return Agapornis roseicollis (FAILED - 93) + +Checklist::Checklist + summarise_filters + when params empty + should == "All results" + when 1 region + should == "Results from 1 region" + when > 1 region + should == "Results from 2 regions" + +Checklist +Procedure: taxonomy + when common names displayed + should return all English names for Arctocephalus australis: 'South American Fur Seal, Southern Fur Seal' (FAILED - 94) + should return all Spanish names for Arctocephalus australis: 'Lobo fino sudamericano, Oso marino austral' (FAILED - 95) + should return all French names for Arctocephalus australis: 'Otarie à fourrure australe' (FAILED - 96) + should return all English names for Arctocephalus spp.: 'Fur seals, Southern fur seals' (FAILED - 97) + should return all Spanish names for Arctocephalus spp.: 'Osos marinos' (FAILED - 98) + should return all French names for Arctocephalus spp.: 'Arctocéphales du sud, Otaries à fourrure, Otaries à fourrure du sud' (FAILED - 99) + should include a species without any common names defined (FAILED - 100) + +Checklist::HigherTaxaInjector + run + when same phylum + when two species from different classes +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:122 (FAILED - 101) + when two species from different classes and expand_headers set +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:139 (FAILED - 102) + when same order + when two species from different families +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:158 (FAILED - 103) + when two species from different families and skip family set +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:171 (FAILED - 104) + higher_taxa_headers + when same genus + when one species +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:188 (FAILED - 105) + when one species and skip family set +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:201 (FAILED - 106) + when one species and expand headers set +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:213 (FAILED - 107) + when two species +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:228 (FAILED - 108) + when species and subspecies +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:241 (FAILED - 109) + when same family + when two species from different genera +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:256 (FAILED - 110) + when same order + when two species from different families +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:271 (FAILED - 111) + when two species from different families and expand headers set +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:286 (FAILED - 112) + when genus and different family +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:301 (FAILED - 113) + when family and genus in different family +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:316 (FAILED - 114) + when same class + when order and genus from different order +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:333 (FAILED - 115) + when order and genus from different order and expand headers set +Procedure: taxonomy + example at ./spec/models/checklist/higher_taxa_injector_spec.rb:348 (FAILED - 116) + +Checklist::HigherTaxaItem + ancestors_path + when animal + should == "Chordata,Reptilia,Crocodylia,Alligatoridae" + when plant + should == "Agavaceae" + +Checklist +Procedure: taxonomy + when taxonomic order + Plantae + should include Agave (Agavaceae) before Panax (Araliaceae) (FAILED - 117) + Animalia + should include birds after last mammal (FAILED - 118) + should include Falconiformes (Aves) before Psittaciformes (Aves) (FAILED - 119) + should include Cathartidae within Falconiformes (FAILED - 120) + should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) (FAILED - 121) + should include Cathartidae (Falconiformes) before Cacatuidae (Psittaciformes) (FAILED - 122) + should include Hirudo medicinalis at the very end (after all Chordata) (FAILED - 123) + when alphabetical order + should include Falconiformes (Aves) before Psittaciformes (Aves) (FAILED - 124) + should include Cathartidae before Falconiformes (FAILED - 125) + should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) (FAILED - 126) + should include Cathartidae (Falconiformes) after Cacatuidae (Psittaciformes) (FAILED - 127) + +Checklist::Pdf::HistoryAnnotationsKey + annotations_key + should == "\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in" + hash_annotations_key +Procedure: taxonomy + example at ./spec/models/checklist/pdf/history_annotations_key_spec.rb:59 (FAILED - 128) + +Checklist::Pdf::History + higher_taxon_name + when family +Procedure: taxonomy + example at ./spec/models/checklist/pdf/history_spec.rb:38 (FAILED - 129) + listed_taxon_name + when family +Procedure: taxonomy + example at ./spec/models/checklist/pdf/history_spec.rb:56 (FAILED - 130) + when genus +Procedure: taxonomy + example at ./spec/models/checklist/pdf/history_spec.rb:71 (FAILED - 131) + annotation_for_language + annotation with footnote +Procedure: taxonomy + example at ./spec/models/checklist/pdf/history_spec.rb:99 (FAILED - 132) + +Checklist::Pdf::IndexAnnotationsKey + annotations_key + should == "\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in" + hash_annotations_key +Procedure: taxonomy + example at ./spec/models/checklist/pdf/index_annotations_key_spec.rb:46 (FAILED - 133) + non_hash_annotations_key +Procedure: taxonomy + example at ./spec/models/checklist/pdf/index_annotations_key_spec.rb:102 (FAILED - 134) + +Checklist::Pdf::IndexFetcher + with common names +Procedure: taxonomy + example at ./spec/models/checklist/pdf/index_fetcher_spec.rb:49 (FAILED - 135) + with synonyms and authors +Procedure: taxonomy + example at ./spec/models/checklist/pdf/index_fetcher_spec.rb:77 (FAILED - 136) + +Checklist +Procedure: taxonomy + when filtering by name + by scientific name + example at ./spec/models/checklist/scientific_name_spec.rb:15 (FAILED - 137) + by common name + example at ./spec/models/checklist/scientific_name_spec.rb:28 (FAILED - 138) + +Checklist +Procedure: taxonomy + when synonyms displayed + should return Alligator cynocephalus as synonym for Caiman latirostris (FAILED - 139) + +Species::TaxonConceptPrefixMatcher +Procedure: taxonomy + results + when query in capital letters + example at ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:13 (FAILED - 140) + when match on accepted name + example at ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:22 (FAILED - 141) + when match on synonym + example at ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:31 (FAILED - 142) + when match on common name + example at ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:40 (FAILED - 143) + +Checklist::Timeline + when deleted +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:23 (FAILED - 144) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:24 (FAILED - 145) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:25 (FAILED - 146) + when deleted from III multiple times +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:83 (FAILED - 147) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:84 (FAILED - 148) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:85 (FAILED - 149) + when deleted and then readded +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:112 (FAILED - 150) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:113 (FAILED - 151) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:114 (FAILED - 152) + when reservation withdrawn +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:154 (FAILED - 153) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:155 (FAILED - 154) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:156 (FAILED - 155) + when reservation withdrawn and then readded +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:202 (FAILED - 156) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:203 (FAILED - 157) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:204 (FAILED - 158) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:205 (FAILED - 159) + when added multiple times +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:227 (FAILED - 160) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:231 (FAILED - 161) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:232 (FAILED - 162) + when automatic deletion from ancestor listing +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:256 (FAILED - 163) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:260 (FAILED - 164) +Procedure: taxonomy + example at ./spec/models/checklist/timeline_spec.rb:261 (FAILED - 165) + +Checklist::TimelinesForTaxonConcept + timelines + when Appendix I +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:25 (FAILED - 166) +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:26 (FAILED - 167) + when Appendix III +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:46 (FAILED - 168) +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:47 (FAILED - 169) + when Appendix III reservation +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:67 (FAILED - 170) +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:68 (FAILED - 171) +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:69 (FAILED - 172) + timeline_years + when in 1990 +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:81 (FAILED - 173) +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:82 (FAILED - 174) +Procedure: taxonomy + example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:83 (FAILED - 175) + +CitesCaptivityProcess + add some examples to (or delete) /SAPI/spec/models/cites_captivity_process_spec.rb (PENDING: Not yet implemented) + +CitesCop + create + when designation invalid + should be invalid + should have 1 error on :designation_id + when effective_at is blank + should be invalid + should have 1 error on :effective_at + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + when listing changes + should be falsey + +CitesSuspensionNotification + create + when designation invalid + should be invalid + should have 1 error on :designation_id + when effective_at is blank + should be invalid + should have 1 error on :effective_at + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + when start notification + should be falsey + when end notification + should be falsey + when confirmation notification, make sure it gets destroyed + example at ./spec/models/cites_suspension_notification_spec.rb:85 (FAILED - 176) + end_date_formatted + should == "10/05/2012" + bases_for_suspension + example at ./spec/models/cites_suspension_notification_spec.rb:103 + +CitesSuspension + touching taxa + create + when taxon specific suspension + should change result + when global suspension + should change result + when suspension at higher taxonomic level + should change result + update + when taxon specific suspension + should change result + when global suspension + should change result + should change result + when suspension at higher taxonomic level + should change result + destroy + when taxon specific suspension + should change result + when global suspension + should change result + when suspension at higher taxonomic level + should change result + validations + create + when start notification missing + should be invalid + should have 1 error on :start_notification_id + when start date greater than end date + should be invalid + should have 1 error on :start_date + when valid + should be valid + create + downloads cache should be populated + should not be empty + destroy + downloads cache should be cleared + should be empty + +CmsMapping + add some examples to (or delete) /SAPI/spec/models/cms_mapping_spec.rb (PENDING: Not yet implemented) + +CommonName + Generating PDF + english_to_pdf + should print last word before the first word, separated by comma + should print the last word before the other words, separated by comma + should print the single word, if the common name is composed of only one word + +DashboardStats + #new + takes three parameters and returns a DashboardStats object + #species +Procedure: taxonomy + has one results for argentina (FAILED - 177) + has no results for ghana (FAILED - 178) + +DashboardStats + #trade + when no time range specified +Procedure: taxonomy + argentina should have 40 exported animals and no imports (FAILED - 179) + when time range specified +Procedure: taxonomy + argentina should have no exports in 2012-2012 (FAILED - 180) + +Designation + create + when valid + should be valid + when name missing + should be invalid + should have 1 error on :name + when name duplicated + should be invalid + should have 1 error on :name + update + when updating a non-protected name + should be truthy + when updating a protected name + should be falsey + when updating taxonomy with no dependent objects attached + should be truthy + when updating taxonomy with dependent objects attached + should be falsey + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + should be falsey + when protected name + should be falsey + +DocumentBatch + save + when invalid + should be falsey + should not change result + when valid + should be truthy + should change result by 1 + +DocumentSearch + results + when searching by Swietenia macrophylla + should eq [645, 646, 647, 648, 649] + when searching by Brazil + should eq [654, 655, 656, 657] + when searching by Swietenia macrophylla in Brazil + should eq [661, 662] + when searching by Swietenia macrophylla in Brazil and Belize + should eq [667, 668, 669, 670] + documents_need_refreshing? + when no changes in last 5 minutes + should be falsey + when document created in last 5 minutes + should be truthy + when document destroyed in last 5 minutes + should be truthy + when document updated in last 5 minutes + should be truthy + citations_need_refreshing? + when no changes in last 5 minutes + should be falsey + when citation created in last 5 minutes + should be truthy + when citation destroyed in last 5 minutes + should be truthy + when citation updated in last 5 minutes + should be truthy + +Document + create + when date is blank + should be invalid + should have 1 error on :date + setting title from filename + should eq "Annual report upload exporter" + when specified designation conflicts with event + should eq # + when documents with same language and same primary document + should be invalid + should have 1 error on :primary_language_document_id + update + when primary document sort_index_updated + secondary document sort_index is in sync + when secondary document sort_index_updated + primary document sort_index is in sync + destroy + when secondary document destroyed + document count decreases by 1 + when primary document destroyed + document count decreases by 1 + secondary document becomes primary + +EuDecision + create + downloads cache should be populated +sh: 1: psql: not found + example at ./spec/models/eu_decision_spec.rb:68 (FAILED - 181) + save + Eu decision type and SRG history can't be blank at the same time + should be falsey + should have an error message + Eu decision creates correctly if only Eu decision type is populated + should be truthy + Eu decision creates correctly if only SRG history is populated + should be truthy + Eu decision creates correctly if both Eu decision type and SRG history are populated + should be truthy + destroy + downloads cache should be cleared + should be empty + +EuOpinion + create + when taxon concept missing + should be invalid + should have 1 error on :taxon_concept + when geo_entity missing + should be invalid + should have 1 error on :geo_entity + when start_date missing + should be invalid + should have 1 error on :start_date + when valid + should be valid + +EuRegulation + create + when eu_regulation to copy from given + should == 1 + when designation invalid + should be invalid + should have 1 error on :designation_id + when effective_at is blank + should be invalid + should have 1 error on :effective_at + activate + should be truthy + should == 1 + deactivate + should be falsey + should == 1 + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + when listing changes + should be truthy + +EuSuspension + create + when taxon concept missing + should be invalid + should have 1 error on :taxon_concept + when geo_entity missing + should be invalid + should have 1 error on :geo_entity + when valid + should be valid + is_current + when start_event and end_event not set + should be falsey + when start_event is set but date is in the future + should be falsey + when start_event is set but is not current + should be falsey + when start_event is set but date is in past or present + should be truthy + should be truthy + when end_event is set, but no start_event is set + should be falsey + when end_event is set, and start_event is set with date in future + should be falsey + when start_event is set, and end_event is set with date in the future + should be truthy + when start_event is set, and end_event is set with date in the past + should be falsey + start_date_formatted + when there's no start_event + should be empty + when there's start_event + should == "02/01/2024" + end_date_formatted + when there's no end_event + should be empty + when there's end_event + should == "02/01/2024" + +Event + create + when valid + should be valid + when name missing + should be invalid + should have 1 error on :name + when name duplicated + should be invalid + should have 1 error on :name + when url invalid + should be invalid + should have 1 error on :url + effective_at_formatted + should == "10/05/2012" + +GeoEntitySearch + results + when searching by geo entity types set + default set + default locale + should include # + should not include # + Checklist regions (1) + should include # + should eq 1 + Checklist countries & territories (2) + should not include # + should include # + should include # + should include # + should not include # + Species+ regions, countries & territories (3) + English locale + should include # + should not include # + should include # + should not include # + should eq 1 + should eq 2 + Spanish locale + should include # + should not include # + should include # + should not include # + should eq 2 + should eq 1 + Trade countries, territories and trade entities (4) + should not include # + should include # + should include # + should include # + should include # + cached_results + should not include # + +GeoEntity + nodes_and_descendants + Europe should contain Europe, Poland and Wolin + should include 2324, 2322, and 2323 + should == 3 + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + when distributions + should be falsey + when exported shipments + should be falsey + when imported shipments + should be falsey + when originated shipments + should be falsey + when connected geo entities + should be falsey + +HtmlToLatex + convert + when italics + when tag closed + should == "Text about \\textit{Foobarus lolus} and friends" + when tag not closed + should == "Text about \\textit{Foobarus lolus and friends}" + when paragraph + when tag closed + should == "Text, \\newline paragraph\\newline and some more text" + when tag not closed + should == "Text, \\newline paragraph and some more text" + when latex special characters + within tags + should == "\\textbf{Lolus \\& friends}" + outside of tags + should == "\\textbf{Lolus} \\& friends" + +TaxonRelationship + when hybrid + should include "Lolcatus lolatus x lolcatus" + should include "Lolcatus lolatus x lolcatus" + +ListingChange + validations + create + all fine with exception + should be valid + inclusion taxon concept is lower rank + should have 1 error on :inclusion_taxon_concept_id + species listing designation mismatch + should have 1 error on :species_listing_id + event designation mismatch + should have 1 error on :event_id + effective_at_formatted + should == "10/05/2012" + duplicates + example at ./spec/models/listing_change_spec.rb:103 + +NomenclatureChange::DeleteUnreassignedProcessor + run + delete unreassigned + should eq 1 + should eq 2 + should eq 1 + +NomenclatureChange::FullReassignment + process + when distributions present + should eq 1 + when references present + should eq 1 + when listing changes present + should eq 1 + when EU Opinions present + should eq 1 + when EU Suspensions present + should eq 1 + when CITES Quotas present + should eq 1 + when CITES Suspensions present + should eq 1 + when common names present + should eq 1 + when document citations present + should eq 1 + +NomenclatureChange::Input + validate + when nomenclature change not specified + should not be valid + when taxon concept not specified + should not be valid + +NomenclatureChange::Lump::Constructor + inputs + build_inputs + when previously no inputs in place + should not eq 0 + when previously inputs in place + should eq #, #]> + outputs + build_output + when previously no output in place + should not be nil + when previously output in place + should eq # + reassignments + build_input_and_output_notes + when previously no notes in place + should not be blank + should not be blank + when output = input + should be blank + when previously notes in place + should eq "blah" + should eq "blah" + build_parent_reassignments + when previously no reassignments in place + when no children + should eq 0 + when children + should eq 2 + when previously reassignments in place + should eq # + when output = input + should eq [#] + when previously reassignments in place + should eq # + build_name_reassignments + when previously no reassignments in place + when no names + should eq 0 + when names + should eq 2 + when previously reassignments in place + should eq # + when output = input + should eq [#] + build_distribution_reassignments + when previously no reassignments in place + when no distibutions + should eq 0 + when distributions + should eq 2 + when previously reassignments in place + should eq # + build_document_reassignments + when previously no reassignments in place + when no document citations + should eq 0 + when document citations + should eq 2 + build_legislation_reassignments + when previously no reassignments in place + when no CITES listings + should eq 0 + when CITES listings + should eq 1 + when previously reassignments in place + should eq # + build_common_names_reassignments + when previously no reassignments in place + when no common names + should eq 0 + when common names + should eq 1 + when previously reassignments in place + should eq #]> + build_references_reassignments + when previously no reassignments in place + when no references + should eq 0 + when references + should eq 1 + when previously reassignments in place + should eq #]> + +NomenclatureChange::OutputTaxonConceptProcessor + run + when output is existing taxon + should be nil + when output is new taxon + should eq "Errorus fatalus" + when output is existing taxon with new status + should be nil + should eq "A" + when output is existing taxon with new name + should eq "Errorus fatalus fatalus" + should eq "A" + should eq "Errorus lolcatus" + +NomenclatureChange::Lump::Processor + run + when outputs are existing taxa + should not change #count + should not change #full_name + relationships and trade + should be is synonym + should include # "SPECIES", "kingdom_id" => "24848", "kingdom_name" => "Lupus4801", "phylum_id" => "24849", "phylum_name" => "Lupus4800", "class_id" => "24850", "class_name" => "Lupus4799", "order_id" => "24851", "order_name" => "Lupus4798", "family_id" => "24852", "family_name" => "Lupus4797", "subfamily_id" => "24853", "subfamily_name" => "Lupus4796", "genus_id" => "24854", "genus_name" => "Lupus4795", "species_id" => "24855", "species_name" => "Lupus4794"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus4795 lupus4794", name_status: "A", created_at: "2024-01-04 16:46:10", updated_at: "2024-01-04 16:46:10", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3752, created_by_id: 3752, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should be empty + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2369, importer_id: 2368, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 24887, year: 2013, created_at: "2024-01-04 16:46:12", updated_at: "2024-01-04 16:46:12", sandbox_id: nil, reported_taxon_concept_id: 24887, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3754, created_by_id: 3754, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2371, importer_id: 2370, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 24911, year: 2013, created_at: "2024-01-04 16:46:13", updated_at: "2024-01-04 16:46:13", sandbox_id: nil, reported_taxon_concept_id: 24911, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3755, created_by_id: 3755, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + when output is new taxon + should change #count by 1 + relationships and trade + should be is synonym + should include # "25018", "genus_id" => "25022", "order_id" => "25019", "family_id" => "25020", "phylum_id" => "25017", "rank_name" => "SPECIES", "class_name" => "Lupus4961", "genus_name" => "Errorus", "kingdom_id" => "25016", "order_name" => "Lupus4960", "species_id" => "25023", "family_name" => "Lupus4959", "phylum_name" => "Lupus4962", "kingdom_name" => "Lupus4963", "species_name" => "Fatalus", "subfamily_id" => "25021", "subfamily_name" => "Lupus4958"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Errorus fatalus", name_status: "A", created_at: "2024-01-04 16:46:17", updated_at: "2024-01-04 16:46:17", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3758, created_by_id: 3758, dependents_updated_at: nil, nomenclature_note_en: " ", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2379, importer_id: 2378, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 25031, year: 2013, created_at: "2024-01-04 16:46:18", updated_at: "2024-01-04 16:46:18", sandbox_id: nil, reported_taxon_concept_id: 25031, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3759, created_by_id: 3759, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + when output is existing taxon with new status + should not change #count + should not change #full_name + relationships and trade + should be is synonym + should include # "SPECIES", "kingdom_id" => "25144", "kingdom_name" => "Lupus5089", "phylum_id" => "25145", "phylum_name" => "Lupus5088", "class_id" => "25146", "class_name" => "Lupus5087", "order_id" => "25147", "order_name" => "Lupus5086", "family_id" => "25148", "family_name" => "Lupus5085", "subfamily_id" => "25149", "subfamily_name" => "Lupus5084", "genus_id" => "25150", "genus_name" => "Lupus5083", "species_id" => "25151", "species_name" => "Lupus5082"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus5083 lupus5082", name_status: "A", created_at: "2024-01-04 16:46:22", updated_at: "2024-01-04 16:46:22", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3763, created_by_id: 3763, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2389, importer_id: 2388, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 25159, year: 2013, created_at: "2024-01-04 16:46:23", updated_at: "2024-01-04 16:46:23", sandbox_id: nil, reported_taxon_concept_id: 25159, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3764, created_by_id: 3764, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + when output is existing taxon with new name + should change #count by 1 + should not change #full_name + relationships and trade + should be is synonym + should eq #"GENUS", "kingdom_id"=>"25278", "kingdom_name"=>"Lupus5210", "phylum_id"=>"25279", "phylum_name"=>"Lupus5209", "class_id"=>"25280", "class_name"=>"Lupus5208", "order_id"=>"25281", "order_name"=>"Lupus5207", "family_id"=>"25282", "family_name"=>"Lupus5206", "subfamily_id"=>"25283", "subfamily_name"=>"Lupus5205", "genus_id"=>"25284", "genus_name"=>"Lupus5204"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus5204", name_status: "A", created_at: "2024-01-04 16:46:28", updated_at: "2024-01-04 16:46:28", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3768, created_by_id: 3768, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should include # "25330", "genus_id" => "25334", "order_id" => "25331", "family_id" => "25332", "phylum_id" => "25329", "rank_name" => "SPECIES", "class_name" => "Lupus5253", "genus_name" => "Errorus", "kingdom_id" => "25328", "order_name" => "Lupus5252", "species_id" => "25345", "family_name" => "Lupus5251", "phylum_name" => "Lupus5254", "kingdom_name" => "Lupus5255", "species_name" => "Lolcatus", "subfamily_id" => "25333", "subfamily_name" => "Lupus5250"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Errorus lolcatus", name_status: "A", created_at: "2024-01-04 16:46:30", updated_at: "2024-01-04 16:46:30", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3769, created_by_id: 3769, dependents_updated_at: nil, nomenclature_note_en: " ", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2401, importer_id: 2400, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 25353, year: 2013, created_at: "2024-01-04 16:46:31", updated_at: "2024-01-04 16:46:31", sandbox_id: nil, reported_taxon_concept_id: 25353, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3770, created_by_id: 3770, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + when input with children that don't change name + input / output species has public nomenclature note set + child of input / output species does not inherit public nomenclature note + input / output species has internal nomenclature note set + child of input / output species does not inherit internal nomenclature note + child of input / output species does not have legislation nomenclature note + when input with children that change name + input species has public nomenclature note set + child of input species inherits public nomenclature note + input species has internal nomenclature note set + child of input species inherits internal nomenclature note + output species has public nomenclature note set + child of output species inherits public nomenclature note from input + output species has internal nomenclature note set + child of output species inherits internal nomenclature note from input + output species child has listing changes from input species child transferred + child of output species has legislation nomenclature note copied from input species + original output species child retains higher taxa intact + new output species child has higher taxa set correctly + original input species child retains higher taxa intact + original input species child is a synonym + when input is genus and parent ressignments occur + input genus child is a synonym + input genus child is a synonym of output genus child + input genus child's child is a synonym + input genus child's child's name did not change + output genus should have child with resolved name + output genus child should have child with resolved name + output genus child should have input genus citations + input genus child has no quotas + input genus child's accepted name has 1 quota + input genus child's document citations retained + summary + should be a kind of Array + +NomenclatureChange::Lump + validate + when required inputs missing + when inputs + should have 1 errors on :inputs + when submitting + should have 1 errors on :inputs + when required outputs missing + when outputs + should have 1 errors on :output + when submitting + should have 1 errors on :output + when only 1 input + should have 1 errors on :inputs + new_output_rank + should eq "SPECIES" + +NomenclatureChange::OutputReassignment + validate + when output not specified + should not be valid + when reassignable_type not specified + should not be valid + +NomenclatureChange::Output + validate + when nomenclature change not specified + should not be valid + when taxon concept not specified and new taxon concept attributes not specified + should have 1 errors on :new_scientific_name + should have 1 errors on :new_parent_id + should have 1 errors on :new_rank_id + should have 1 errors on :new_name_status + should have 1 errors on :new_taxon_concept + when new taxon concept invalid + should have 1 error on :new_parent_id + when taxon concept specified + should eq 26184 + should eq 14848 + should eq "Lupus6035 lupus6034" + should eq nil + should eq "A" + expected_parent_name + when genus + should be nil + when species + should eq "Canis" + when subspecies + should eq "Canis lupus" + when variety + should eq "Magnolia liliifera" + +NomenclatureChange::ReassignmentCopyProcessor + run + when children + should eq #"SPECIES", "kingdom_id"=>"26251", "kingdom_name"=>"Lupus6087", "phylum_id"=>"26252", "phylum_name"=>"Lupus6086", "class_id"=>"26253", "class_name"=>"Lupus6085", "order_id"=>"26254", "order_name"=>"Lupus6084", "family_id"=>"26255", "family_name"=>"Lupus6083", "subfamily_id"=>"26256", "subfamily_name"=>"Lupus6082", "genus_id"=>"26257", "genus_name"=>"Genus1", "species_id"=>"26258", "species_name"=>"Lupus6088"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1 lupus6088", name_status: "A", created_at: "2024-01-04 16:47:21", updated_at: "2024-01-04 16:47:21", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3829, created_by_id: 3829, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should eq "S" + should eq 0 + should include # "26286", "genus_id" => "26290", "order_id" => "26287", "family_id" => "26288", "phylum_id" => "26285", "rank_name" => "SUBSPECIES", "class_name" => "Lupus6112", "genus_name" => "Genus1", "kingdom_id" => "26284", "order_name" => "Lupus6111", "species_id" => "26292", "family_name" => "Lupus6110", "phylum_name" => "Lupus6113", "kingdom_name" => "Lupus6114", "species_name" => "Lupus6116", "subfamily_id" => "26289", "subspecies_id" => "26294", "subfamily_name" => "Lupus6109", "subspecies_name" => "Lupus6117"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Genus1 lupus6116 lupus6117", name_status: "A", created_at: "2024-01-04 16:47:23", updated_at: "2024-01-04 16:47:23", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3832, created_by_id: 3832, dependents_updated_at: "2024-01-04 16:47:23", nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: 3832, kew_id: nil> + when names + should include # + should include # + when distribution + should eq 4 + should not be nil + should eq [] + should contain exactly "extinct" and "reintroduced" + should eq [] + should eq 2 + should eq 4 + when legislation + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:101 (FAILED - 182) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:102 (FAILED - 183) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:108 (FAILED - 184) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:115 (FAILED - 185) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:122 (FAILED - 186) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:129 (FAILED - 187) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:136 (FAILED - 188) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:142 (FAILED - 189) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:149 (FAILED - 190) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:150 (FAILED - 191) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:156 (FAILED - 192) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:163 (FAILED - 193) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:170 (FAILED - 194) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:177 (FAILED - 195) + example at ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:26 (FAILED - 196) + example at ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:27 (FAILED - 197) + example at ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:28 (FAILED - 198) + when common names + should eq 2 + should eq 2 + when references + should eq 2 + should eq 2 + when document citations + should eq 1 + when output species had no citations in place + should eq 1 + when output species had an identical citation in place + should eq 1 + when shipments + should eq 2 + should be empty + +NomenclatureChange::Reassignment + validate + when input not specified + should not be valid + when reassignable_type not specified + should not be valid + +NomenclatureChange::ReassignmentTarget + validate + when reassignment not specified + should not be valid + when output not specified + should not be valid + +NomenclatureChange::ReassignmentTransferProcessor + run + input reassignments + when children + should eq #"SPECIES", "kingdom_id"=>"26659", "kingdom_name"=>"Lupus6452", "phylum_id"=>"26660", "phylum_name"=>"Lupus6451", "class_id"=>"26661", "class_name"=>"Lupus6450", "order_id"=>"26662", "order_name"=>"Lupus6449", "family_id"=>"26663", "family_name"=>"Lupus6448", "subfamily_id"=>"26664", "subfamily_name"=>"Lupus6447", "genus_id"=>"26665", "genus_name"=>"Genus1", "species_id"=>"26666", "species_name"=>"Lupus6453"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1 lupus6453", name_status: "A", created_at: "2024-01-04 16:47:47", updated_at: "2024-01-04 16:47:47", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3875, created_by_id: 3875, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should eq "S" + should eq 0 + should include # "26718", "genus_id" => "26722", "order_id" => "26719", "family_id" => "26720", "phylum_id" => "26717", "rank_name" => "SUBSPECIES", "class_name" => "Lupus6498", "genus_name" => "Genus1", "kingdom_id" => "26716", "order_name" => "Lupus6497", "species_id" => "26724", "family_name" => "Lupus6496", "phylum_name" => "Lupus6499", "kingdom_name" => "Lupus6500", "species_name" => "Lupus6502", "subfamily_id" => "26721", "subspecies_id" => "26734", "subfamily_name" => "Lupus6495", "subspecies_name" => "Lupus6510"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Genus1 lupus6502 lupus6510", name_status: "A", created_at: "2024-01-04 16:47:50", updated_at: "2024-01-04 16:47:50", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3878, created_by_id: 3878, dependents_updated_at: "2024-01-04 16:47:50", nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: 3878, kew_id: nil> + when names + should include # + should be empty + when distribution + should eq 4 + should not be nil + should eq [] + should contain exactly "extinct" and "reintroduced" + should eq [] + should eq 2 + should be empty + when legislation + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:101 (FAILED - 199) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:102 (FAILED - 200) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:108 (FAILED - 201) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:115 (FAILED - 202) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:122 (FAILED - 203) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:129 (FAILED - 204) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:136 (FAILED - 205) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:142 (FAILED - 206) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:149 (FAILED - 207) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:150 (FAILED - 208) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:156 (FAILED - 209) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:163 (FAILED - 210) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:170 (FAILED - 211) + example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:177 (FAILED - 212) + example at ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:26 (FAILED - 213) + example at ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:27 (FAILED - 214) + example at ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:28 (FAILED - 215) + when common names + should eq 2 + should be empty + when references + should eq 2 + should be empty + when document citations + should be empty (PENDING: No reason given) + when output species had no citations in place + should eq 1 + when output species had an identical citation in place + should eq 1 + when shipments + should eq 2 + should be empty + output reassignments + when names + should include # + should be empty + when distribution + should eq 2 + should not be nil + should eq ["extinct"] + should eq 1 + should be empty + when legislation + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:70 (FAILED - 216) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:71 (FAILED - 217) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:77 (FAILED - 218) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:84 (FAILED - 219) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:91 (FAILED - 220) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:98 (FAILED - 221) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:104 (FAILED - 222) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:111 (FAILED - 223) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:112 (FAILED - 224) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:118 (FAILED - 225) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:125 (FAILED - 226) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:132 (FAILED - 227) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:139 (FAILED - 228) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:140 (FAILED - 229) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:141 (FAILED - 230) + example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:142 (FAILED - 231) + when common names + should eq 2 + should be empty + when references + should eq 2 + should be empty + when document citations + should eq 1 + should be empty + when shipments + should eq 2 + should be empty + +NomenclatureChange::Split::Constructor + inputs + build_input + when previously no input in place + should not be nil + when previously input in place + should eq # + outputs + build_outputs + when previously no outputs in place + should not eq 0 + when previously output in place + should eq #, #]> + reassignments + build_input_and_output_notes + when previously no notes in place + should not be blank + should not be blank + when output = input + should be blank + when previously notes in place + should eq "blah" + should eq "blah" + build_parent_reassignments + when previously no reassignments in place + when no children + should eq 0 + when children + should eq 2 + when previously reassignments in place + should eq #]> + when output = input + should eq [#] + when previously reassignments in place + should eq #]> + build_name_reassignments + when previously no reassignments in place + when no names + should eq 0 + when names + should eq 2 + when previously reassignments in place + should eq #]> + when output = input + should eq [#] + build_distribution_reassignments + when previously no reassignments in place + when no distibutions + should eq 0 + when distributions + should eq 2 + when previously reassignments in place + should eq #]> + build_documents_reassignments + when previously no reassignments in place + when no document citations + should eq 0 + when document citations + should eq 2 + when geo_entity citations mismatch distribution + should not include 1141 + build_legislation_reassignments + when previously no reassignments in place + when no CITES listings + should eq 0 + when CITES listings + should eq 1 + when previously reassignments in place + should eq #]> + build_common_names_reassignments + when previously no reassignments in place + when no common names + should eq 0 + when common names + should eq 1 + when previously reassignments in place + should eq #]> + build_references_reassignments + when previously no reassignments in place + when no references + should eq 0 + when references + should eq 1 + when previously reassignments in place + should eq #]> + +NomenclatureChange::OutputTaxonConceptProcessor + run + when output is existing taxon + should be nil + when output is new taxon + should eq "Errorus fatalus" + when output is existing taxon with new status + should be nil + should eq "A" + when output is existing taxon with new name + should eq "Errorus fatalus fatalus" + should eq "A" + should eq "Errorus lolcatus" + +NomenclatureChange::Split::Processor + run + when outputs are existing taxa + should not change #count + should not change #full_name + should not change #full_name + relationships and trade + should be is synonym + should include # "SPECIES", "kingdom_id" => "28730", "kingdom_name" => "Lupus8199", "phylum_id" => "28731", "phylum_name" => "Lupus8198", "class_id" => "28732", "class_name" => "Lupus8197", "order_id" => "28733", "order_name" => "Lupus8196", "family_id" => "28734", "family_name" => "Lupus8195", "subfamily_id" => "28735", "subfamily_name" => "Lupus8194", "genus_id" => "28736", "genus_name" => "Genus1", "species_id" => "28738", "species_name" => "Lupus8201"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1 lupus8201", name_status: "A", created_at: "2024-01-04 16:49:19", updated_at: "2024-01-04 16:49:19", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3992, created_by_id: 3992, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should be empty + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2685, importer_id: 2684, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28771, year: 2013, created_at: "2024-01-04 16:49:21", updated_at: "2024-01-04 16:49:21", sandbox_id: nil, reported_taxon_concept_id: 28771, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3994, created_by_id: 3994, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2687, importer_id: 2686, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28788, year: 2013, created_at: "2024-01-04 16:49:22", updated_at: "2024-01-04 16:49:22", sandbox_id: nil, reported_taxon_concept_id: 28788, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3995, created_by_id: 3995, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + when output is new taxon + should change #count by 1 + relationships and trade + should be is synonym + should include # "28843", "genus_id" => "28847", "order_id" => "28844", "family_id" => "28845", "phylum_id" => "28842", "rank_name" => "SPECIES", "class_name" => "Lupus8293", "genus_name" => "Errorus", "kingdom_id" => "28841", "order_name" => "Lupus8292", "species_id" => "28848", "family_name" => "Lupus8291", "phylum_name" => "Lupus8294", "kingdom_name" => "Lupus8295", "species_name" => "Fatalus", "subfamily_id" => "28846", "subfamily_name" => "Lupus8290"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Errorus fatalus", name_status: "A", created_at: "2024-01-04 16:49:25", updated_at: "2024-01-04 16:49:25", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3998, created_by_id: 3998, dependents_updated_at: nil, nomenclature_note_en: " ", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> + should be empty + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2697, importer_id: 2696, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28873, year: 2013, created_at: "2024-01-04 16:49:26", updated_at: "2024-01-04 16:49:26", sandbox_id: nil, reported_taxon_concept_id: 28873, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4000, created_by_id: 4000, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2699, importer_id: 2698, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28890, year: 2013, created_at: "2024-01-04 16:49:27", updated_at: "2024-01-04 16:49:27", sandbox_id: nil, reported_taxon_concept_id: 28890, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4001, created_by_id: 4001, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + when output is existing taxon with new status + should not change #count + should not change #full_name + should not change #full_name + relationships and trade + should be is synonym + should include # "SPECIES", "kingdom_id" => "28968", "kingdom_name" => "Lupus8399", "phylum_id" => "28969", "phylum_name" => "Lupus8398", "class_id" => "28970", "class_name" => "Lupus8397", "order_id" => "28971", "order_name" => "Lupus8396", "family_id" => "28972", "family_name" => "Lupus8395", "subfamily_id" => "28973", "subfamily_name" => "Lupus8394", "genus_id" => "28974", "genus_name" => "Genus1", "species_id" => "28976", "species_name" => "Lupus8401"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1 lupus8401", name_status: "A", created_at: "2024-01-04 16:49:31", updated_at: "2024-01-04 16:49:31", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4006, created_by_id: 4006, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2711, importer_id: 2710, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28992, year: 2013, created_at: "2024-01-04 16:49:32", updated_at: "2024-01-04 16:49:32", sandbox_id: nil, reported_taxon_concept_id: 28992, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4007, created_by_id: 4007, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + when output is existing taxon with new name + should change #count by 1 + should not change #full_name + should not change #full_name + relationships and trade + should be is synonym + should eq #"GENUS", "kingdom_id"=>"29087", "kingdom_name"=>"Lupus8492", "phylum_id"=>"29088", "phylum_name"=>"Lupus8491", "class_id"=>"29089", "class_name"=>"Lupus8490", "order_id"=>"29090", "order_name"=>"Lupus8489", "family_id"=>"29091", "family_name"=>"Lupus8488", "subfamily_id"=>"29092", "subfamily_name"=>"Lupus8487", "genus_id"=>"29093", "genus_name"=>"Genus1"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1", name_status: "A", created_at: "2024-01-04 16:49:37", updated_at: "2024-01-04 16:49:37", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4012, created_by_id: 4012, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should include # "29117", "genus_id" => "29121", "order_id" => "29118", "family_id" => "29119", "phylum_id" => "29116", "rank_name" => "SPECIES", "class_name" => "Lupus8512", "genus_name" => "Errorus", "kingdom_id" => "29115", "order_name" => "Lupus8511", "species_id" => "29124", "family_name" => "Lupus8510", "phylum_name" => "Lupus8513", "kingdom_name" => "Lupus8514", "species_name" => "Lolcatus", "subfamily_id" => "29120", "subfamily_name" => "Lupus8509"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Errorus lolcatus", name_status: "A", created_at: "2024-01-04 16:49:38", updated_at: "2024-01-04 16:49:38", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4013, created_by_id: 4013, dependents_updated_at: nil, nomenclature_note_en: " ", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2725, importer_id: 2724, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 29132, year: 2013, created_at: "2024-01-04 16:49:39", updated_at: "2024-01-04 16:49:39", sandbox_id: nil, reported_taxon_concept_id: 29132, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4014, created_by_id: 4014, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + when input with children that don't change name + input / output species has public nomenclature note set + child of input / output species does not inherit public nomenclature note + input / output species has internal nomenclature note set + child of input / output species does not inherit internal nomenclature note + child of input / output species does not have legislation nomenclature note + when input with children that change name + input species has public nomenclature note set + child of input species inherits public nomenclature note + input species has internal nomenclature note set + child of input species inherits internal nomenclature note + output species has public nomenclature note set + child of output species inherits public nomenclature note from output + output species has internal nomenclature note set + child of output species inherits internal nomenclature note from output + output species child has listing changes from input species child transferred + output species child has legislation nomenclature note copied from output species + original output species child retains higher taxa intact + new output species child has higher taxa set correctly + original input species child retains higher taxa intact + original input species child is a synonym + when input is genus and parent ressignments occur + input genus child is a synonym + input genus child is a synonym of output genus child + input genus child's child is a synonym + input genus child's child's name did not change + output genus should have child with resolved name + output genus child should have child with resolved name + output genus child should have input genus citations + input genus child has no quotas + input genus child's accepted name has 1 quota + input genus child's document citations retained + summary + should be a kind of Array + +NomenclatureChange::Split + validate + when required inputs missing + when inputs + should have 1 errors on :input + when submitting + should have 1 errors on :input + when required outputs missing + when outputs + should have 1 errors on :outputs + when submitting + should have 1 errors on :outputs + when output has different rank than input + should have 1 errors on :outputs + +NomenclatureChange::StatusSwap::Constructor + build_primary_output + when previously no primary output in place + should not be nil + when previously primary output in place + should eq # + build_secondary_output + downgrade + when previously no secondary output in place + should not be nil + when previously secondary output in place + should eq # + build_secondary_output_note + when previously no notes in place + should be blank + should not be blank + when previously notes in place + should eq "blah" + should eq "blah" + +NomenclatureChange::StatusSwap::Processor + run + from accepted name + should be is synonym + should eq #"GENUS", "kingdom_id"=>"29999", "kingdom_name"=>"Lupus9252", "phylum_id"=>"30000", "phylum_name"=>"Lupus9251", "class_id"=>"30001", "class_name"=>"Lupus9250", "order_id"=>"30002", "order_name"=>"Lupus9249", "family_id"=>"30003", "family_name"=>"Lupus9248", "subfamily_id"=>"30004", "subfamily_name"=>"Lupus9247", "genus_id"=>"30005", "genus_name"=>"Lupus9246"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus9246", name_status: "A", created_at: "2024-01-04 16:50:30", updated_at: "2024-01-04 16:50:30", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4062, created_by_id: 4062, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should eq "A" + should include # "SPECIES", "kingdom_id" => "30064", "kingdom_name" => "Lupus9311", "phylum_id" => "30065", "phylum_name" => "Lupus9310", "class_id" => "30066", "class_name" => "Lupus9309", "order_id" => "30067", "order_name" => "Lupus9308", "family_id" => "30068", "family_name" => "Lupus9307", "subfamily_id" => "30069", "subfamily_name" => "Lupus9306", "genus_id" => "30070", "genus_name" => "Confundus", "species_id" => "30063", "species_name" => "Totalus"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Confundus totalus", name_status: "A", created_at: "2024-01-04 16:50:32", updated_at: "2024-01-04 16:50:32", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4064, created_by_id: 4064, dependents_updated_at: nil, nomenclature_note_en: " public", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> + public nomenclature note is set + internal nomenclature note is set + summary + should be a kind of Array + +NomenclatureChange::StatusToAccepted::Processor + run + from trade name + should eq "A" + should be empty + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2813, importer_id: 2812, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30182, year: 2013, created_at: "2024-01-04 16:50:38", updated_at: "2024-01-04 16:50:38", sandbox_id: nil, reported_taxon_concept_id: 30183, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4071, created_by_id: 4071, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2815, importer_id: 2814, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30198, year: 2013, created_at: "2024-01-04 16:50:38", updated_at: "2024-01-04 16:50:38", sandbox_id: nil, reported_taxon_concept_id: 30199, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4072, created_by_id: 4072, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should be empty + +NomenclatureChange::StatusToAccepted + validate + when required primary output missing + when primary_output + should have 1 error on :primary_output + when submitting + should have 1 error on :primary_output + when primary output has invalid name status + when primary_output + should have 1 error on :primary_output + when primary output has valid name status + when primary_output + should have 0 errors on :primary_output + +NomenclatureChange::StatusToSynonym::Constructor + build_input + when previously no input in place + should not be nil + when previously input in place + should eq # + +NomenclatureChange::OutputTaxonConceptProcessor + run + when output is existing taxon + should be nil + +NomenclatureChange::StatusToSynonym::Processor + run + from N name + should be is synonym + should eq #"GENUS", "kingdom_id"=>"30281", "kingdom_name"=>"Lupus9512", "phylum_id"=>"30282", "phylum_name"=>"Lupus9511", "class_id"=>"30283", "class_name"=>"Lupus9510", "order_id"=>"30284", "order_name"=>"Lupus9509", "family_id"=>"30285", "family_name"=>"Lupus9508", "subfamily_id"=>"30286", "subfamily_name"=>"Lupus9507", "genus_id"=>"30287", "genus_name"=>"Lupus9506"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus9506", name_status: "A", created_at: "2024-01-04 16:50:42", updated_at: "2024-01-04 16:50:42", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4086, created_by_id: 4086, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should include # "30307", "genus_id" => "30311", "order_id" => "30308", "family_id" => "30309", "phylum_id" => "30306", "rank_name" => "SPECIES", "class_name" => "Lupus9535", "genus_name" => "Lupus9531", "kingdom_id" => "30305", "order_name" => "Lupus9534", "species_id" => "30312", "family_name" => "Lupus9533", "phylum_name" => "Lupus9536", "kingdom_name" => "Lupus9537", "species_name" => "Lupus9530", "subfamily_id" => "30310", "subfamily_name" => "Lupus9532"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus9531 lupus9530", name_status: "A", created_at: "2024-01-04 16:50:43", updated_at: "2024-01-04 16:50:43", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4087, created_by_id: 4087, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should be empty + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2827, importer_id: 2826, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30336, year: 2013, created_at: "2024-01-04 16:50:45", updated_at: "2024-01-04 16:50:45", sandbox_id: nil, reported_taxon_concept_id: 30336, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4089, created_by_id: 4089, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2829, importer_id: 2828, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30352, year: 2013, created_at: "2024-01-04 16:50:46", updated_at: "2024-01-04 16:50:46", sandbox_id: nil, reported_taxon_concept_id: 30352, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4090, created_by_id: 4090, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + from trade name + should be is synonym + should include # "30372", "genus_id" => "30376", "order_id" => "30373", "family_id" => "30374", "phylum_id" => "30371", "rank_name" => "SPECIES", "class_name" => "Lupus9599", "genus_name" => "Lupus9595", "kingdom_id" => "30370", "order_name" => "Lupus9598", "species_id" => "30377", "family_name" => "Lupus9597", "phylum_name" => "Lupus9600", "kingdom_name" => "Lupus9601", "species_name" => "Lupus9594", "subfamily_id" => "30375", "subfamily_name" => "Lupus9596"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus9595 lupus9594", name_status: "A", created_at: "2024-01-04 16:50:47", updated_at: "2024-01-04 16:50:47", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4092, created_by_id: 4092, dependents_updated_at: "2024-01-04 16:50:47", nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: 4092, kew_id: nil> + should be empty + should be empty + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2839, importer_id: 2838, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30404, year: 2013, created_at: "2024-01-04 16:50:49", updated_at: "2024-01-04 16:50:49", sandbox_id: nil, reported_taxon_concept_id: 30405, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4095, created_by_id: 4095, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2841, importer_id: 2840, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30413, year: 2013, created_at: "2024-01-04 16:50:50", updated_at: "2024-01-04 16:50:50", sandbox_id: nil, reported_taxon_concept_id: 30414, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4096, created_by_id: 4096, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + +NomenclatureChange::StatusToSynonym + validate + when required primary output missing + when primary_output + should have 1 error on :primary_output + when submitting + should have 1 error on :primary_output + when primary output has invalid name status + when primary_output + should have 1 error on :primary_output + when primary output has valid name status + when primary_output + should have 0 errors on :primary_output + when required secondary output missing + when relay + should have 1 error on :secondary_output + when submitting + should have 1 error on :secondary_output + +NomenclatureChange + validate + when status not specified + should not be valid + when previous status=submitted + should not be valid + when previous status=closed + should not be valid + submitting? + when new object with status=submitted + should be submitting + when updating object with status new -> submitted + should be submitting + when updating object with status submitted -> closed + should not be submitting + when updating object with status closed -> submitted + should not be submitting + +PresetTag + create + when valid + should be valid + when name missing + should be invalid + should have 1 error on :name + when model (type) incorrect + should be invalid + should have 1 error on :model + +Purpose + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + when CITES suspension + should be falsey + when shipments + should be falsey + +Quota + create + downloads cache should be populated + should not be empty + destroy + downloads cache should be cleared + should be empty + validations + create + doesn't save a quota without a unit (PENDING: No reason given) + when valid + should be valid + when quota missing + should be invalid + should have 2 error on :quota + when publication date missing + should be invalid + should have 1 error on :publication_date + when start date greater than end date + should be invalid + should have 1 error on :start_date + +Rank + parent_rank_lower_bound + obligatory rank + should == "0" + optional rank + should == "5" + create + when taxonomic position malformed + should have 1 error on :taxonomic_position + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + should be falsey + when protected name + should be falsey + in_range + when no bounds specified + should == ["KINGDOM", "PHYLUM", "CLASS", "ORDER", "FAMILY", "SUBFAMILY", "GENUS", "SPECIES", "SUBSPECIES", "VARIETY"] + when lower bound specified + should == ["KINGDOM", "PHYLUM", "CLASS"] + when lower and upper bound specified + should == ["FAMILY", "SUBFAMILY", "GENUS"] + +Sapi::GeoIP + resolve + should == "Bogotá" + +Source + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + when CITES suspension + should be falsey + when CITES quota + should be falsey + when shipments + should be falsey + +Species::CommonNamesExport + path + should == "public/downloads/common_names/" + export + when no results + should be falsey + when results + when file not cached +sh: 1: psql: not found + example at ./spec/models/species/common_names_export_spec.rb:32 (FAILED - 232) + when file cached + example at ./spec/models/species/common_names_export_spec.rb:38 + +Species::DocumentsExport + path + should == "public/downloads/documents/" + export + when no results + when file not cached it should not be generated + when results + when file not cached it should be generated (PENDING: No reason given) + when file cached it should not be generated (PENDING: No reason given) + +Species::TaxonConceptPrefixMatcher +Procedure: taxonomy + results + when searching for hybrid + when trade visibility + example at ./spec/models/species/hybrid_prefix_matcher_spec.rb:14 (FAILED - 233) + when trade internal visibility + example at ./spec/models/species/hybrid_prefix_matcher_spec.rb:24 (FAILED - 234) + when speciesplus visibility + example at ./spec/models/species/hybrid_prefix_matcher_spec.rb:33 (FAILED - 235) + +Species::Search +Procedure: taxonomy + results + when searching by scientific name + when subspecies never listed + example at ./spec/models/species/invisible_subspecies_search_spec.rb:8 (FAILED - 236) + example at ./spec/models/species/invisible_subspecies_search_spec.rb:9 (FAILED - 237) + +Species::ListingsExport +Procedure: taxonomy + path + example at ./spec/models/species/listings_export_spec.rb:10 (FAILED - 238) + export + when no results + example at ./spec/models/species/listings_export_spec.rb:21 (FAILED - 239) + when results + when file not cached + example at ./spec/models/species/listings_export_spec.rb:42 (FAILED - 240) + when file cached + example at ./spec/models/species/listings_export_spec.rb:48 (FAILED - 241) + query + when CITES + when Appendix I + example at ./spec/models/species/listings_export_spec.rb:65 (FAILED - 242) + when Poland + example at ./spec/models/species/listings_export_spec.rb:75 (FAILED - 243) + when Nepal + example at ./spec/models/species/listings_export_spec.rb:86 (FAILED - 244) + when higher taxon ids + example at ./spec/models/species/listings_export_spec.rb:96 (FAILED - 245) + when implicitly listed subspecies present + example at ./spec/models/species/listings_export_spec.rb:111 (FAILED - 246) + when EU + when Annex A + example at ./spec/models/species/listings_export_spec.rb:122 (FAILED - 247) + when Spain + example at ./spec/models/species/listings_export_spec.rb:132 (FAILED - 248) + when Nepal + example at ./spec/models/species/listings_export_spec.rb:143 (FAILED - 249) + when higher taxon ids + example at ./spec/models/species/listings_export_spec.rb:153 (FAILED - 250) + +Species::OrphanedTaxonConceptsExport + path + should == "public/downloads/orphaned_taxon_concepts/" + export + when no results + should be falsey + when results + when file not cached +sh: 1: psql: not found + example at ./spec/models/species/orphaned_taxon_concepts_export_spec.rb:33 (FAILED - 251) + when file cached + example at ./spec/models/species/orphaned_taxon_concepts_export_spec.rb:39 + +Species::Search +Procedure: taxonomy + results + when searching by scientific name + when regular query + example at ./spec/models/species/search_spec.rb:8 (FAILED - 252) + when malicious query + example at ./spec/models/species/search_spec.rb:12 (FAILED - 253) + when leading whitespace + example at ./spec/models/species/search_spec.rb:16 (FAILED - 254) + when trailing whitespace + example at ./spec/models/species/search_spec.rb:20 (FAILED - 255) + +Species::SpeciesReferenceOutputExport + path + should == "public/downloads/species_reference_output/" + export + when no results + should be falsey + when results + when file not cached +sh: 1: psql: not found + example at ./spec/models/species/species_reference_output_spec.rb:32 (FAILED - 256) + when file cached + example at ./spec/models/species/species_reference_output_spec.rb:38 + +Species::StandardReferenceOutputExport + path + should == "public/downloads/standard_reference_output/" + export + when no results + should be falsey + when results + when file not cached +sh: 1: psql: not found + example at ./spec/models/species/standard_reference_output_spec.rb:32 (FAILED - 257) + when file cached + example at ./spec/models/species/standard_reference_output_spec.rb:38 + +Species::SynonymsAndTradeNamesExport + path + should == "public/downloads/synonyms_and_trade_names/" + export + when no results + should be falsey + when results + when file not cached +sh: 1: psql: not found + example at ./spec/models/species/synonyms_and_trade_names_export_spec.rb:38 (FAILED - 258) + when file cached + example at ./spec/models/species/synonyms_and_trade_names_export_spec.rb:44 + +Species::TaxonConceptPrefixMatcher +Procedure: taxonomy + results + when searching by common name + when searching by hyphenated common name + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:14 (FAILED - 259) + when searching by hyphenated common name without hyphens + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:23 (FAILED - 260) + when searching by part of hyphenated common name + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:32 (FAILED - 261) + when searching by scientific name + when regular query + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:43 (FAILED - 262) + when malicious query + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:52 (FAILED - 263) + when leading whitespace + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:61 (FAILED - 264) + when trailing whitespace + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:70 (FAILED - 265) + when implicitly listed subspecies + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:79 (FAILED - 266) + when explicitly listed subspecies + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:88 (FAILED - 267) + when implicitly listed higher taxon (without an explicitly listed ancestor) + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:97 (FAILED - 268) + when explicitly listed higher taxon + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:106 (FAILED - 269) + when explicitly listed higher taxon but ranks expected FAMILY + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:117 (FAILED - 270) + when explicitly listed higher taxon but ranks expected SPECIES + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:127 (FAILED - 271) + when searching for name that matches Species and Subspecies but ranks expected SUBSPECIES + example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:137 (FAILED - 272) + +Species::TaxonConceptsNamesExport + path + should == "public/downloads/taxon_concepts_names/" + export + when no results + should be falsey + when results + when file not cached +sh: 1: psql: not found + example at ./spec/models/species/taxon_concepts_export_spec.rb:32 (FAILED - 273) + when file cached + example at ./spec/models/species/taxon_concepts_export_spec.rb:38 + +Species::TaxonConceptPrefixMatcher + results + when searching for status N species + when trade visibility +Procedure: taxonomy + example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:39 (FAILED - 274) + when trade internal visibility +Procedure: taxonomy + example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:49 (FAILED - 275) + when speciesplus visibility +Procedure: taxonomy + example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:58 (FAILED - 276) + when searching for trade name + when trade visibility +Procedure: taxonomy + example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:70 (FAILED - 277) +Procedure: taxonomy + example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:71 (FAILED - 278) + when trade internal visibility +Procedure: taxonomy + example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:81 (FAILED - 279) +Procedure: taxonomy + example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:82 (FAILED - 280) + when speciesplus visibility +Procedure: taxonomy + example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:91 (FAILED - 281) +Procedure: taxonomy + example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:92 (FAILED - 282) + +Species::Search +Procedure: taxonomy + results + when searching by scientific name + when subspecies previously listed + example at ./spec/models/species/visible_subspecies_search_spec.rb:8 (FAILED - 283) + +TaxonRelationship + when synonymy + should include "Lolcatus lolus" + should include "Lolcatus lolus" + +TaxonCommon + update + when common name changed + should include "Lolcat" + +TaxonConcept + Agalychnis +Procedure: taxonomy + REFERENCES + cites_accepted + for class Amphibia + example at ./spec/models/taxon_concept/agalychnis_spec.rb:10 (FAILED - 284) + for family Hylidae + example at ./spec/models/taxon_concept/agalychnis_spec.rb:13 (FAILED - 285) + for genus Agalychnis + example at ./spec/models/taxon_concept/agalychnis_spec.rb:16 (FAILED - 286) + standard_taxon_concept_references + for class Amphibia + example at ./spec/models/taxon_concept/agalychnis_spec.rb:21 (FAILED - 287) + for family Hylidae + example at ./spec/models/taxon_concept/agalychnis_spec.rb:24 (FAILED - 288) + for genus Agalychnis + example at ./spec/models/taxon_concept/agalychnis_spec.rb:27 (FAILED - 289) + LISTING + cites_listing + for genus Agalychnis + example at ./spec/models/taxon_concept/agalychnis_spec.rb:34 (FAILED - 290) + eu_listing + for genus Agalychnis + example at ./spec/models/taxon_concept/agalychnis_spec.rb:40 (FAILED - 291) + cites_listed + for family Hylidae + example at ./spec/models/taxon_concept/agalychnis_spec.rb:46 (FAILED - 292) + for genus Agalychnis + example at ./spec/models/taxon_concept/agalychnis_spec.rb:49 (FAILED - 293) + eu_listed + for family Hylidae + example at ./spec/models/taxon_concept/agalychnis_spec.rb:55 (FAILED - 294) + for genus Agalychnis + example at ./spec/models/taxon_concept/agalychnis_spec.rb:58 (FAILED - 295) + +TaxonConcept + Agave +Procedure: taxonomy + LISTING + cites_listing + for species Agave parviflora + example at ./spec/models/taxon_concept/agave_spec.rb:10 (FAILED - 296) + for species Agave arizonica + example at ./spec/models/taxon_concept/agave_spec.rb:13 (FAILED - 297) + cites_listed + for species Agave parviflora + example at ./spec/models/taxon_concept/agave_spec.rb:19 (FAILED - 298) + for species Agave arizonica + example at ./spec/models/taxon_concept/agave_spec.rb:22 (FAILED - 299) + cites_show + for species Agave parviflora + example at ./spec/models/taxon_concept/agave_spec.rb:28 (FAILED - 300) + for species Agave arizonica + example at ./spec/models/taxon_concept/agave_spec.rb:31 (FAILED - 301) + eu_listing + for species Agave parviflora + example at ./spec/models/taxon_concept/agave_spec.rb:37 (FAILED - 302) + for species Agave arizonica + example at ./spec/models/taxon_concept/agave_spec.rb:40 (FAILED - 303) + eu_listed + for species Agave parviflora + example at ./spec/models/taxon_concept/agave_spec.rb:46 (FAILED - 304) + for species Agave arizonica + example at ./spec/models/taxon_concept/agave_spec.rb:49 (FAILED - 305) + eu_show + for species Agave parviflora + example at ./spec/models/taxon_concept/agave_spec.rb:55 (FAILED - 306) + for species Agave arizonica + example at ./spec/models/taxon_concept/agave_spec.rb:58 (FAILED - 307) + +TaxonConcept + Ailuropoda +Procedure: taxonomy + LISTING + cites_listing + for species Ailuropoda melanoleuca + example at ./spec/models/taxon_concept/ailuropoda_spec.rb:10 (FAILED - 308) + for genus level Ailuropoda + example at ./spec/models/taxon_concept/ailuropoda_spec.rb:13 (FAILED - 309) + eu_listing + for species Ailuropoda melanoleuca + example at ./spec/models/taxon_concept/ailuropoda_spec.rb:19 (FAILED - 310) + for genus level Ailuropoda + example at ./spec/models/taxon_concept/ailuropoda_spec.rb:22 (FAILED - 311) + cites_listed + for genus Ailuropoda + example at ./spec/models/taxon_concept/ailuropoda_spec.rb:28 (FAILED - 312) + for species Ailuropoda melanoleuca + example at ./spec/models/taxon_concept/ailuropoda_spec.rb:31 (FAILED - 313) + eu_listed + for genus Ailuropoda + example at ./spec/models/taxon_concept/ailuropoda_spec.rb:37 (FAILED - 314) + for species Ailuropoda melanoleuca + example at ./spec/models/taxon_concept/ailuropoda_spec.rb:40 (FAILED - 315) + +TaxonConcept + Arctocephalus +Procedure: taxonomy + LISTING + cites_listing + should be II at species level Arctocephalus australis (FAILED - 316) + should be I at species level Arctocephalus townsendi (FAILED - 317) + should be I/II at genus level Arctocephalus (FAILED - 318) + cites_listed + should be true for genus Arctocephalus (FAILED - 319) + should be true for species Arctocephalus townsendi (FAILED - 320) + should be false for species Arctocephalus australis (inclusion in higher taxa listing) (FAILED - 321) + eu_listed + should be true for genus Arctocephalus (FAILED - 322) + should be true for species Arctocephalus townsendi (FAILED - 323) + should be false for species Arctocephalus australis (inclusion in higher taxa listing) (FAILED - 324) + +TaxonConcept + Boa constrictor +Procedure: taxonomy + TAXONOMY + full_name + for subspecies Boa constrictor occidentalis + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:9 (FAILED - 325) + for species Boa constrictor + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:12 (FAILED - 326) + for genus Boa + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:15 (FAILED - 327) + ancestors + family + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:21 (FAILED - 328) + order + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:24 (FAILED - 329) + class + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:27 (FAILED - 330) + LISTING + cites_listing + for subspecies Boa constrictor occidentalis + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:35 (FAILED - 331) + for subspecies Boa constrictor constrictor + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:38 (FAILED - 332) + for species Boa constrictor + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:41 (FAILED - 333) + eu_listing + for subspecies Boa constrictor occidentalis + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:47 (FAILED - 334) + for subspecies Boa constrictor constrictor + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:50 (FAILED - 335) + for species Boa constrictor + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:53 (FAILED - 336) + cites_listed + for family Boidae + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:59 (FAILED - 337) + for genus Boa + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:62 (FAILED - 338) + for species Boa constrictor (inclusion in higher taxa listing) + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:65 (FAILED - 339) + for subspecies Boa constrictor occidentalis + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:68 (FAILED - 340) + for subspecies Boa constrictor constrictor + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:71 (FAILED - 341) + cites_show + for family Boidae + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:77 (FAILED - 342) + for genus Boa + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:80 (FAILED - 343) + for species Boa constrictor (inclusion in higher taxa listing) + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:83 (FAILED - 344) + for subspecies Boa constrictor occidentalis + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:86 (FAILED - 345) + for subspecies Boa constrictor constrictor + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:89 (FAILED - 346) + cites_listed_descendants + for family Boidae + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:95 (FAILED - 347) + for genus Boa + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:98 (FAILED - 348) + for species Boa constrictor (inclusion in higher taxa listing) + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:101 (FAILED - 349) + for subspecies Boa constrictor occidentalis + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:104 (FAILED - 350) + eu_listed + for family Boidae + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:110 (FAILED - 351) + for genus Boa + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:113 (FAILED - 352) + for species Boa constrictor (inclusion in higher taxa listing) + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:116 (FAILED - 353) + for subspecies Boa constrictor occidentalis + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:119 (FAILED - 354) + show_in_species_plus_ac + for family Boidae + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:125 (FAILED - 355) + for genus Boa + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:128 (FAILED - 356) + for species Boa constrictor (inclusion in higher taxa listing) + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:131 (FAILED - 357) + for subspecies Boa constrictor occidentalis + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:134 (FAILED - 358) + for subspecies Boa constrictor constrictor + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:137 (FAILED - 359) + show_in_checklist_ac + for family Boidae + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:143 (FAILED - 360) + for genus Boa + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:146 (FAILED - 361) + for species Boa constrictor (inclusion in higher taxa listing) + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:149 (FAILED - 362) + for subspecies Boa constrictor occidentalis + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:152 (FAILED - 363) + for subspecies Boa constrictor constrictor + example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:155 (FAILED - 364) + +TaxonConcept + Caiman latirostris +Procedure: taxonomy + TAXONOMY + full_name + for species synonym Alligator cynocephalus + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:10 (FAILED - 365) + rank_name + for species synonym Alligator cynocephalus + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:15 (FAILED - 366) + REFERENCES + cites_accepted + for species Caiman latirostris + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:23 (FAILED - 367) + for synonym species Alligator cynocephalus + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:26 (FAILED - 368) + standard_taxon_concept_references + for species Caiman latirostris + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:31 (FAILED - 369) + LISTING + cites_listing + for species Caiman latirostris + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:38 (FAILED - 370) + eu_listing + for species Caiman latirostris + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:44 (FAILED - 371) + cites_listed + for order Crocodylia + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:50 (FAILED - 372) + for family Alligatoridae + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:53 (FAILED - 373) + for genus Caiman + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:56 (FAILED - 374) + for species Caiman latoristris + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:59 (FAILED - 375) + eu_listed + for order Crocodylia + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:65 (FAILED - 376) + for family Alligatoridae + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:68 (FAILED - 377) + for genus Caiman + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:71 (FAILED - 378) + for species Caiman latoristris + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:74 (FAILED - 379) + cites_show + for order Crocodylia + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:80 (FAILED - 380) + for family Alligatoridae + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:83 (FAILED - 381) + for genus Caiman + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:86 (FAILED - 382) + for species Caiman latoristris + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:89 (FAILED - 383) + for synonym species Alligator cynocephalus + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:92 (FAILED - 384) + ann_symbol + for species Caiman latirostris + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:98 (FAILED - 385) + hash_ann_symbol + for species Caiman latirostris + example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:104 (FAILED - 386) + +TaxonConcept + before validate + taxonomic position not given for fixed order rank + should eq "1.1" + taxonomic position given for fixed order rank + should eq "1.2" + taxonomic position not given for fixed order root rank + should eq "1" + after save + data should be populated when creating a child + should eq "Derp" + should eq "SPECIES" + +TaxonConcept + Canis lupus +Procedure: taxonomy + LISTING + cites_listing + for species Canis lupus (population split listing) + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:9 (FAILED - 387) + eu_listing + for species Canis lupus (population split listing) + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:15 (FAILED - 388) + cites_listed + for species Canis lupus + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:21 (FAILED - 389) + for subspecies Canis lupus crassodon + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:24 (FAILED - 390) + eu_listed + for species Canis lupus + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:30 (FAILED - 391) + show_in_species_plus_ac + for species Canis lupus + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:36 (FAILED - 392) + for subspecies Canis lupus crassodon + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:39 (FAILED - 393) + show_in_checklist_ac + for species Canis lupus + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:45 (FAILED - 394) + for subspecies Canis lupus crassodon + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:48 (FAILED - 395) + show_in_species_plus + for species Canis lupus + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:54 (FAILED - 396) + for subspecies Canis lupus crassodon + example at ./spec/models/taxon_concept/canis_lupus_spec.rb:57 (FAILED - 397) + +TaxonConcept + Caretta caretta CMS +Procedure: taxonomy + LISTING + cms_listing + for family Cheloniidae + example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:10 (FAILED - 398) + for species Caretta caretta + example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:13 (FAILED - 399) + cms_listed + for family Cheloniidae + example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:19 (FAILED - 400) + for species Caretta caretta + example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:22 (FAILED - 401) + CASCADING LISTING + current_cms_additions + for family Cheloniidae + example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:30 (FAILED - 402) + for species Caretta caretta + example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:35 (FAILED - 403) + +TaxonConcept + Cedrela montana +Procedure: taxonomy + LISTING + cites_listing + for species Cedrela montana + example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:10 (FAILED - 404) + cites_listed + for species Cedrela montana + example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:16 (FAILED - 405) + cites_show + for species Cedrela montana + example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:22 (FAILED - 406) + eu_listing + for species Cedrela montana + example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:28 (FAILED - 407) + eu_listed + for species Cedrela montana + example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:34 (FAILED - 408) + eu_show + for species Cedrela montana + example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:40 (FAILED - 409) + +TaxonConcept + Cervus elphus CMS +Procedure: taxonomy + LISTING + cms_listing + for species Cervus elaphus + example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:10 (FAILED - 410) + for subspecies Cervus elaphus bactrianus + example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:13 (FAILED - 411) + for subspecies Cervus elaphus barbarus + example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:16 (FAILED - 412) + show_in_species_plus_ac + for subspecies Cervus elaphus bactrianus (instrument) + example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:22 (FAILED - 413) + for subspecies Cervus elaphus barbarus (listing) + example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:25 (FAILED - 414) + show_in_species_plus + for subspecies Cervus elaphus bactrianus (instrument) + example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:31 (FAILED - 415) + for subspecies Cervus elaphus barbarus (listing) + example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:34 (FAILED - 416) + +TaxonConcept + Cervus elaphus +Procedure: taxonomy + TAXONOMY + full_name + for subspecies Cervus elaphus bactrianus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:10 (FAILED - 417) + for species Cervus elaphus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:13 (FAILED - 418) + for genus Cervus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:16 (FAILED - 419) + LISTING + cites_listing + for species Cervus elaphus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:24 (FAILED - 420) + for subspecies Cervus elaphus bactrianus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:27 (FAILED - 421) + for subspecies Cervus elaphus barbarus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:30 (FAILED - 422) + for subspecies Cervus elaphus hanglu + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:33 (FAILED - 423) + for subspecies Cervus elaphus canadensis + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:36 (FAILED - 424) + eu_listing + for species Cervus elaphus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:42 (FAILED - 425) + for subspecies Cervus elaphus bactrianus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:45 (FAILED - 426) + for subspecies Cervus elaphus barbarus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:48 (FAILED - 427) + for subspecies Cervus elaphus hanglu + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:51 (FAILED - 428) + for subspecies Cervus elaphus canadensis + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:54 (FAILED - 429) + cites_listed + for order Artiodactyla + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:60 (FAILED - 430) + for family Cervidae + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:63 (FAILED - 431) + for genus Cervus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:66 (FAILED - 432) + for species Cervus elaphus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:69 (FAILED - 433) + for subspecies Cervus elaphus bactrianus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:72 (FAILED - 434) + for subspecies Cervus elaphus barbarus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:75 (FAILED - 435) + for subspecies Cervus elaphus hanglu + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:78 (FAILED - 436) + for subspecies Cervus elaphus canadensis + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:81 (FAILED - 437) + eu_listed + for order Artiodactyla + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:87 (FAILED - 438) + for family Cervidae + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:90 (FAILED - 439) + for genus Cervus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:93 (FAILED - 440) + for species Cervus elaphus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:96 (FAILED - 441) + for subspecies Cervus elaphus bactrianus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:99 (FAILED - 442) + for subspecies Cervus elaphus barbarus + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:102 (FAILED - 443) + for subspecies Cervus elaphus hanglu + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:105 (FAILED - 444) + for subspecies Cervus elaphus canadensis + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:108 (FAILED - 445) + cites_show + for subspecies Cervus elaphus hanglu + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:114 (FAILED - 446) + for subspecies Cervus elaphus canadensis + example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:117 (FAILED - 447) + +TaxonConcept + Colophon +Procedure: taxonomy + LISTING + cites_listing + for genus Colophon + example at ./spec/models/taxon_concept/colophon_spec.rb:10 (FAILED - 448) + for species Colophon barnardi + example at ./spec/models/taxon_concept/colophon_spec.rb:13 (FAILED - 449) + eu_listing + for genus Colophon + example at ./spec/models/taxon_concept/colophon_spec.rb:19 (FAILED - 450) + for species Colophon barnardi + example at ./spec/models/taxon_concept/colophon_spec.rb:22 (FAILED - 451) + cites_listed + for genus Colophon + example at ./spec/models/taxon_concept/colophon_spec.rb:28 (FAILED - 452) + for species Colophon barnardi + example at ./spec/models/taxon_concept/colophon_spec.rb:31 (FAILED - 453) + eu_listed + for genus Colophon + example at ./spec/models/taxon_concept/colophon_spec.rb:37 (FAILED - 454) + for species Colophon barnardi + example at ./spec/models/taxon_concept/colophon_spec.rb:40 (FAILED - 455) + cites_show + for order Coleoptera + example at ./spec/models/taxon_concept/colophon_spec.rb:46 (FAILED - 456) + for family Lucanidae + example at ./spec/models/taxon_concept/colophon_spec.rb:49 (FAILED - 457) + current_party_ids + for genus Colophon + example at ./spec/models/taxon_concept/colophon_spec.rb:55 (FAILED - 458) + for species Colophon barnardi + example at ./spec/models/taxon_concept/colophon_spec.rb:58 (FAILED - 459) + +TaxonConcept + Dalbergia +Procedure: taxonomy + LISTING + cites_listing + for species Dalbergia abbreviata + example at ./spec/models/taxon_concept/dalbergia_spec.rb:10 (FAILED - 460) + for species Dalbergia abrahamii + example at ./spec/models/taxon_concept/dalbergia_spec.rb:13 (FAILED - 461) + cites_listed + for species Dalbergia abbreviata + example at ./spec/models/taxon_concept/dalbergia_spec.rb:19 (FAILED - 462) + for species Dalbergia abrahamii + example at ./spec/models/taxon_concept/dalbergia_spec.rb:22 (FAILED - 463) + cites_show + for species Dalbergia abbreviata + example at ./spec/models/taxon_concept/dalbergia_spec.rb:28 (FAILED - 464) + for species Dalbergia abrahamii + example at ./spec/models/taxon_concept/dalbergia_spec.rb:31 (FAILED - 465) + +TaxonConcept + destroy + general + when no dependent objects attached + should be truthy + when distributions + should be truthy + when common names + should be truthy + when references + should be truthy + when document citations + should be falsey + CMS + when taxon instruments + should be falsey + CITES / EU + when listing changes + should be falsey + when CITES quotas + should be falsey + when CITES suspensions + should be falsey + when EU opinions + should be falsey + when EU suspensions + should be falsey + when shipments + should be falsey + when reported shipments + should be falsey + +TaxonConcept + Diospyros +Procedure: taxonomy + LISTING + cites_listing + for species Diospyros aculeata + example at ./spec/models/taxon_concept/diospyros_spec.rb:10 (FAILED - 466) + for species Diospyros acuta + example at ./spec/models/taxon_concept/diospyros_spec.rb:13 (FAILED - 467) + cites_listed + for species Diospyros aculeata + example at ./spec/models/taxon_concept/diospyros_spec.rb:19 (FAILED - 468) + for species Diospyros acuta + example at ./spec/models/taxon_concept/diospyros_spec.rb:22 (FAILED - 469) + cites_show + for species Diospyros aculeata + example at ./spec/models/taxon_concept/diospyros_spec.rb:28 (FAILED - 470) + for species Diospyros acuta + example at ./spec/models/taxon_concept/diospyros_spec.rb:31 (FAILED - 471) + eu_listing + for species Diospyros aculeata + example at ./spec/models/taxon_concept/diospyros_spec.rb:37 (FAILED - 472) + for species Diospyros acuta + example at ./spec/models/taxon_concept/diospyros_spec.rb:40 (FAILED - 473) + eu_listed + for species Diospyros aculeata + example at ./spec/models/taxon_concept/diospyros_spec.rb:46 (FAILED - 474) + for species Diospyros acuta + example at ./spec/models/taxon_concept/diospyros_spec.rb:49 (FAILED - 475) + eu_show + for species Diospyros aculeata + example at ./spec/models/taxon_concept/diospyros_spec.rb:55 (FAILED - 476) + for species Diospyros acuta + example at ./spec/models/taxon_concept/diospyros_spec.rb:58 (FAILED - 477) + +TaxonConcept + Falconiformes +Procedure: taxonomy + TAXONOMY + rank_name + for Falco hybrid + example at ./spec/models/taxon_concept/falconiformes_spec.rb:10 (FAILED - 478) + LISTING + cites_listing + for order Falconiformes + example at ./spec/models/taxon_concept/falconiformes_spec.rb:18 (FAILED - 479) + for species Falco araea + example at ./spec/models/taxon_concept/falconiformes_spec.rb:21 (FAILED - 480) + for species Falco alopex (H) + example at ./spec/models/taxon_concept/falconiformes_spec.rb:24 (FAILED - 481) + for species Gymnogyps californianus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:27 (FAILED - 482) + for species Sarcoramphus papa + example at ./spec/models/taxon_concept/falconiformes_spec.rb:30 (FAILED - 483) + for species Vultur atratus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:33 (FAILED - 484) + eu_listing + for order Falconiformes + example at ./spec/models/taxon_concept/falconiformes_spec.rb:39 (FAILED - 485) + for species Falco araea + example at ./spec/models/taxon_concept/falconiformes_spec.rb:42 (FAILED - 486) + for species Falco alopex (H) + example at ./spec/models/taxon_concept/falconiformes_spec.rb:45 (FAILED - 487) + for species Gymnogyps californianus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:48 (FAILED - 488) + for species Sarcoramphus papa + example at ./spec/models/taxon_concept/falconiformes_spec.rb:51 (FAILED - 489) + for species Vultur atratus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:54 (FAILED - 490) + cites_status + for genus Vultur + example at ./spec/models/taxon_concept/falconiformes_spec.rb:60 (FAILED - 491) + for species Vultur atratus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:63 (FAILED - 492) + cites_listed + for order Falconiformes + example at ./spec/models/taxon_concept/falconiformes_spec.rb:69 (FAILED - 493) + for family Falconidae (inclusion in higher taxa listing) + example at ./spec/models/taxon_concept/falconiformes_spec.rb:72 (FAILED - 494) + for genus Falco + example at ./spec/models/taxon_concept/falconiformes_spec.rb:75 (FAILED - 495) + for species Falco araea + example at ./spec/models/taxon_concept/falconiformes_spec.rb:78 (FAILED - 496) + for species Falco alopex + example at ./spec/models/taxon_concept/falconiformes_spec.rb:81 (FAILED - 497) + for species Vultur atratus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:84 (FAILED - 498) + for subspecies Falco peregrinus peregrinus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:87 (FAILED - 499) + eu_listed + for order Falconiformes + example at ./spec/models/taxon_concept/falconiformes_spec.rb:93 (FAILED - 500) + for family Falconidae (inclusion in higher taxa listing) + example at ./spec/models/taxon_concept/falconiformes_spec.rb:96 (FAILED - 501) + for genus Falco + example at ./spec/models/taxon_concept/falconiformes_spec.rb:99 (FAILED - 502) + for species Falco araea + example at ./spec/models/taxon_concept/falconiformes_spec.rb:102 (FAILED - 503) + for species Falco alopex + example at ./spec/models/taxon_concept/falconiformes_spec.rb:105 (FAILED - 504) + for species Vultur atratus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:108 (FAILED - 505) + for subspecies Falco peregrinus peregrinus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:111 (FAILED - 506) + cites_show + for order Falconiformes + example at ./spec/models/taxon_concept/falconiformes_spec.rb:117 (FAILED - 507) + for family Falconidae + example at ./spec/models/taxon_concept/falconiformes_spec.rb:120 (FAILED - 508) + for Falco hybrid + example at ./spec/models/taxon_concept/falconiformes_spec.rb:123 (FAILED - 509) + show_in_checklist_ac + for subspecies Falco peregrinus peregrinus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:129 (FAILED - 510) + show_in_species_plus_ac + for subspecies Falco peregrinus peregrinus + example at ./spec/models/taxon_concept/falconiformes_spec.rb:135 (FAILED - 511) + +TaxonConcept + create + when new + should be truthy + should be truthy + should be truthy + should == "Lolcatus lolcatus x lolatus" + when duplicate + should change #count by 0 + when duplicate but author name different + should change #count by 1 + +TaxonConcept + Loxodonta africana CMS +Procedure: taxonomy + TAXONOMY + full_name + for species Loxodonta africana + example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:9 (FAILED - 512) + for genus Loxodonta + example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:12 (FAILED - 513) + rank + for species Loxodonta africana + example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:17 (FAILED - 514) + ancestors + family + example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:22 (FAILED - 515) + order + example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:25 (FAILED - 516) + class + example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:28 (FAILED - 517) + LISTING + cms_listing + for species Loxodonta africana + example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:36 (FAILED - 518) + cms_listed + for species Loxodonta africana + example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:42 (FAILED - 519) + +TaxonConcept + Loxodonta africana +Procedure: taxonomy + TAXONOMY + full_name + for species Loxodonta africana + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:9 (FAILED - 520) + for genus Loxodonta + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:12 (FAILED - 521) + rank + for species Loxodonta africana + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:17 (FAILED - 522) + ancestors + family + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:22 (FAILED - 523) + order + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:25 (FAILED - 524) + class + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:28 (FAILED - 525) + LISTING + cites_listing + for species Loxodonta africana (population split listing) + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:36 (FAILED - 526) + eu_listing + for species Loxodonta africana (population split listing) + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:42 (FAILED - 527) + cites_listed + for species Loxodonta africana + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:48 (FAILED - 528) + for family Elephantidae + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:51 (FAILED - 529) + eu_listed + for species Loxodonta africana + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:57 (FAILED - 530) + for family Elephantidae + example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:60 (FAILED - 531) + +TaxonConcept + Mellivora capensis +Procedure: taxonomy + LISTING + cites_listing + for species Mellivora capensis + example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:9 (FAILED - 532) + eu_listing + for species Mellivora capensis + example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:15 (FAILED - 533) + cites_listed + for family Mustelinae + example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:21 (FAILED - 534) + for genus Mellivora + example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:24 (FAILED - 535) + for species Mellivora capensis + example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:27 (FAILED - 536) + eu_listed + for family Mustelinae + example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:33 (FAILED - 537) + for genus Mellivora + example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:36 (FAILED - 538) + for species Mellivora capensis + example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:39 (FAILED - 539) + current_party_ids + for species Mellivora capensis + example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:45 (FAILED - 540) + +TaxonConcept + Moschus +Procedure: taxonomy + LISTING + cites_listing + for genus Moschus + example at ./spec/models/taxon_concept/moschus_spec.rb:10 (FAILED - 541) + for species Moschus leucogaster + example at ./spec/models/taxon_concept/moschus_spec.rb:13 (FAILED - 542) + for species Moschus moschiferus + example at ./spec/models/taxon_concept/moschus_spec.rb:16 (FAILED - 543) + for subspecies Moschus moschiferus moschiferus + example at ./spec/models/taxon_concept/moschus_spec.rb:19 (FAILED - 544) + cites_listed + for genus Moschus + example at ./spec/models/taxon_concept/moschus_spec.rb:25 (FAILED - 545) + for species Moschus leucogaster + example at ./spec/models/taxon_concept/moschus_spec.rb:28 (FAILED - 546) + for species Moschus moschiferus + example at ./spec/models/taxon_concept/moschus_spec.rb:31 (FAILED - 547) + for subspecies Moschus moschiferus moschiferus + example at ./spec/models/taxon_concept/moschus_spec.rb:34 (FAILED - 548) + CASCADING LISTING + current_cites_additions + for species Moschus leucogaster + example at ./spec/models/taxon_concept/moschus_spec.rb:42 (FAILED - 549) + for species Moschus moschiferus + example at ./spec/models/taxon_concept/moschus_spec.rb:51 (FAILED - 550) + for subspecies Moschus moschiferus moschiferus + example at ./spec/models/taxon_concept/moschus_spec.rb:60 (FAILED - 551) + +TaxonConcept + Natator depressus +Procedure: taxonomy + LISTING + cites_listing + for family Cheloniidae + example at ./spec/models/taxon_concept/natator_depressus_spec.rb:10 (FAILED - 552) + for species Natator depressus + example at ./spec/models/taxon_concept/natator_depressus_spec.rb:13 (FAILED - 553) + +TaxonConcept + Notomys aquilo +Procedure: taxonomy + LISTING + cites_listing + for genus Notomys + example at ./spec/models/taxon_concept/notomys_aquilo_spec.rb:10 (FAILED - 554) + for species Notomys aquilo + example at ./spec/models/taxon_concept/notomys_aquilo_spec.rb:13 (FAILED - 555) + cites_show + for genus Notomys + example at ./spec/models/taxon_concept/notomys_aquilo_spec.rb:19 (FAILED - 556) + for species Notomys aquilo + example at ./spec/models/taxon_concept/notomys_aquilo_spec.rb:22 (FAILED - 557) + +TaxonConcept + Panax ginseng +Procedure: taxonomy + LISTING + cites_listed + for species Panax ginseng + example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:11 (FAILED - 558) + for genus Panax + example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:14 (FAILED - 559) + eu_listed + for species Panax ginseng + example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:20 (FAILED - 560) + for genus Panax + example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:23 (FAILED - 561) + cites_listing + for species Panax ginseng + example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:29 (FAILED - 562) + eu_listing + for species Panax ginseng + example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:35 (FAILED - 563) + ann_symbol + for species Panax ginseng + example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:41 (FAILED - 564) + hash_ann_symbol + for species Panax ginseng + example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:47 (FAILED - 565) + +TaxonConcept + Pereskia +Procedure: taxonomy + LISTING + cites_listing + for genus Pereskia (not listed, shown) + example at ./spec/models/taxon_concept/pereskia_spec.rb:10 (FAILED - 566) + for genus Ariocarpus + example at ./spec/models/taxon_concept/pereskia_spec.rb:13 (FAILED - 567) + for family Cactaceae + example at ./spec/models/taxon_concept/pereskia_spec.rb:16 (FAILED - 568) + eu_listing + for genus Pereskia (not listed, shown) + example at ./spec/models/taxon_concept/pereskia_spec.rb:22 (FAILED - 569) + for genus Ariocarpus + example at ./spec/models/taxon_concept/pereskia_spec.rb:25 (FAILED - 570) + for family Cactaceae + example at ./spec/models/taxon_concept/pereskia_spec.rb:28 (FAILED - 571) + cites_listed + for family Cactaceae + example at ./spec/models/taxon_concept/pereskia_spec.rb:34 (FAILED - 572) + for genus Pereskia + example at ./spec/models/taxon_concept/pereskia_spec.rb:37 (FAILED - 573) + eu_listed + for family Cactaceae + example at ./spec/models/taxon_concept/pereskia_spec.rb:43 (FAILED - 574) + for genus Pereskia + example at ./spec/models/taxon_concept/pereskia_spec.rb:46 (FAILED - 575) + cites_status + for genus Pereskia + example at ./spec/models/taxon_concept/pereskia_spec.rb:52 (FAILED - 576) + cites_show + for genus Pereskia + example at ./spec/models/taxon_concept/pereskia_spec.rb:58 (FAILED - 577) + +TaxonConcept + Platysternon megacephalum +Procedure: taxonomy + LISTING + cites_listing + for family Platysternidae + example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:10 (FAILED - 578) + for species Platysternon megacephalum + example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:13 (FAILED - 579) + cites_listed + for species Platysternon megacephalum + example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:19 (FAILED - 580) + cites_show + for species Platysternon megacephalum + example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:25 (FAILED - 581) + eu_listing + for family Platysternidae + example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:31 (FAILED - 582) + for species Platysternon megacephalum + example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:34 (FAILED - 583) + eu_listed + for species Platysternon megacephalum + example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:40 (FAILED - 584) + eu_show + for species Platysternon megacephalum + example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:46 (FAILED - 585) + +TaxonConcept + Pristis microdon +Procedure: taxonomy + LISTING + cites_listing + for family Pristidae + example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:10 (FAILED - 586) + for species Pristis microdon + example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:13 (FAILED - 587) + cites_listed + for species Pristis microdon + example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:19 (FAILED - 588) + cites_show + for species Pristis microdon + example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:25 (FAILED - 589) + eu_listing + for family Pristidae + example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:31 (FAILED - 590) + for species Pristis microdon + example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:34 (FAILED - 591) + eu_listed + for species Pristis microdon + example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:40 (FAILED - 592) + eu_show + for species Pristis microdon + example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:46 (FAILED - 593) + +TaxonConcept + Pseudomys fieldi +Procedure: taxonomy + LISTING + cites_listing + for subspecies Pseudomys fieldi preaconis + example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:10 (FAILED - 594) + for species Pseudomys fieldi + example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:13 (FAILED - 595) + eu_listing + for subspecies Pseudomys fieldi preaconis + example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:19 (FAILED - 596) + for species Pseudomys fieldi + example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:22 (FAILED - 597) + cites_show + for subspecies Pseudomys fieldi preaconis + example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:28 (FAILED - 598) + for species Pseudomys fieldi + example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:31 (FAILED - 599) + +TaxonConcept + Psittaciformes +Procedure: taxonomy + LISTING + cites_listing + for order Psittaciformes + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:10 (FAILED - 600) + for species Cacatua goffiniana + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:13 (FAILED - 601) + for species Cacatua ducorpsi (H) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:16 (FAILED - 602) + for species Probosciger aterrimus + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:19 (FAILED - 603) + for species Amazona aestiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:22 (FAILED - 604) + for species Agapornis roseicollis (DEL II, not listed, not shown) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:25 (FAILED - 605) + for species Psittacula krameri (DEL III, not listed, not shown) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:28 (FAILED - 606) + for subspecies Amazona festiva festiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:31 (FAILED - 607) + eu_listing + for order Psittaciformes + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:37 (FAILED - 608) + for species Cacatua goffiniana + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:40 (FAILED - 609) + for species Cacatua ducorpsi (H) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:43 (FAILED - 610) + for species Probosciger aterrimus + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:46 (FAILED - 611) + for species Amazona aestiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:49 (FAILED - 612) + for species Agapornis roseicollis (DEL II, not listed, not shown) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:52 (FAILED - 613) + for species Psittacula krameri (DEL III, not listed, not shown) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:55 (FAILED - 614) + for subspecies Amazona festiva festiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:58 (FAILED - 615) + cites_listed + for order Psittaciformes + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:64 (FAILED - 616) + for family Cacatuidae + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:67 (FAILED - 617) + for genus Cacatua + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:70 (FAILED - 618) + for species Cacatua goffiniana + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:73 (FAILED - 619) + for species Cacatua ducorpsi + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:76 (FAILED - 620) + for subspecies Amazona festiva festiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:79 (FAILED - 621) + eu_listed + for order Psittaciformes + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:85 (FAILED - 622) + for family Cacatuidae + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:88 (FAILED - 623) + for genus Cacatua + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:91 (FAILED - 624) + for species Cacatua goffiniana + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:94 (FAILED - 625) + for species Cacatua ducorpsi + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:97 (FAILED - 626) + for subspecies Amazona festiva festiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:100 (FAILED - 627) + cites_show + for species Agapornis roseicollis (DEL II) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:106 (FAILED - 628) + for species Amazona aestiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:109 (FAILED - 629) + for species Psittacula krameri (DEL III) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:112 (FAILED - 630) + cites_status + for species Agapornis roseicollis (DEL II) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:118 (FAILED - 631) + for species Psittacula krameri (DEL III) + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:121 (FAILED - 632) + show_in_checklist_ac + for subspecies Amazona festiva festiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:127 (FAILED - 633) + show_in_species_plus_ac + for subspecies Amazona festiva festiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:133 (FAILED - 634) + show_in_species_plus + for subspecies Amazona festiva festiva + example at ./spec/models/taxon_concept/psittaciformes_spec.rb:139 (FAILED - 635) + +TaxonConcept + create + when new + should be truthy + should be truthy + should be truthy + should == "Lolcatus lolus" + when duplicate + should change #count by 0 + when duplicate but author name different + should change #count by 1 + when has accepted parent + should == "Lolcatus lolus furiatus" + overnight calculations +Procedure: taxonomy + example at ./spec/models/taxon_concept/synonyms_spec.rb:93 (FAILED - 636) + +TaxonConcept + Tapiridae +Procedure: taxonomy + TAXONOMY + full_name + for family Tapiridae + example at ./spec/models/taxon_concept/tapiridae_spec.rb:9 (FAILED - 637) + rank + for family Tapiridae + example at ./spec/models/taxon_concept/tapiridae_spec.rb:14 (FAILED - 638) + ancestors + order + example at ./spec/models/taxon_concept/tapiridae_spec.rb:19 (FAILED - 639) + class + example at ./spec/models/taxon_concept/tapiridae_spec.rb:22 (FAILED - 640) + LISTING + cites_listing + for family Tapiridae + example at ./spec/models/taxon_concept/tapiridae_spec.rb:30 (FAILED - 641) + for species Tapirus terrestris + example at ./spec/models/taxon_concept/tapiridae_spec.rb:33 (FAILED - 642) + eu_listing + for family Tapiridae + example at ./spec/models/taxon_concept/tapiridae_spec.rb:39 (FAILED - 643) + for species Tapirus terrestris + example at ./spec/models/taxon_concept/tapiridae_spec.rb:42 (FAILED - 644) + cites_listed + for family Tapiridae + example at ./spec/models/taxon_concept/tapiridae_spec.rb:48 (FAILED - 645) + for genus Tapirus + example at ./spec/models/taxon_concept/tapiridae_spec.rb:51 (FAILED - 646) + for species Tapirus terrestris + example at ./spec/models/taxon_concept/tapiridae_spec.rb:54 (FAILED - 647) + eu_listed + for family Tapiridae + example at ./spec/models/taxon_concept/tapiridae_spec.rb:60 (FAILED - 648) + for genus Tapirus + example at ./spec/models/taxon_concept/tapiridae_spec.rb:63 (FAILED - 649) + for species Tapirus terrestris + example at ./spec/models/taxon_concept/tapiridae_spec.rb:66 (FAILED - 650) + +TaxonConcept + create + when new + should be truthy + should be truthy + should be truthy + should == "Lolcatus lolus" + when duplicate + should change #count by 0 + when duplicate but author name different + should change #count by 1 + when has accepted parent + should == "Lolcatus lolus furiatus" + overnight calculations +Procedure: taxonomy + example at ./spec/models/taxon_concept/trade_names_spec.rb:93 (FAILED - 651) + +TaxonConcept + Uroplatus +Procedure: taxonomy + REFERENCES + cites_accepted + for genus Uroplatus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:10 (FAILED - 652) + for species Uroplatus alluaudi + example at ./spec/models/taxon_concept/uroplatus_spec.rb:13 (FAILED - 653) + for species Uroplatus giganteus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:16 (FAILED - 654) + standard_taxon_concept_references + for family Gekkonidae + example at ./spec/models/taxon_concept/uroplatus_spec.rb:21 (FAILED - 655) + for genus Uroplatus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:24 (FAILED - 656) + for species Uroplatus alluaudi + example at ./spec/models/taxon_concept/uroplatus_spec.rb:27 (FAILED - 657) + for species Uroplatus giganteus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:30 (FAILED - 658) + LISTING + cites_listing + for genus Uroplatus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:37 (FAILED - 659) + for species Uroplatus giganteus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:40 (FAILED - 660) + eu_listing + for genus Uroplatus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:46 (FAILED - 661) + for species Uroplatus giganteus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:49 (FAILED - 662) + cites_listed + for family Gekkonidae + example at ./spec/models/taxon_concept/uroplatus_spec.rb:55 (FAILED - 663) + for genus Uroplatus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:58 (FAILED - 664) + for species Uroplatus giganteus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:61 (FAILED - 665) + eu_listed + for family Gekkonidae + example at ./spec/models/taxon_concept/uroplatus_spec.rb:67 (FAILED - 666) + for genus Uroplatus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:70 (FAILED - 667) + for species Uroplatus giganteus + example at ./spec/models/taxon_concept/uroplatus_spec.rb:73 (FAILED - 668) + +TaxonConcept + create + all fine + should be truthy + taxonomy does not match parent + should have 1 error on :parent_id + parent is not an accepted name + should have 1 error on :parent_id + parent rank is too high above child rank + should have 1 error on :parent_id + parent rank is below child rank + should have 1 error on :parent_id + scientific name is not given + should have 1 error on :taxon_name_id + when taxonomic position malformed + should have 1 error on :taxonomic_position + when full name is already given + should have 1 error on :full_name + update + taxonomy + cannot change taxonomy when dependents present + scientific name + cannot change species scientific name + cannot change genus scientific name + parent + cannot change A species parent + can change S species parent + can change A genus parent + rank + cannot change A species rank + can change S species rank + +TaxonConcept + Varanidae +Procedure: taxonomy + REFERENCES + cites_accepted + for species Varanus bengalensis + example at ./spec/models/taxon_concept/varanidae_spec.rb:10 (FAILED - 669) + standard_taxon_concept_references + for order Sauria + example at ./spec/models/taxon_concept/varanidae_spec.rb:15 (FAILED - 670) + for family Varanidae + example at ./spec/models/taxon_concept/varanidae_spec.rb:18 (FAILED - 671) + for species Varanus bengalensis + example at ./spec/models/taxon_concept/varanidae_spec.rb:21 (FAILED - 672) + for species Varanus bushi + example at ./spec/models/taxon_concept/varanidae_spec.rb:24 (FAILED - 673) + example at ./spec/models/taxon_concept/varanidae_spec.rb:25 (FAILED - 674) + LISTING + cites_listing + for genus Varanus + example at ./spec/models/taxon_concept/varanidae_spec.rb:32 (FAILED - 675) + for species Varanus bengalensis + example at ./spec/models/taxon_concept/varanidae_spec.rb:35 (FAILED - 676) + eu_listing + for genus Varanus + example at ./spec/models/taxon_concept/varanidae_spec.rb:41 (FAILED - 677) + for species Varanus bengalensis + example at ./spec/models/taxon_concept/varanidae_spec.rb:44 (FAILED - 678) + cites_listed + for family Varanidae + example at ./spec/models/taxon_concept/varanidae_spec.rb:50 (FAILED - 679) + for genus Varanus + example at ./spec/models/taxon_concept/varanidae_spec.rb:53 (FAILED - 680) + for species Varanus bengalensis + example at ./spec/models/taxon_concept/varanidae_spec.rb:56 (FAILED - 681) + eu_listed + for family Varanidae + example at ./spec/models/taxon_concept/varanidae_spec.rb:62 (FAILED - 682) + for genus Varanus + example at ./spec/models/taxon_concept/varanidae_spec.rb:65 (FAILED - 683) + for species Varanus bengalensis + example at ./spec/models/taxon_concept/varanidae_spec.rb:68 (FAILED - 684) + +TaxonConceptData + to_h + when regular accepted name + should eq "Canidae" + when N accepted name + should eq "Canidae" + when hybrid + should eq "Canidae" + when synonym + should eq "Canidae" + when trade name + should eq "Canidae" + +TaxonConceptPrefixMatcher + when name status not specified + should include # "GENUS", "kingdom_id" => "31604", "kingdom_name" => "Lupus10352", "phylum_id" => "31605", "phylum_name" => "Lupus10351", "class_id" => "31606", "class_name" => "Lupus10350", "order_id" => "31607", "order_name" => "Aaa", "family_id" => "31608", "family_name" => "Aac", "subfamily_id" => "31609", "subfamily_name" => "Aab", "genus_id" => "31610", "genus_name" => "Abb"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Abb", name_status: "A", created_at: "2024-01-04 16:51:59", updated_at: "2024-01-04 16:51:59", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4305, created_by_id: 4305, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should not include # "GENUS", "kingdom_id" => "31613", "kingdom_name" => "Lupus10355", "phylum_id" => "31614", "phylum_name" => "Lupus10354", "class_id" => "31615", "class_name" => "Lupus10353", "order_id" => "31616", "order_name" => "Aaa", "family_id" => "31617", "family_name" => "Aac", "subfamily_id" => "31618", "subfamily_name" => "Aab", "genus_id" => "31621", "genus_name" => "Abc"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Abc", name_status: "H", created_at: "2024-01-04 16:51:59", updated_at: "2024-01-04 16:51:59", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4306, created_by_id: 4306, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + when name status H + should not include # "GENUS", "kingdom_id" => "31622", "kingdom_name" => "Lupus10358", "phylum_id" => "31623", "phylum_name" => "Lupus10357", "class_id" => "31624", "class_name" => "Lupus10356", "order_id" => "31625", "order_name" => "Aaa", "family_id" => "31626", "family_name" => "Aac", "subfamily_id" => "31627", "subfamily_name" => "Aab", "genus_id" => "31628", "genus_name" => "Abb"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Abb", name_status: "A", created_at: "2024-01-04 16:52:00", updated_at: "2024-01-04 16:52:00", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4307, created_by_id: 4307, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + should include # "GENUS", "kingdom_id" => "31631", "kingdom_name" => "Lupus10361", "phylum_id" => "31632", "phylum_name" => "Lupus10360", "class_id" => "31633", "class_name" => "Lupus10359", "order_id" => "31634", "order_name" => "Aaa", "family_id" => "31635", "family_name" => "Aac", "subfamily_id" => "31636", "subfamily_name" => "Aab", "genus_id" => "31639", "genus_name" => "Abc"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Abc", name_status: "H", created_at: "2024-01-04 16:52:00", updated_at: "2024-01-04 16:52:00", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4308, created_by_id: 4308, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + when rank scope applied + should == ["Aab", "Aac"] + should == ["Aaa"] + should == ["Aaa", "Aaab"] + when taxon concept scope applied + should == ["Aaa", "Aab", "Aac"] + should == ["Aaab", "Aab", "Abb"] + +TaxonRelationship + has_opposite? + a relationship with no opposite + should == false + with an opposite + should == true + after_create_create_opposite + when creating a bidirectional relationship + should == true + when creating a non bidirectional relationship + should == false + validate_uniqueness_taxon_concept_id + adding a duplicate relationship between the same taxon_concepts + example at ./spec/models/taxon_relationship_spec.rb:66 + validate_intertaxonomic_relationship_uniqueness + adding an intertaxonomic relationship between taxon concepts that are already related (A -> B) + should == false + adding an intertaxonomic relationship between taxon concepts that are already related in the opposite direction (B -> A) + should == false + adding an intertaxonomic relationship between taxon concepts that are not already related + should == true + +Taxonomy + create + when valid + should be valid + when name missing + should be invalid + should have 1 error on :name + when name duplicated + should be invalid + should have 1 error on :name + update + when updating a non-protected name + should be truthy + when updating a protected name + should be falsey + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + should be falsey + when protected name + should be falsey + +Term + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + when CITES suspension + should be falsey + when CITES quota + should be falsey + when shipments + should be falsey + +Trade::AnnualReportUpload + valid? + when uploaded file as exporter with exporter column headers + example at ./spec/models/trade/annual_report_upload_spec.rb:54 (FAILED - 685) + when uploaded file as importer with exporter column headers + example at ./spec/models/trade/annual_report_upload_spec.rb:64 (FAILED - 686) + when uploaded file as importer with importer column headers + example at ./spec/models/trade/annual_report_upload_spec.rb:74 (FAILED - 687) + when uploaded file as exporter with importer column headers + example at ./spec/models/trade/annual_report_upload_spec.rb:84 (FAILED - 688) + validation_errors + example at ./spec/models/trade/annual_report_upload_spec.rb:99 (FAILED - 689) + create + when blank lines in import file + example at ./spec/models/trade/annual_report_upload_spec.rb:112 (FAILED - 690) + destroy + example at ./spec/models/trade/annual_report_upload_spec.rb:127 (FAILED - 691) + submit + it calls submission worker + +Trade::DistinctValuesValidationRule + validation_errors_for_aru + exporter should not equal importer (E) + example at ./spec/models/trade/distinct_values_validation_rule_spec.rb:52 (FAILED - 692) + exporter should not equal importer (I) + example at ./spec/models/trade/distinct_values_validation_rule_spec.rb:69 (FAILED - 693) + exporter should not equal country of origin + example at ./spec/models/trade/distinct_values_validation_rule_spec.rb:82 (FAILED - 694) + +Trade::Filter + results + when searching by taxon concepts ids + in the public interface + at GENUS rank +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:15 (FAILED - 695) +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:16 (FAILED - 696) +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:17 (FAILED - 697) + at FAMILY rank +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:25 (FAILED - 698) + in the admin interface + at GENUS rank +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:34 (FAILED - 699) +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:35 (FAILED - 700) +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:36 (FAILED - 701) + at FAMILY rank +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:43 (FAILED - 702) +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:44 (FAILED - 703) +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:45 (FAILED - 704) + at mixed ranks +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:54 (FAILED - 705) +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:55 (FAILED - 706) +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:56 (FAILED - 707) + when status N shipments present +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:68 (FAILED - 708) + when subspecies shipments present +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:79 (FAILED - 709) + when synonym subspecies shipments present + when searching by taxonomic parent +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:95 (FAILED - 710) + when searching by accepted name +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:103 (FAILED - 711) + when searching by reported taxon concepts ids + when trade names shipments present +Procedure: taxonomy + example at ./spec/models/trade/filter_spec.rb:122 (FAILED - 712) + when searching by appendices + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2947, importer_id: 2946, country_of_origin_id: 2946, reported_by_exporter: true, taxon_concept_id: 32280, year: 2012, created_at: "2024-01-04 16:52:31", updated_at: "2024-01-04 16:52:31", sandbox_id: nil, reported_taxon_concept_id: 32280, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4371, created_by_id: 4371, import_permits_ids: [1254], export_permits_ids: [1255, 1256], origin_permits_ids: [1257], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 1 + when searching for terms_ids + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2951, importer_id: 2950, country_of_origin_id: 2950, reported_by_exporter: true, taxon_concept_id: 32334, year: 2012, created_at: "2024-01-04 16:52:33", updated_at: "2024-01-04 16:52:33", sandbox_id: nil, reported_taxon_concept_id: 32334, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4373, created_by_id: 4373, import_permits_ids: [1268], export_permits_ids: [1269, 1270], origin_permits_ids: [1271], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 3 + when searching for units_ids + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2955, importer_id: 2954, country_of_origin_id: 2954, reported_by_exporter: true, taxon_concept_id: 32388, year: 2012, created_at: "2024-01-04 16:52:35", updated_at: "2024-01-04 16:52:35", sandbox_id: nil, reported_taxon_concept_id: 32388, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4375, created_by_id: 4375, import_permits_ids: [1282], export_permits_ids: [1283, 1284], origin_permits_ids: [1285], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 3 + when searching for purposes_ids + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2959, importer_id: 2958, country_of_origin_id: 2958, reported_by_exporter: true, taxon_concept_id: 32442, year: 2012, created_at: "2024-01-04 16:52:38", updated_at: "2024-01-04 16:52:38", sandbox_id: nil, reported_taxon_concept_id: 32442, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4377, created_by_id: 4377, import_permits_ids: [1296], export_permits_ids: [1297, 1298], origin_permits_ids: [1299], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 7 + when searching for sources_ids + when code + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2963, importer_id: 2962, country_of_origin_id: 2962, reported_by_exporter: true, taxon_concept_id: 32496, year: 2012, created_at: "2024-01-04 16:52:40", updated_at: "2024-01-04 16:52:40", sandbox_id: nil, reported_taxon_concept_id: 32496, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4379, created_by_id: 4379, import_permits_ids: [1310], export_permits_ids: [1311, 1312], origin_permits_ids: [1313], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 2 + when blank + should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2966, importer_id: 2967, country_of_origin_id: nil, reported_by_exporter: false, taxon_concept_id: 32553, year: 2013, created_at: "2024-01-04 16:52:43", updated_at: "2024-01-04 16:52:43", sandbox_id: nil, reported_taxon_concept_id: 32553, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4381, created_by_id: 4381, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 1 + when both code and blank + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2971, importer_id: 2970, country_of_origin_id: 2970, reported_by_exporter: true, taxon_concept_id: 32604, year: 2012, created_at: "2024-01-04 16:52:45", updated_at: "2024-01-04 16:52:45", sandbox_id: nil, reported_taxon_concept_id: 32604, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4383, created_by_id: 4383, import_permits_ids: [1338], export_permits_ids: [1339, 1340], origin_permits_ids: [1341], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 3 + when wild + should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2974, importer_id: 2975, country_of_origin_id: nil, reported_by_exporter: false, taxon_concept_id: 32661, year: 2013, created_at: "2024-01-04 16:52:47", updated_at: "2024-01-04 16:52:47", sandbox_id: nil, reported_taxon_concept_id: 32661, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4385, created_by_id: 4385, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 5 + when wild and internal + should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2978, importer_id: 2979, country_of_origin_id: nil, reported_by_exporter: false, taxon_concept_id: 32715, year: 2013, created_at: "2024-01-04 16:52:49", updated_at: "2024-01-04 16:52:49", sandbox_id: nil, reported_taxon_concept_id: 32715, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4387, created_by_id: 4387, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 4 + when searching for importers_ids + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2983, importer_id: 2982, country_of_origin_id: 2982, reported_by_exporter: true, taxon_concept_id: 32766, year: 2012, created_at: "2024-01-04 16:52:52", updated_at: "2024-01-04 16:52:52", sandbox_id: nil, reported_taxon_concept_id: 32766, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4389, created_by_id: 4389, import_permits_ids: [1380], export_permits_ids: [1381, 1382], origin_permits_ids: [1383], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 2 + when searching for exporters_ids + should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2986, importer_id: 2987, country_of_origin_id: 2987, reported_by_exporter: false, taxon_concept_id: 32823, year: 2013, created_at: "2024-01-04 16:52:54", updated_at: "2024-01-04 16:52:54", sandbox_id: nil, reported_taxon_concept_id: 32823, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4391, created_by_id: 4391, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 5 + when searching for countries_of_origin_ids + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2991, importer_id: 2990, country_of_origin_id: 2990, reported_by_exporter: true, taxon_concept_id: 32874, year: 2012, created_at: "2024-01-04 16:52:57", updated_at: "2024-01-04 16:52:57", sandbox_id: nil, reported_taxon_concept_id: 32874, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4393, created_by_id: 4393, import_permits_ids: [1408], export_permits_ids: [1409, 1410], origin_permits_ids: [1411], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 2 + when searching by year + when time range specified + should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2994, importer_id: 2995, country_of_origin_id: 2995, reported_by_exporter: false, taxon_concept_id: 32931, year: 2013, created_at: "2024-01-04 16:52:59", updated_at: "2024-01-04 16:52:59", sandbox_id: nil, reported_taxon_concept_id: 32931, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4395, created_by_id: 4395, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 6 + when time range specified incorrectly + should == 0 + when time range start specified + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3001, importer_id: 3000, country_of_origin_id: 3000, reported_by_exporter: true, taxon_concept_id: 33009, year: 2012, created_at: "2024-01-04 16:53:03", updated_at: "2024-01-04 16:53:03", sandbox_id: nil, reported_taxon_concept_id: 33009, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4398, created_by_id: 4398, import_permits_ids: [1443], export_permits_ids: [1444, 1445], origin_permits_ids: [1446], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 7 + when time range end specified + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3005, importer_id: 3004, country_of_origin_id: 3004, reported_by_exporter: true, taxon_concept_id: 33063, year: 2012, created_at: "2024-01-04 16:53:05", updated_at: "2024-01-04 16:53:05", sandbox_id: nil, reported_taxon_concept_id: 33063, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4400, created_by_id: 4400, import_permits_ids: [1457], export_permits_ids: [1458, 1459], origin_permits_ids: [1460], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 1 + when searching by reporter_type + when reporter type is not I or E + should == 7 + when reporter type is I + should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 3010, importer_id: 3011, country_of_origin_id: 3011, reported_by_exporter: false, taxon_concept_id: 33147, year: 2013, created_at: "2024-01-04 16:53:08", updated_at: "2024-01-04 16:53:08", sandbox_id: nil, reported_taxon_concept_id: 33147, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4403, created_by_id: 4403, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 5 + when reporter type is E + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3015, importer_id: 3014, country_of_origin_id: 3014, reported_by_exporter: true, taxon_concept_id: 33198, year: 2012, created_at: "2024-01-04 16:53:11", updated_at: "2024-01-04 16:53:11", sandbox_id: nil, reported_taxon_concept_id: 33198, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4405, created_by_id: 4405, import_permits_ids: [1492], export_permits_ids: [1493, 1494], origin_permits_ids: [1495], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 2 + when searching by permit + when permit number + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3019, importer_id: 3018, country_of_origin_id: 3018, reported_by_exporter: true, taxon_concept_id: 33252, year: 2012, created_at: "2024-01-04 16:53:13", updated_at: "2024-01-04 16:53:13", sandbox_id: nil, reported_taxon_concept_id: 33252, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4407, created_by_id: 4407, import_permits_ids: [1506], export_permits_ids: [1507, 1508], origin_permits_ids: [1509], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 1 + when blank + should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 3022, importer_id: 3023, country_of_origin_id: 3023, reported_by_exporter: false, taxon_concept_id: 33309, year: 2013, created_at: "2024-01-04 16:53:15", updated_at: "2024-01-04 16:53:15", sandbox_id: nil, reported_taxon_concept_id: 33309, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4409, created_by_id: 4409, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 5 + when both permit number and blank + should == 6 + when searching by quantity + should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3029, importer_id: 3028, country_of_origin_id: 3028, reported_by_exporter: true, taxon_concept_id: 33387, year: 2012, created_at: "2024-01-04 16:53:19", updated_at: "2024-01-04 16:53:19", sandbox_id: nil, reported_taxon_concept_id: 33387, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4412, created_by_id: 4412, import_permits_ids: [1541], export_permits_ids: [1542, 1543], origin_permits_ids: [1544], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> + should == 1 + total_cnt + when none matches + should == 0 + when one matches + should == 1 + when two match + should == 7 + +Trade::InclusionValidationRule + matching_records_for_aru_and_error + example at ./spec/models/trade/inclusion_validation_rule_spec.rb:65 (FAILED - 713) + refresh_errors_if_needed + when no updates + example at ./spec/models/trade/inclusion_validation_rule_spec.rb:104 (FAILED - 714) + when updates and error fixed for all records + error record is destroyed (FAILED - 715) + when updates and error fixed for some records + error record is updated to reflect new error_count (FAILED - 716) + validation_errors_for_aru + species name may have extra whitespace between name segments + example at ./spec/models/trade/inclusion_validation_rule_spec.rb:148 (FAILED - 717) + trading partner should be a valid iso code + example at ./spec/models/trade/inclusion_validation_rule_spec.rb:175 (FAILED - 718) + term can only be paired with unit as defined by term_trade_codes_pairs table + when invalid combination + example at ./spec/models/trade/inclusion_validation_rule_spec.rb:202 (FAILED - 719) + when required unit blank + example at ./spec/models/trade/inclusion_validation_rule_spec.rb:214 (FAILED - 720) + term can only be paired with purpose as defined by term_trade_codes_pairs table + example at ./spec/models/trade/inclusion_validation_rule_spec.rb:234 (FAILED - 721) + taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table + when accepted name + example at ./spec/models/trade/inclusion_validation_rule_spec.rb:255 (FAILED - 722) + when hybrid + example at ./spec/models/trade/inclusion_validation_rule_spec.rb:272 (FAILED - 723) + +Trade::PermitMatcher + results + when searching by permit number + when regular query + should include # + when wildcard query + should include # + when malicious query + should be empty + when leading whitespace + should include # + when trailing whitespace + should include # + +Trade::InclusionValidationRule + validation_errors_for_aru + when W source and country of origin blank and exporter doesn't match distribution (E) + example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:74 (FAILED - 724) + when W source and country of origin blank and exporter doesn't match distribution (I) + example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:97 (FAILED - 725) + when W source and country XX + example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:120 (FAILED - 726) + when W source and country doesn't match distribution of higher taxa + example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:143 (FAILED - 727) + when invalid scope specified + example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:160 (FAILED - 728) + +Trade::ReportedTaxonConceptResolver + resolving trade names + should include # "SPECIES", "kingdom_id" => "33512", "kingdom_name" => "Lupus11571", "phylum_id" => "33513", "phylum_name" => "Lupus11570", "class_id" => "33514", "class_name" => "Lupus11569", "order_id" => "33515", "order_name" => "Lupus11568", "family_id" => "33516", "family_name" => "Lupus11567", "subfamily_id" => "33517", "subfamily_name" => "Lupus11566", "genus_id" => "33518", "genus_name" => "Lupus11565", "species_id" => "33519", "species_name" => "Lupus11564"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus11565 lupus11564", name_status: "A", created_at: "2024-01-04 16:53:25", updated_at: "2024-01-04 16:53:25", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4442, created_by_id: 4442, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + resolving synonyms + should include # "SPECIES", "kingdom_id" => "33521", "kingdom_name" => "Lupus11580", "phylum_id" => "33522", "phylum_name" => "Lupus11579", "class_id" => "33523", "class_name" => "Lupus11578", "order_id" => "33524", "order_name" => "Lupus11577", "family_id" => "33525", "family_name" => "Lupus11576", "subfamily_id" => "33526", "subfamily_name" => "Lupus11575", "genus_id" => "33527", "genus_name" => "Lupus11574", "species_id" => "33528", "species_name" => "Lupus11573"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus11574 lupus11573", name_status: "A", created_at: "2024-01-04 16:53:26", updated_at: "2024-01-04 16:53:26", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4443, created_by_id: 4443, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + resolving accepted names + should include # "SPECIES", "kingdom_id" => "33530", "kingdom_name" => "Lupus11589", "phylum_id" => "33531", "phylum_name" => "Lupus11588", "class_id" => "33532", "class_name" => "Lupus11587", "order_id" => "33533", "order_name" => "Lupus11586", "family_id" => "33534", "family_name" => "Lupus11585", "subfamily_id" => "33535", "subfamily_name" => "Lupus11584", "genus_id" => "33536", "genus_name" => "Lupus11583", "species_id" => "33537", "species_name" => "Lupus11582"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus11583 lupus11582", name_status: "A", created_at: "2024-01-04 16:53:26", updated_at: "2024-01-04 16:53:26", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4444, created_by_id: 4444, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> + +Trade::SandboxFilter + results +sh: 1: psql: not found + example at ./spec/models/trade/sandbox_filter_spec.rb:64 (FAILED - 729) +sh: 1: psql: not found + example at ./spec/models/trade/sandbox_filter_spec.rb:65 (FAILED - 730) + +Trade::Sandbox + destroy + example at ./spec/models/trade/sandbox_spec.rb:47 (FAILED - 731) + +Trade::SandboxTemplate + update + example at ./spec/models/trade/sandbox_template_spec.rb:56 (FAILED - 732) + update_batch + example at ./spec/models/trade/sandbox_template_spec.rb:78 (FAILED - 733) + +Trade::InclusionValidationRule + validation_errors + when W source and country of origin matches distribution +Procedure: taxonomy + example at ./spec/models/trade/scoped_inclusion_validation_rule_spec.rb:21 (FAILED - 734) + when W source and country of origin blank + example at ./spec/models/trade/scoped_inclusion_validation_rule_spec.rb:48 (FAILED - 735) + +Trade::Shipment + create + when reporter_type not given + should have 2 error on :reporter_type + when appendix valid + should be valid + when appendix not valid + should have 1 error on :appendix + when permit numbers given + when export permit + should == "A" + when import permit + should == "B" + when origin permit + should == "C" + secondary validations + when species name + appendix + year + invalid +Procedure: taxonomy + example at ./spec/models/trade/shipment_spec.rb:123 (FAILED - 736) + invalid +Procedure: taxonomy + example at ./spec/models/trade/shipment_spec.rb:132 (FAILED - 737) + valid +Procedure: taxonomy + example at ./spec/models/trade/shipment_spec.rb:141 (FAILED - 738) + when species name + appendix N + year + valid +Procedure: taxonomy + example at ./spec/models/trade/shipment_spec.rb:163 (FAILED - 739) + when species name + appendix N + year + not CITES listed and not EU listed +Procedure: taxonomy + example at ./spec/models/trade/shipment_spec.rb:184 (FAILED - 740) + when term + unit + invalid + should not be empty + valid + should be empty + blank unit is valid + should be empty + blank unit is invalid + should not be empty + when term + purpose + invalid + should not be empty + valid + should be empty + when species name + term + invalid + should not be empty + valid + should be empty + when species name + country of origin + invalid + should not be empty + valid + should be empty + blank + should be empty + when species name + exporter + invalid + should not be empty + valid + should be empty + valid with XX + should be empty + when exporter + country of origin + invalid + should not be empty + valid + should be empty + when exporter + importer + invalid + should not be empty + valid + should be empty + when species name + source code + invalid +Procedure: taxonomy + example at ./spec/models/trade/shipment_spec.rb:445 (FAILED - 741) + valid +Procedure: taxonomy + example at ./spec/models/trade/shipment_spec.rb:455 (FAILED - 742) + +Trade::ShipmentsComptabExport + total_cnt + when internal + example at ./spec/models/trade/shipments_comptab_export_spec.rb:12 (FAILED - 743) + when public + example at ./spec/models/trade/shipments_comptab_export_spec.rb:16 (FAILED - 744) + query + when internal + example at ./spec/models/trade/shipments_comptab_export_spec.rb:23 (FAILED - 745) + when public + example at ./spec/models/trade/shipments_comptab_export_spec.rb:27 (FAILED - 746) + +Trade::ShipmentsExport + total_cnt + when internal + should == 4 + when public + should == 4 + query + when internal + example at ./spec/models/trade/shipments_export_spec.rb:23 (FAILED - 747) + when public + example at ./spec/models/trade/shipments_export_spec.rb:27 (FAILED - 748) + +Trade::ShipmentsGrossExportsExport + total_cnt + when internal + example at ./spec/models/trade/shipments_gross_exports_export_spec.rb:12 (FAILED - 749) + when public + example at ./spec/models/trade/shipments_gross_exports_export_spec.rb:16 (FAILED - 750) + query + when internal + example at ./spec/models/trade/shipments_gross_exports_export_spec.rb:23 (FAILED - 751) + when public + example at ./spec/models/trade/shipments_gross_exports_export_spec.rb:27 (FAILED - 752) + when invalid date range + This fails on Travis. It started failing after new version of some packages (like PG) have been installed (PENDING: No reason given) + +Trade::ShipmentsGrossImportsExport + total_cnt + when internal + example at ./spec/models/trade/shipments_gross_imports_export_spec.rb:12 (FAILED - 753) + when public + example at ./spec/models/trade/shipments_gross_imports_export_spec.rb:16 (FAILED - 754) + query + when internal + example at ./spec/models/trade/shipments_gross_imports_export_spec.rb:23 (FAILED - 755) + when public + example at ./spec/models/trade/shipments_gross_imports_export_spec.rb:27 (FAILED - 756) + when invalid date range + This fails on Travis. It started failing after new version of some packages (like PG) have been installed (PENDING: No reason given) + +Trade::ShipmentsNetExportsExport + total_cnt + when internal + example at ./spec/models/trade/shipments_net_exports_export_spec.rb:12 (FAILED - 757) + when public + example at ./spec/models/trade/shipments_net_exports_export_spec.rb:16 (FAILED - 758) + query + when internal + example at ./spec/models/trade/shipments_net_exports_export_spec.rb:23 (FAILED - 759) + when public + example at ./spec/models/trade/shipments_net_exports_export_spec.rb:27 (FAILED - 760) + when invalid date range + This fails on Travis. It started failing after new version of some packages (like PG) have been installed (PENDING: No reason given) + +Trade::ShipmentsNetImportsExport + total_cnt + when internal + example at ./spec/models/trade/shipments_net_imports_export_spec.rb:12 (FAILED - 761) + when public + example at ./spec/models/trade/shipments_net_imports_export_spec.rb:16 (FAILED - 762) + query + when internal + example at ./spec/models/trade/shipments_net_imports_export_spec.rb:23 (FAILED - 763) + when public + example at ./spec/models/trade/shipments_net_imports_export_spec.rb:27 (FAILED - 764) + when invalid date range + This fails on Travis. It started failing after new version of some packages (like PG) have been installed (PENDING: No reason given) + +Trade::TaxonConceptAppendixYearValidationRule + validation_errors_for_aru + when CITES listed + when split listing + example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:77 (FAILED - 765) + when old listing + example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:94 (FAILED - 766) + example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:98 (FAILED - 767) + when appendix N and CITES listed + example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:113 (FAILED - 768) + example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:117 (FAILED - 769) + when reported under a synonym, but otherwise fine + example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:132 (FAILED - 770) + when hybrid + example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:169 (FAILED - 771) + when not CITES listed but EU listed +Procedure: taxonomy + example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:185 (FAILED - 772) + when not CITES listed and not EU listed + example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:200 (FAILED - 773) + +Trade::TaxonConceptSourceValidationRule + validation_errors_for_aru + when species name is from Kingdom Animalia, source_code can't be A + example at ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:42 (FAILED - 774) + example at ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:46 (FAILED - 775) + when species name is from Kingdom Plantae, source_code can't be C or R + example at ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:63 (FAILED - 776) + +Trade::ValidationRule + matching_records_for_aru_and_error + example at ./spec/models/trade/validation_rule_spec.rb:56 (FAILED - 777) + refresh_errors_if_needed + when no updates + example at ./spec/models/trade/validation_rule_spec.rb:94 (FAILED - 778) + when updates and error fixed for all records + error record is destroyed (FAILED - 779) + when updates and error fixed for some records + error record is updated to reflect new error_count (FAILED - 780) + Trade::PresenceValidationRule + validation_errors_for_aru + trading_partner should not be blank + example at ./spec/models/trade/validation_rule_spec.rb:136 (FAILED - 781) + Trade::NumericalityValidationRule + validation_errors_for_aru + quantity should be a number + example at ./spec/models/trade/validation_rule_spec.rb:157 (FAILED - 782) + Trade::FormatValidationRule + validation_errors_for_aru + year should be a 4 digit value + example at ./spec/models/trade/validation_rule_spec.rb:174 (FAILED - 783) + +TradeRestriction + export trade restrictions in csv + filter_is_current + should return @quota1 if filter set to current + should return both @quota1 and @quota2 if filter set to "all" + filter_geo_entities + should get all quotas if geo_entities filter not set + should return quota1 and quota3 if geo_entities filter set to @geo_entity1 + should return quota1, quota3, and quota4 if geo_entities filter set to @geo_entity1 and @geo_entity3 + filter_years + should get all quotas if years filter not set + should return quota1 and quota3 if years filter set to 2012 + should return quota1, quota3, and quota4 if years filter set to 2012 and 2013 + +Unit + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + when quotas + should be falsey + when shipments + should be falsey + +User + create + when organisation not given + should not be valid + destroy + when no dependent objects attached + should be truthy + when dependent objects attached + should be falsey + abilities + when is a Data Manager + should be able to :manage and :all + when is a Data Contributor + should be able to :create and TaxonConcept(id: integer, taxonomy_id: integer, parent_id: integer, rank_id: integer, taxon_name_id: integer, author_year: string, legacy_id: integer, legacy_type: string, data: hstore, listing: hstore, notes: text, taxonomic_position: string, full_name: string, name_status: string, created_at: datetime, updated_at: datetime, touched_at: datetime, legacy_trade_code: string, updated_by_id: integer, created_by_id: integer, dependents_updated_at: datetime, nomenclature_note_en: text, nomenclature_note_es: text, nomenclature_note_fr: text, dependents_updated_by_id: integer, kew_id: integer) + should not be able to :destroy and TaxonConcept(id: integer, taxonomy_id: integer, parent_id: integer, rank_id: integer, taxon_name_id: integer, author_year: string, legacy_id: integer, legacy_type: string, data: hstore, listing: hstore, notes: text, taxonomic_position: string, full_name: string, name_status: string, created_at: datetime, updated_at: datetime, touched_at: datetime, legacy_trade_code: string, updated_by_id: integer, created_by_id: integer, dependents_updated_at: datetime, nomenclature_note_en: text, nomenclature_note_es: text, nomenclature_note_fr: text, dependents_updated_by_id: integer, kew_id: integer) + when is a E-library Viewer + should not be able to :manage and TaxonConcept(id: integer, taxonomy_id: integer, parent_id: integer, rank_id: integer, taxon_name_id: integer, author_year: string, legacy_id: integer, legacy_type: string, data: hstore, listing: hstore, notes: text, taxonomic_position: string, full_name: string, name_status: string, created_at: datetime, updated_at: datetime, touched_at: datetime, legacy_trade_code: string, updated_by_id: integer, created_by_id: integer, dependents_updated_at: datetime, nomenclature_note_en: text, nomenclature_note_es: text, nomenclature_note_fr: text, dependents_updated_by_id: integer, kew_id: integer) + when is an API User + should not be able to :manage and TaxonConcept(id: integer, taxonomy_id: integer, parent_id: integer, rank_id: integer, taxon_name_id: integer, author_year: string, legacy_id: integer, legacy_type: string, data: hstore, listing: hstore, notes: text, taxonomic_position: string, full_name: string, name_status: string, created_at: datetime, updated_at: datetime, touched_at: datetime, legacy_trade_code: string, updated_by_id: integer, created_by_id: integer, dependents_updated_at: datetime, nomenclature_note_en: text, nomenclature_note_es: text, nomenclature_note_fr: text, dependents_updated_by_id: integer, kew_id: integer) + when is a Secretariat + should not be able to :create and :all + should not be able to :update and :all + should not be able to :destroy and :all + when is not active + should not be able to :create and :all + should not be able to :update and :all + should not be able to :destroy and :all + +Species::ShowTaxonConceptSerializer + when species is output of recent nomenclature changes (PENDING: No reason given) + when new species is output of recent nomenclature changes (PENDING: No reason given) + when species is output of old nomenclature changes + should eq false + when species is not output of nomenclature changes + should eq false + when nomenclature changes is not yet submitted + should eq false + +EuRegulationActivationWorker + Set new EU regulation to true + example at ./spec/workers/eu_regulation_activation_worker_spec.rb:32 (FAILED - 784) + example at ./spec/workers/eu_regulation_activation_worker_spec.rb:33 (FAILED - 785) + Set old EU regulation to false + example at ./spec/workers/eu_regulation_activation_worker_spec.rb:40 (FAILED - 786) + example at ./spec/workers/eu_regulation_activation_worker_spec.rb:41 (FAILED - 787) + +EventListingChangesCopyWorker + when copy into non-current regulation + example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:42 (FAILED - 788) + example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:43 (FAILED - 789) + when copy into current regulation + example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:48 (FAILED - 790) + example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:49 (FAILED - 791) + when exclusion + example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:70 (FAILED - 792) + example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:71 (FAILED - 793) + example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:72 (FAILED - 794) + example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:73 (FAILED - 795) + +QuotasCopyWorker + Copy single quota, for a given year + example at ./spec/workers/quotas_copy_worker_spec.rb:47 (FAILED - 796) + example at ./spec/workers/quotas_copy_worker_spec.rb:48 (FAILED - 797) + example at ./spec/workers/quotas_copy_worker_spec.rb:49 (FAILED - 798) + example at ./spec/workers/quotas_copy_worker_spec.rb:50 (FAILED - 799) + Try to copy quota from wrong year + example at ./spec/workers/quotas_copy_worker_spec.rb:59 (FAILED - 800) + example at ./spec/workers/quotas_copy_worker_spec.rb:60 (FAILED - 801) + example at ./spec/workers/quotas_copy_worker_spec.rb:61 (FAILED - 802) + Copy quota when there are no current quotas + example at ./spec/workers/quotas_copy_worker_spec.rb:70 (FAILED - 803) + example at ./spec/workers/quotas_copy_worker_spec.rb:71 (FAILED - 804) + example at ./spec/workers/quotas_copy_worker_spec.rb:72 (FAILED - 805) + When multiple quotas copy quota for given country + example at ./spec/workers/quotas_copy_worker_spec.rb:90 (FAILED - 806) + example at ./spec/workers/quotas_copy_worker_spec.rb:91 (FAILED - 807) + example at ./spec/workers/quotas_copy_worker_spec.rb:92 (FAILED - 808) + example at ./spec/workers/quotas_copy_worker_spec.rb:93 (FAILED - 809) + example at ./spec/workers/quotas_copy_worker_spec.rb:94 (FAILED - 810) + When multiple quotas copy quota for both countries + example at ./spec/workers/quotas_copy_worker_spec.rb:112 (FAILED - 811) + example at ./spec/workers/quotas_copy_worker_spec.rb:113 (FAILED - 812) + example at ./spec/workers/quotas_copy_worker_spec.rb:114 (FAILED - 813) + example at ./spec/workers/quotas_copy_worker_spec.rb:115 (FAILED - 814) + example at ./spec/workers/quotas_copy_worker_spec.rb:116 (FAILED - 815) + When multiple quotas don't copy quota for given country + example at ./spec/workers/quotas_copy_worker_spec.rb:134 (FAILED - 816) + example at ./spec/workers/quotas_copy_worker_spec.rb:135 (FAILED - 817) + example at ./spec/workers/quotas_copy_worker_spec.rb:136 (FAILED - 818) + example at ./spec/workers/quotas_copy_worker_spec.rb:137 (FAILED - 819) + example at ./spec/workers/quotas_copy_worker_spec.rb:138 (FAILED - 820) + When multiple quotas copy quota for given taxon_concept + example at ./spec/workers/quotas_copy_worker_spec.rb:155 (FAILED - 821) + example at ./spec/workers/quotas_copy_worker_spec.rb:156 (FAILED - 822) + example at ./spec/workers/quotas_copy_worker_spec.rb:157 (FAILED - 823) + example at ./spec/workers/quotas_copy_worker_spec.rb:158 (FAILED - 824) + example at ./spec/workers/quotas_copy_worker_spec.rb:159 (FAILED - 825) + When multiple quotas copy quota for both taxon_concepts + example at ./spec/workers/quotas_copy_worker_spec.rb:177 (FAILED - 826) + example at ./spec/workers/quotas_copy_worker_spec.rb:178 (FAILED - 827) + example at ./spec/workers/quotas_copy_worker_spec.rb:179 (FAILED - 828) + example at ./spec/workers/quotas_copy_worker_spec.rb:180 (FAILED - 829) + example at ./spec/workers/quotas_copy_worker_spec.rb:181 (FAILED - 830) + When multiple quotas don't copy quota for given taxon_concept + example at ./spec/workers/quotas_copy_worker_spec.rb:198 (FAILED - 831) + example at ./spec/workers/quotas_copy_worker_spec.rb:199 (FAILED - 832) + example at ./spec/workers/quotas_copy_worker_spec.rb:200 (FAILED - 833) + example at ./spec/workers/quotas_copy_worker_spec.rb:201 (FAILED - 834) + example at ./spec/workers/quotas_copy_worker_spec.rb:202 (FAILED - 835) + When text to replace passed, should be replaced + example at ./spec/workers/quotas_copy_worker_spec.rb:222 (FAILED - 836) + example at ./spec/workers/quotas_copy_worker_spec.rb:223 (FAILED - 837) + example at ./spec/workers/quotas_copy_worker_spec.rb:224 (FAILED - 838) + example at ./spec/workers/quotas_copy_worker_spec.rb:225 (FAILED - 839) + example at ./spec/workers/quotas_copy_worker_spec.rb:226 (FAILED - 840) + example at ./spec/workers/quotas_copy_worker_spec.rb:227 (FAILED - 841) + example at ./spec/workers/quotas_copy_worker_spec.rb:228 (FAILED - 842) + example at ./spec/workers/quotas_copy_worker_spec.rb:229 (FAILED - 843) + When url passed, should be replaced + example at ./spec/workers/quotas_copy_worker_spec.rb:245 (FAILED - 844) + example at ./spec/workers/quotas_copy_worker_spec.rb:246 (FAILED - 845) + example at ./spec/workers/quotas_copy_worker_spec.rb:247 (FAILED - 846) + example at ./spec/workers/quotas_copy_worker_spec.rb:248 (FAILED - 847) + example at ./spec/workers/quotas_copy_worker_spec.rb:249 (FAILED - 848) + example at ./spec/workers/quotas_copy_worker_spec.rb:250 (FAILED - 849) + +SubmissionWorker + when no primary errors (PENDING: No reason given) + when primary errors present (PENDING: No reason given) + when reported under a synonym (PENDING: No reason given) + +Pending: + Admin::NomenclatureChanges::LumpController PUT update when last step when user is manager redirects to nomenclature changes path + # Strange render mismatch after upgrading to Rails 4 + # ./spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb:113 + Admin::NomenclatureChanges::SplitController PUT update when last step when user is manager redirects to nomenclature changes path + # Strange render mismatch after upgrading to Rails 4 + # ./spec/controllers/admin/nomenclature_changes/split_controller_spec.rb:166 + Admin::NomenclatureChanges::StatusSwapController PUT update when last step when user is manager redirects to nomenclature changes path + # Strange render mismatch after upgrading to Rails 4 + # ./spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb:107 + Admin::NomenclatureChanges::StatusToAcceptedController PUT update when last step when user is manager redirects to nomenclature changes path + # Strange render mismatch after upgrading to Rails 4 + # ./spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb:80 + Admin::NomenclatureChanges::StatusToSynonymController PUT update when last step when user is manager redirects to nomenclature changes path + # Strange render mismatch after upgrading to Rails 4 + # ./spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb:85 + CitesCaptivityProcess add some examples to (or delete) /SAPI/spec/models/cites_captivity_process_spec.rb + # Not yet implemented + # ./spec/models/cites_captivity_process_spec.rb:4 + CmsMapping add some examples to (or delete) /SAPI/spec/models/cms_mapping_spec.rb + # Not yet implemented + # ./spec/models/cms_mapping_spec.rb:19 + NomenclatureChange::ReassignmentTransferProcessor run input reassignments when document citations should be empty + # No reason given + # ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:40 + Quota validations create doesn't save a quota without a unit + # No reason given + # ./spec/models/quota_spec.rb:128 + Species::DocumentsExport export when results when file not cached it should be generated + # No reason given + # ./spec/models/species/documents_export_spec.rb:41 + Species::DocumentsExport export when results when file cached it should not be generated + # No reason given + # ./spec/models/species/documents_export_spec.rb:46 + Trade::ShipmentsGrossExportsExport query when invalid date range This fails on Travis. It started failing after new version of some packages (like PG) have been installed + # No reason given + # ./spec/models/trade/shipments_gross_exports_export_spec.rb:34 + Trade::ShipmentsGrossImportsExport query when invalid date range This fails on Travis. It started failing after new version of some packages (like PG) have been installed + # No reason given + # ./spec/models/trade/shipments_gross_imports_export_spec.rb:34 + Trade::ShipmentsNetExportsExport query when invalid date range This fails on Travis. It started failing after new version of some packages (like PG) have been installed + # No reason given + # ./spec/models/trade/shipments_net_exports_export_spec.rb:34 + Trade::ShipmentsNetImportsExport query when invalid date range This fails on Travis. It started failing after new version of some packages (like PG) have been installed + # No reason given + # ./spec/models/trade/shipments_net_imports_export_spec.rb:34 + Species::ShowTaxonConceptSerializer when species is output of recent nomenclature changes + # No reason given + # ./spec/serializers/show_taxon_concept_serializer_spec.rb:5 + Species::ShowTaxonConceptSerializer when new species is output of recent nomenclature changes + # No reason given + # ./spec/serializers/show_taxon_concept_serializer_spec.rb:23 + SubmissionWorker when no primary errors + # No reason given + # ./spec/workers/submission_worker_spec.rb:31 + SubmissionWorker when primary errors present + # No reason given + # ./spec/workers/submission_worker_spec.rb:66 + SubmissionWorker when reported under a synonym + # No reason given + # ./spec/workers/submission_worker_spec.rb:84 + +Failures: + + 1) Admin::DocumentsController index GET index search runs a full text search on title + Failure/Error: get :index, 'title_query' => 'good' + ActiveRecord::StatementInvalid: + PG::SyntaxError: ERROR: syntax error at or near "AS" + LINE 1: ...simple', ''' ' || 'good' || ' ''' || ':*')), 0))) AS pg_sear... + ^ + : SELECT COUNT("documents".*, ((ts_rank((to_tsvector('simple', coalesce("documents"."title"::text, ''))), (to_tsquery('simple', ''' ' || 'good' || ' ''' || ':*')), 0))) AS pg_search_rank) FROM api_documents_mview documents WHERE (((to_tsvector('simple', coalesce("documents"."title"::text, ''))) @@ (to_tsquery('simple', ''' ' || 'good' || ' ''' || ':*')))) + # ./app/models/document_search.rb:23:in `total_cnt' + # ./lib/modules/search_cache.rb:21:in `block in cached_total_cnt' + # ./lib/modules/search_cache.rb:20:in `cached_total_cnt' + # ./app/controllers/admin/documents_controller.rb:94:in `collection' + # ./app/controllers/admin/documents_controller.rb:9:in `index' + # ./spec/controllers/admin/documents_controller_spec.rb:36:in `block (5 levels) in ' + + 2) Admin::EventDocumentsController ordering POST update_order updates sort index for collection of documents + Failure/Error: post :update_order, event_id: event.id, documents: { + ArgumentError: + wrong number of arguments (given 2, expected 1) + # ./app/models/document_collection_order.rb:26:in `block in update' + # ./app/models/document_collection_order.rb:25:in `each' + # ./app/models/document_collection_order.rb:25:in `update' + # ./app/controllers/admin/event_documents_controller.rb:12:in `update_order' + # ./spec/controllers/admin/event_documents_controller_spec.rb:23:in `block (4 levels) in ' + + 3) Admin::ExportsController GET download with data_type=Names all returns taxon concepts names file + Failure/Error: get :download, :data_type => "Names" + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_names/628a53e0384bdafba27f4f32cecf7d3f6be3e602en.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./app/controllers/admin/exports_controller.rb:17:in `download' + # ./spec/controllers/admin/exports_controller_spec.rb:21:in `block (4 levels) in ' + + 4) Admin::ExportsController GET download with data_type=Names CITES_EU returns CITES_EU taxon concepts names file + Failure/Error: get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_names/012908cbadb931457374ec2327abac765060dc37en.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./app/controllers/admin/exports_controller.rb:17:in `download' + # ./spec/controllers/admin/exports_controller_spec.rb:34:in `block (4 levels) in ' + + 5) Admin::ExportsController GET download with data_type=Names CMS returns CMS taxon concepts names file + Failure/Error: get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_names/c5b9b58f693bbe5fb8f2ef0aa5a22805bc53bdc0en.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./app/controllers/admin/exports_controller.rb:17:in `download' + # ./spec/controllers/admin/exports_controller_spec.rb:47:in `block (4 levels) in ' + + 6) Admin::ExportsController GET download with data_type=Distributions all returns taxon concepts distributions file + Failure/Error: get :download, :data_type => "Distributions" + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_distributions/628a53e0384bdafba27f4f32cecf7d3f6be3e602en.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./app/controllers/admin/exports_controller.rb:29:in `download' + # ./spec/controllers/admin/exports_controller_spec.rb:66:in `block (4 levels) in ' + + 7) Admin::ExportsController GET download with data_type=Distributions CITES_EU returns CITES_EU taxon concepts distributions file + Failure/Error: get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_distributions/012908cbadb931457374ec2327abac765060dc37en.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./app/controllers/admin/exports_controller.rb:29:in `download' + # ./spec/controllers/admin/exports_controller_spec.rb:80:in `block (4 levels) in ' + + 8) Admin::ExportsController GET download with data_type=Distributions CMS returns CMS taxon concepts distributions file + Failure/Error: get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_distributions/c5b9b58f693bbe5fb8f2ef0aa5a22805bc53bdc0en.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./app/controllers/admin/exports_controller.rb:29:in `download' + # ./spec/controllers/admin/exports_controller_spec.rb:94:in `block (4 levels) in ' + + 9) Api::V1::AutoCompleteTaxonConceptsController GET index returns 1 result when searching for species name and filtering for rank SPECIES + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 10) Api::V1::AutoCompleteTaxonConceptsController GET index returns 3 results when searching for species name and not filtering by rank + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 11) Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns Poland when searching by wolf + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 12) Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns 0 geo entities when no match for taxon name + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 13) Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns all geo entities when no taxon name given + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 14) Api::V1::EventsController GET index returns only E-library events most recent first + Failure/Error: get :index + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function count(integer, character varying, character varying, timestamp without time zone) does not exist + LINE 1: SELECT COUNT(id, name, type, published_at) FROM "events" WH... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT COUNT(id, name, type, published_at) FROM "events" WHERE "events"."type" IN ('CitesCop', 'CitesAc', 'CitesPc', 'EcSrg', 'CitesTc', 'CitesExtraordinaryMeeting') + # ./app/controllers/api/v1/events_controller.rb:10:in `index' + # ./spec/controllers/api/events_controller_spec.rb:11:in `block (3 levels) in ' + + 15) Api::V1::PurposesController GET index returns purposes + Failure/Error: get :index + ArgumentError: + wrong number of arguments (given 1, expected 0) + # ./app/controllers/api/v1/purposes_controller.rb:6:in `index' + # ./spec/controllers/api/purposes_controller_spec.rb:9:in `block (3 levels) in ' + + 16) Api::V1::SourcesController GET index returns sources + Failure/Error: get :index + ArgumentError: + wrong number of arguments (given 1, expected 0) + # ./app/controllers/api/v1/sources_controller.rb:6:in `index' + # ./spec/controllers/api/sources_controller_spec.rb:9:in `block (3 levels) in ' + + 17) Api::V1::TaxonConceptsController GET index logs with Ahoy with different parameters + Failure/Error: get :index, { + ActiveRecord::StatementInvalid: + PG::UndefinedColumn: ERROR: column taxon_concepts_mview.show_in_species_plus does not exist + LINE 3: ..._concepts_mview"."taxonomy_is_cites_eu" = 't' AND "taxon_con... + ^ + : SELECT taxon_concepts_mview.*, matching_names.matched_names_ary AS synonyms_ary FROM "taxon_concepts_mview" LEFT JOIN ( + SELECT id, ARRAY_AGG_NOTNULL(matched_name) AS matched_names_ary FROM "auto_complete_taxon_concepts_mview" WHERE (name_for_matching LIKE 'STORK%' AND type_of_match IN ('SELF','SYNONYM','COMMON_NAME','SUBSPECIES')) GROUP BY "auto_complete_taxon_concepts_mview"."id" + ) matching_names ON matching_names.id = taxon_concepts_mview.id WHERE "taxon_concepts_mview"."taxonomy_is_cites_eu" = 't' AND "taxon_concepts_mview"."show_in_species_plus" = 't' AND ( EXISTS ( + SELECT * FROM UNNEST(ARRAY[kingdom_name, phylum_name, class_name, order_name, family_name, subfamily_name]) name + WHERE UPPER(name) LIKE 'STORK%' + ) OR matching_names.id IS NOT NULL + ) ORDER BY taxonomic_position LIMIT 25 OFFSET 0 + # ./app/models/species/search.rb:17:in `results' + # ./lib/modules/search_cache.rb:15:in `block in cached_results' + # ./lib/modules/search_cache.rb:14:in `cached_results' + # ./app/controllers/api/v1/taxon_concepts_controller.rb:10:in `index' + # ./spec/controllers/api/taxon_concepts_controller_spec.rb:7:in `block (4 levels) in ' + # ./spec/controllers/api/taxon_concepts_controller_spec.rb:6:in `block (3 levels) in ' + + 18) Api::V1::TermsController GET index returns terms + Failure/Error: get :index + ArgumentError: + wrong number of arguments (given 1, expected 0) + # ./app/controllers/api/v1/terms_controller.rb:6:in `index' + # ./spec/controllers/api/terms_controller_spec.rb:9:in `block (3 levels) in ' + + 19) Api::V1::UnitsController GET index returns units + Failure/Error: get :index + ArgumentError: + wrong number of arguments (given 1, expected 0) + # ./app/controllers/api/v1/units_controller.rb:6:in `index' + # ./spec/controllers/api/units_controller_spec.rb:9:in `block (3 levels) in ' + + 20) Checklist::TaxonConceptsController XHR GET JSON autocomplete when searching by accepted name returns 1 result + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 21) Checklist::TaxonConceptsController XHR GET JSON autocomplete when query blank returns 0 results + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 22) CitesTrade::ExportsController GET download comptab returns comptab shipments file + Failure/Error: response.content_type.should eq("text/csv") + + expected: "text/csv" + got: "text/html" + + (compared using ==) + # ./spec/controllers/cites_trade/exports_controller_spec.rb:20:in `block (4 levels) in ' + + 23) CitesTrade::ExportsController GET download comptab logs download information from public interface to the TradeDataDownload model + Failure/Error: lambda do + expected #count to have changed by 1, but was changed by 0 + # ./spec/controllers/cites_trade/exports_controller_spec.rb:28:in `block (4 levels) in ' + + 24) CitesTrade::ShipmentsController GET index should return all comptab shipments + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' + + 25) CitesTrade::ShipmentsController GET index should return all gross_exports shipments + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' + + 26) CitesTrade::ShipmentsController GET index should return genus & species shipments when searching by genus + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' + + 27) CitesTrade::ShipmentsController GET index should return family, genus & species shipments when searching by family + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' + + 28) CitesTrade::ShipmentsController GET index should return genus shipments when searching by taxon + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' + + 29) CitesTrade::ShipmentsController GET index serializer should return comptab export when report_type invalid + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' + + 30) CitesTrade::ShipmentsController GET index serializer should return comptab export when report_type = comptab + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' + + 31) CitesTrade::ShipmentsController GET index serializer should return gross net export when report_type = gross_exports + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' + + 32) RegistrationsController when signing up should create an account with the role set to api + Failure/Error: post :create, :user => { + ArgumentError: + wrong number of arguments (given 0, expected 1..2) + # ./spec/spec_helper.rb:106:in `sign_up' + # ./spec/controllers/registrations_controller_spec.rb:51:in `block (4 levels) in ' + # ./spec/controllers/registrations_controller_spec.rb:50:in `block (3 levels) in ' + + 33) Trade::AnnualReportUploadsController GET index should return all annual report uploads + Failure/Error: @aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_23', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_23', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:30:in `block (3 levels) in ' + + 34) Trade::AnnualReportUploadsController GET index should return annual report uploads in progress + Failure/Error: @aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_24', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_24', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:30:in `block (3 levels) in ' + + 35) Trade::AnnualReportUploadsController GET show should return success + Failure/Error: create( + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_25', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_25', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:19:in `block (2 levels) in ' + # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:47:in `block (3 levels) in ' + + 36) Trade::AnnualReportUploadsController POST create should return success in jQuery File Upload way + Failure/Error: xhr :post, :create, + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_26', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_26', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./app/controllers/trade/annual_report_uploads_controller.rb:26:in `create' + # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:54:in `block (3 levels) in ' + + 37) Trade::SandboxShipmentsController PUT update should return success when taxon_name not set + Failure/Error: aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_27', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_27', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' + + 38) Trade::SandboxShipmentsController PUT update should return success when taxon_name does not exist + Failure/Error: aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_28', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_28', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' + + 39) Trade::SandboxShipmentsController DELETE destroy should return success + Failure/Error: aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_29', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_29', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' + + 40) Trade::SandboxShipmentsController POST update_batch should return success + Failure/Error: aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_30', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_30', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' + + 41) Trade::SandboxShipmentsController POST destroy_batch should return success + Failure/Error: aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_31', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_31', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' + # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' + + 42) Trade::ShipmentsController GET index should return all shipments + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:9:in `block (3 levels) in ' + + 43) Trade::ShipmentsController GET index should return genus & species shipments when searching by genus + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:9:in `block (3 levels) in ' + + 44) Trade::ShipmentsController GET index should return 1 shipment when searching for reporter_type I + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:9:in `block (3 levels) in ' + + 45) Trade::ShipmentsController PUT update should auto resolve accepted taxon when blank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:27:in `block (3 levels) in ' + + 46) Trade::ShipmentsController PUT update should not auto resolve accepted taxon when given + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:27:in `block (3 levels) in ' + + 47) Trade::ShipmentsController PUT update should delete orphaned permits + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:27:in `block (3 levels) in ' + + 48) Trade::ShipmentsController POST update_batch should change reporter type from I to E + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' + + 49) Trade::ShipmentsController POST update_batch should change reporter type from E to I + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' + + 50) Trade::ShipmentsController POST update_batch should update year + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' + + 51) Trade::ShipmentsController POST update_batch should auto resolve accepted taxon when blank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' + + 52) Trade::ShipmentsController POST update_batch should not auto resolve accepted taxon when given + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' + + 53) Trade::ShipmentsController POST update_batch should set permit number to blank and delete orphaned permits + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' + + 54) Trade::ShipmentsController POST destroy_batch should delete 1 shipment + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 55) Trade::ShipmentsController POST destroy_batch should delete 5 shipment + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 56) Trade::ShipmentsController POST destroy_batch should delete 2 shipments + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 57) Trade::ShipmentsController POST destroy_batch should delete 1 shipments + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 58) Trade::ShipmentsController POST destroy_batch should delete all shipments + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 59) Trade::ShipmentsController POST destroy_batch shouldn't delete any shipments + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 60) Trade::ShipmentsController POST destroy_batch should delete 1 shipment + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 61) Trade::ShipmentsController POST destroy_batch should delete 3 shipment + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 62) Trade::ShipmentsController POST destroy_batch should delete 0 shipments + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 63) Trade::ShipmentsController POST destroy_batch should delete 4 shipments + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 64) Trade::ShipmentsController POST destroy_batch should delete orphaned permits + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' + + 65) Trade::ShipmentsController DELETE destroy should delete 1 shipment + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:240:in `block (3 levels) in ' + + 66) Trade::ShipmentsController DELETE destroy should delete orphaned permits + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/controllers/trade/shipments_controller_spec.rb:240:in `block (3 levels) in ' + + 67) Trade::ValidationErrorsController PUT update should update is_ignored + Failure/Error: aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_32', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_32', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/validation_errors_controller_spec.rb:8:in `block (2 levels) in ' + # ./spec/controllers/trade/validation_errors_controller_spec.rb:12:in `block (2 levels) in ' + # ./spec/controllers/trade/validation_errors_controller_spec.rb:15:in `block (2 levels) in ' + + 68) Trade::ValidationErrorsController GET show should return success + Failure/Error: aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_33', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_33', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/controllers/trade/validation_errors_controller_spec.rb:8:in `block (2 levels) in ' + # ./spec/controllers/trade/validation_errors_controller_spec.rb:12:in `block (2 levels) in ' + # ./spec/controllers/trade/validation_errors_controller_spec.rb:15:in `block (2 levels) in ' + + 69) ApiRequest recent_requests + Failure/Error: ApiRequest.recent_requests + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function count(integer, timestamp without time zone) does not exist + LINE 1: SELECT COUNT(response_status, created_at) AS count_response_... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT COUNT(response_status, created_at) AS count_response_status_created_at, response_status AS response_status, (DATE_TRUNC('day', (created_at::timestamptz - INTERVAL '0 hour') AT TIME ZONE 'Etc/UTC') + INTERVAL '0 hour') AT TIME ZONE 'Etc/UTC' AS day FROM "api_requests" WHERE (created_at > '2023-07-04 16:44:03.572201') AND (created_at IS NOT NULL) GROUP BY "api_requests"."response_status", (DATE_TRUNC('day', (created_at::timestamptz - INTERVAL '0 hour') AT TIME ZONE 'Etc/UTC') + INTERVAL '0 hour') AT TIME ZONE 'Etc/UTC' ORDER BY "api_requests"."response_status" ASC + # ./app/models/api_request.rb:50:in `recent_requests' + # ./spec/models/api_request_spec.rb:61:in `block (3 levels) in ' + # ./spec/models/api_request_spec.rb:64:in `block (3 levels) in ' + + 70) Checklist ann_symbol for species Caiman latirostris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 71) Checklist ann_symbol for species Panax ginseng + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 72) Checklist search by cites populations when America + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' + + 73) Checklist search by cites populations when Mexico + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' + + 74) Checklist search by cites populations when Canada + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' + + 75) Checklist search by cites populations when Argentina + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' + + 76) Checklist search by cites populations when South America + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' + + 77) Checklist search by cites populations when North America + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' + + 78) Checklist search by cites populations when North America and Argentina + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' + + 79) Checklist search by cites populations when Nepal + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 80) Checklist search by cites populations when Poland + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 81) Checklist search by cites appendices when App I + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 82) Checklist search by cites appendices when App II + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 83) Checklist search by cites appendices when App III + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 84) Checklist search by cites populations and appendices when Nepal when App I + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 85) Checklist search by cites populations and appendices when Nepal when App II + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 86) Checklist search by cites populations and appendices when Poland when App I + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 87) Checklist search by cites populations and appendices when Poland when App II + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 88) Checklist search by cites populations and appendices when Poland or Nepal when App I + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 89) Checklist search by cites populations and appendices when Poland or Nepal when App II + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 90) Checklist search by cites populations and appendices when App I or II when Poland + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 91) Checklist search by cites populations and appendices when App I or II when Nepal + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 92) Checklist when filtering by appendix I should return Cacatua goffiniana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 93) Checklist when filtering by appendix I should not return Agapornis roseicollis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 94) Checklist when common names displayed should return all English names for Arctocephalus australis: 'South American Fur Seal, Southern Fur Seal' + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 95) Checklist when common names displayed should return all Spanish names for Arctocephalus australis: 'Lobo fino sudamericano, Oso marino austral' + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 96) Checklist when common names displayed should return all French names for Arctocephalus australis: 'Otarie à fourrure australe' + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 97) Checklist when common names displayed should return all English names for Arctocephalus spp.: 'Fur seals, Southern fur seals' + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 98) Checklist when common names displayed should return all Spanish names for Arctocephalus spp.: 'Osos marinos' + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 99) Checklist when common names displayed should return all French names for Arctocephalus spp.: 'Arctocéphales du sud, Otaries à fourrure, Otaries à fourrure du sud' + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 100) Checklist when common names displayed should include a species without any common names defined + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 101) Checklist::HigherTaxaInjector run when same phylum when two species from different classes + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 102) Checklist::HigherTaxaInjector run when same phylum when two species from different classes and expand_headers set + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 103) Checklist::HigherTaxaInjector run when same order when two species from different families + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 104) Checklist::HigherTaxaInjector run when same order when two species from different families and skip family set + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 105) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 106) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species and skip family set + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 107) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species and expand headers set + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 108) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when two species + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 109) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when species and subspecies + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 110) Checklist::HigherTaxaInjector higher_taxa_headers when same family when two species from different genera + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 111) Checklist::HigherTaxaInjector higher_taxa_headers when same order when two species from different families + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 112) Checklist::HigherTaxaInjector higher_taxa_headers when same order when two species from different families and expand headers set + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 113) Checklist::HigherTaxaInjector higher_taxa_headers when same order when genus and different family + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 114) Checklist::HigherTaxaInjector higher_taxa_headers when same order when family and genus in different family + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 115) Checklist::HigherTaxaInjector higher_taxa_headers when same class when order and genus from different order + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 116) Checklist::HigherTaxaInjector higher_taxa_headers when same class when order and genus from different order and expand headers set + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' + + 117) Checklist when taxonomic order Plantae should include Agave (Agavaceae) before Panax (Araliaceae) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 118) Checklist when taxonomic order Animalia should include birds after last mammal + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 119) Checklist when taxonomic order Animalia should include Falconiformes (Aves) before Psittaciformes (Aves) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 120) Checklist when taxonomic order Animalia should include Cathartidae within Falconiformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 121) Checklist when taxonomic order Animalia should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 122) Checklist when taxonomic order Animalia should include Cathartidae (Falconiformes) before Cacatuidae (Psittaciformes) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 123) Checklist when taxonomic order Animalia should include Hirudo medicinalis at the very end (after all Chordata) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 124) Checklist when alphabetical order should include Falconiformes (Aves) before Psittaciformes (Aves) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 125) Checklist when alphabetical order should include Cathartidae before Falconiformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 126) Checklist when alphabetical order should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 127) Checklist when alphabetical order should include Cathartidae (Falconiformes) after Cacatuidae (Psittaciformes) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 128) Checklist::Pdf::HistoryAnnotationsKey hash_annotations_key + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/pdf/history_annotations_key_spec.rb:56:in `block (3 levels) in ' + + 129) Checklist::Pdf::History higher_taxon_name when family + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/pdf/history_spec.rb:11:in `block (2 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:24:in `block (4 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:28:in `block (4 levels) in ' + + 130) Checklist::Pdf::History listed_taxon_name when family + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/pdf/history_spec.rb:11:in `block (2 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:46:in `block (4 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:49:in `block (4 levels) in ' + + 131) Checklist::Pdf::History listed_taxon_name when genus + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/pdf/history_spec.rb:11:in `block (2 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:16:in `block (2 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:61:in `block (4 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:64:in `block (4 levels) in ' + + 132) Checklist::Pdf::History annotation_for_language annotation with footnote + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/pdf/history_spec.rb:11:in `block (2 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:16:in `block (2 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:87:in `block (4 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:90:in `block (4 levels) in ' + # ./spec/models/checklist/pdf/history_spec.rb:100:in `block (4 levels) in ' + + 133) Checklist::Pdf::IndexAnnotationsKey hash_annotations_key + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/pdf/index_annotations_key_spec.rb:43:in `block (3 levels) in ' + + 134) Checklist::Pdf::IndexAnnotationsKey non_hash_annotations_key + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/pdf/index_annotations_key_spec.rb:99:in `block (3 levels) in ' + + 135) Checklist::Pdf::IndexFetcher with common names + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/pdf/index_fetcher_spec.rb:34:in `block (2 levels) in ' + + 136) Checklist::Pdf::IndexFetcher with synonyms and authors + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/pdf/index_fetcher_spec.rb:34:in `block (2 levels) in ' + + 137) Checklist when filtering by name by scientific name + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 138) Checklist when filtering by name by common name + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 139) Checklist when synonyms displayed should return Alligator cynocephalus as synonym for Caiman latirostris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 140) Species::TaxonConceptPrefixMatcher results when query in capital letters + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 141) Species::TaxonConceptPrefixMatcher results when match on accepted name + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 142) Species::TaxonConceptPrefixMatcher results when match on synonym + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 143) Species::TaxonConceptPrefixMatcher results when match on common name + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 144) Checklist::Timeline when deleted + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:17:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:20:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:21:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:23:in `block (3 levels) in ' + + 145) Checklist::Timeline when deleted + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:17:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:20:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:21:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:24:in `block (3 levels) in ' + + 146) Checklist::Timeline when deleted + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:17:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:20:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:21:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:25:in `block (3 levels) in ' + + 147) Checklist::Timeline when deleted from III multiple times + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:77:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:80:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:81:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:83:in `block (3 levels) in ' + + 148) Checklist::Timeline when deleted from III multiple times + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:77:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:80:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:81:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:84:in `block (3 levels) in ' + + 149) Checklist::Timeline when deleted from III multiple times + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:77:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:80:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:81:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:85:in `block (3 levels) in ' + + 150) Checklist::Timeline when deleted and then readded + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:106:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:109:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:110:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:112:in `block (3 levels) in ' + + 151) Checklist::Timeline when deleted and then readded + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:106:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:109:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:110:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:113:in `block (3 levels) in ' + + 152) Checklist::Timeline when deleted and then readded + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:106:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:109:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:110:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:114:in `block (3 levels) in ' + + 153) Checklist::Timeline when reservation withdrawn + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:148:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:151:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:152:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:154:in `block (3 levels) in ' + + 154) Checklist::Timeline when reservation withdrawn + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:148:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:151:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:152:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:155:in `block (3 levels) in ' + + 155) Checklist::Timeline when reservation withdrawn + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:148:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:151:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:152:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:156:in `block (3 levels) in ' + + 156) Checklist::Timeline when reservation withdrawn and then readded + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:196:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:199:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:200:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:202:in `block (3 levels) in ' + + 157) Checklist::Timeline when reservation withdrawn and then readded + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:196:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:199:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:200:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:203:in `block (3 levels) in ' + + 158) Checklist::Timeline when reservation withdrawn and then readded + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:196:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:199:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:200:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:204:in `block (3 levels) in ' + + 159) Checklist::Timeline when reservation withdrawn and then readded + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:196:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:199:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:200:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:205:in `block (3 levels) in ' + + 160) Checklist::Timeline when added multiple times + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:221:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:224:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:225:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:228:in `block (3 levels) in ' + + 161) Checklist::Timeline when added multiple times + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:221:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:224:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:225:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:231:in `block (3 levels) in ' + + 162) Checklist::Timeline when added multiple times + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:221:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:224:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:225:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:232:in `block (3 levels) in ' + + 163) Checklist::Timeline when automatic deletion from ancestor listing + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:250:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:253:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:254:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:257:in `block (3 levels) in ' + + 164) Checklist::Timeline when automatic deletion from ancestor listing + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:250:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:253:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:254:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:260:in `block (3 levels) in ' + + 165) Checklist::Timeline when automatic deletion from ancestor listing + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timeline_spec.rb:250:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:253:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:254:in `block (3 levels) in ' + # ./spec/models/checklist/timeline_spec.rb:261:in `block (3 levels) in ' + + 166) Checklist::TimelinesForTaxonConcept timelines when Appendix I + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:21:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:24:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:25:in `block (4 levels) in ' + + 167) Checklist::TimelinesForTaxonConcept timelines when Appendix I + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:21:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:24:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:26:in `block (4 levels) in ' + + 168) Checklist::TimelinesForTaxonConcept timelines when Appendix III + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:42:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:45:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:46:in `block (4 levels) in ' + + 169) Checklist::TimelinesForTaxonConcept timelines when Appendix III + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:42:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:45:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:47:in `block (4 levels) in ' + + 170) Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:63:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:66:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:67:in `block (4 levels) in ' + + 171) Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:63:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:66:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:68:in `block (4 levels) in ' + + 172) Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:63:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:66:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:69:in `block (4 levels) in ' + + 173) Checklist::TimelinesForTaxonConcept timeline_years when in 1990 + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:77:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:80:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:81:in `block (4 levels) in ' + + 174) Checklist::TimelinesForTaxonConcept timeline_years when in 1990 + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:77:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:80:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:82:in `block (4 levels) in ' + + 175) Checklist::TimelinesForTaxonConcept timeline_years when in 1990 + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:77:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:80:in `block (4 levels) in ' + # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:83:in `block (4 levels) in ' + + 176) CitesSuspensionNotification destroy when dependent objects attached when confirmation notification, make sure it gets destroyed + Failure/Error: create( + ActiveRecord::StatementInvalid: + PG::NotNullViolation: ERROR: null value in column "cites_suspension_id" violates not-null constraint + DETAIL: Failing row contains (2, null, 1739, 2024-01-04 16:44:41.516933, 2024-01-04 16:44:41.516933). + : INSERT INTO "cites_suspension_confirmations" ("cites_suspension_notification_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" + # ./spec/models/cites_suspension_notification_spec.rb:78:in `block (5 levels) in ' + + 177) DashboardStats#species has one results for argentina + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 178) DashboardStats#species has no results for ghana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 179) DashboardStats#trade when no time range specified argentina should have 40 exported animals and no imports + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/dashboard_stats_trade_spec.rb:7:in `block (3 levels) in ' + + 180) DashboardStats#trade when time range specified argentina should have no exports in 2012-2012 + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/dashboard_stats_trade_spec.rb:7:in `block (3 levels) in ' + + 181) EuDecision create downloads cache should be populated + Failure/Error: Species::EuDecisionsExport.new(set: 'current', decision_types: {}).export + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - public/downloads/eu_decisions/e05a5d836ef2cebd490f1835302bc80c28434a26en.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./spec/models/eu_decision_spec.rb:65:in `block (4 levels) in ' + + 182) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26385 AND "listing_changes"."species_listing_id" = 2847 AND "listing_changes"."change_type_id" = 4481 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2500 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 183) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26395 AND "listing_changes"."species_listing_id" = 2850 AND "listing_changes"."change_type_id" = 4486 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2502 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 184) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26405 AND "listing_changes"."species_listing_id" = 2853 AND "listing_changes"."change_type_id" = 4491 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2504 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 185) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26415 AND "listing_changes"."species_listing_id" = 2856 AND "listing_changes"."change_type_id" = 4496 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2506 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 186) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26425 AND "listing_changes"."species_listing_id" = 2859 AND "listing_changes"."change_type_id" = 4501 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2508 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 187) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26435 AND "listing_changes"."species_listing_id" = 2862 AND "listing_changes"."change_type_id" = 4506 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2510 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 188) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26445 AND "listing_changes"."species_listing_id" = 2865 AND "listing_changes"."change_type_id" = 4511 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2512 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 189) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26455 AND "listing_changes"."species_listing_id" = 2868 AND "listing_changes"."change_type_id" = 4516 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2514 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 190) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26465 AND "listing_changes"."species_listing_id" = 2871 AND "listing_changes"."change_type_id" = 4521 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2516 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 191) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26475 AND "listing_changes"."species_listing_id" = 2874 AND "listing_changes"."change_type_id" = 4526 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2518 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 192) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26485 AND "listing_changes"."species_listing_id" = 2877 AND "listing_changes"."change_type_id" = 4531 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2520 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 193) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26495 AND "listing_changes"."species_listing_id" = 2880 AND "listing_changes"."change_type_id" = 4536 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2522 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 194) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26505 AND "listing_changes"."species_listing_id" = 2883 AND "listing_changes"."change_type_id" = 4541 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2524 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 195) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26515 AND "listing_changes"."species_listing_id" = 2886 AND "listing_changes"."change_type_id" = 4546 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2526 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 196) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26525 AND "listing_changes"."species_listing_id" = 2889 AND "listing_changes"."change_type_id" = 4551 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2528 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 197) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26535 AND "listing_changes"."species_listing_id" = 2892 AND "listing_changes"."change_type_id" = 4556 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2530 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 198) NomenclatureChange::ReassignmentCopyProcessor run when legislation + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26545 AND "listing_changes"."species_listing_id" = 2895 AND "listing_changes"."change_type_id" = 4561 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2532 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' + # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 199) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26897 AND "listing_changes"."species_listing_id" = 2898 AND "listing_changes"."change_type_id" = 4566 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2573 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 200) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26915 AND "listing_changes"."species_listing_id" = 2901 AND "listing_changes"."change_type_id" = 4571 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2575 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 201) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26933 AND "listing_changes"."species_listing_id" = 2904 AND "listing_changes"."change_type_id" = 4576 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2577 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 202) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26951 AND "listing_changes"."species_listing_id" = 2907 AND "listing_changes"."change_type_id" = 4581 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2579 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 203) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26969 AND "listing_changes"."species_listing_id" = 2910 AND "listing_changes"."change_type_id" = 4586 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2581 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 204) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26987 AND "listing_changes"."species_listing_id" = 2913 AND "listing_changes"."change_type_id" = 4591 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2583 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 205) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27005 AND "listing_changes"."species_listing_id" = 2916 AND "listing_changes"."change_type_id" = 4596 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2585 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 206) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27023 AND "listing_changes"."species_listing_id" = 2919 AND "listing_changes"."change_type_id" = 4601 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2587 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 207) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27041 AND "listing_changes"."species_listing_id" = 2922 AND "listing_changes"."change_type_id" = 4606 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2589 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 208) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27059 AND "listing_changes"."species_listing_id" = 2925 AND "listing_changes"."change_type_id" = 4611 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2591 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 209) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27077 AND "listing_changes"."species_listing_id" = 2928 AND "listing_changes"."change_type_id" = 4616 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2593 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 210) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27095 AND "listing_changes"."species_listing_id" = 2931 AND "listing_changes"."change_type_id" = 4621 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2595 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 211) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27113 AND "listing_changes"."species_listing_id" = 2934 AND "listing_changes"."change_type_id" = 4626 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2597 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 212) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27131 AND "listing_changes"."species_listing_id" = 2937 AND "listing_changes"."change_type_id" = 4631 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2599 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 213) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27149 AND "listing_changes"."species_listing_id" = 2940 AND "listing_changes"."change_type_id" = 4636 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2601 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 214) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27167 AND "listing_changes"."species_listing_id" = 2943 AND "listing_changes"."change_type_id" = 4641 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2603 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 215) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27185 AND "listing_changes"."species_listing_id" = 2946 AND "listing_changes"."change_type_id" = 4646 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2605 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' + + 216) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27502 AND "listing_changes"."species_listing_id" = 2949 AND "listing_changes"."change_type_id" = 4651 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2628 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 217) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27521 AND "listing_changes"."species_listing_id" = 2952 AND "listing_changes"."change_type_id" = 4656 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2630 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 218) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27540 AND "listing_changes"."species_listing_id" = 2955 AND "listing_changes"."change_type_id" = 4661 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2632 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 219) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27559 AND "listing_changes"."species_listing_id" = 2958 AND "listing_changes"."change_type_id" = 4666 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2634 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 220) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27578 AND "listing_changes"."species_listing_id" = 2961 AND "listing_changes"."change_type_id" = 4671 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2636 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 221) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27597 AND "listing_changes"."species_listing_id" = 2964 AND "listing_changes"."change_type_id" = 4676 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2638 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 222) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27616 AND "listing_changes"."species_listing_id" = 2967 AND "listing_changes"."change_type_id" = 4681 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2640 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 223) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27635 AND "listing_changes"."species_listing_id" = 2970 AND "listing_changes"."change_type_id" = 4686 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2642 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 224) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27654 AND "listing_changes"."species_listing_id" = 2973 AND "listing_changes"."change_type_id" = 4691 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2644 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 225) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27673 AND "listing_changes"."species_listing_id" = 2976 AND "listing_changes"."change_type_id" = 4696 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2646 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 226) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27692 AND "listing_changes"."species_listing_id" = 2979 AND "listing_changes"."change_type_id" = 4701 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2648 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 227) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27711 AND "listing_changes"."species_listing_id" = 2982 AND "listing_changes"."change_type_id" = 4706 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2650 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 228) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27730 AND "listing_changes"."species_listing_id" = 2985 AND "listing_changes"."change_type_id" = 4711 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2652 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 229) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27749 AND "listing_changes"."species_listing_id" = 2988 AND "listing_changes"."change_type_id" = 4716 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2654 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 230) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27768 AND "listing_changes"."species_listing_id" = 2991 AND "listing_changes"."change_type_id" = 4721 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2656 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 231) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation + Failure/Error: processor.run + ActiveRecord::StatementInvalid: + PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" + LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... + ^ + : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27787 AND "listing_changes"."species_listing_id" = 2994 AND "listing_changes"."change_type_id" = 4726 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2658 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' + # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' + # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' + # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' + # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' + # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' + + 232) Species::CommonNamesExport export when results when file not cached + Failure/Error: subject.export + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - spec/public/downloads/common_names/97d170e1550eee4afc0af065b78cda302a97674cen.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./spec/models/species/common_names_export_spec.rb:33:in `block (5 levels) in ' + + 233) Species::TaxonConceptPrefixMatcher results when searching for hybrid when trade visibility + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 234) Species::TaxonConceptPrefixMatcher results when searching for hybrid when trade internal visibility + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 235) Species::TaxonConceptPrefixMatcher results when searching for hybrid when speciesplus visibility + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 236) Species::Search results when searching by scientific name when subspecies never listed + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 237) Species::Search results when searching by scientific name when subspecies never listed + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 238) Species::ListingsExport path + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 239) Species::ListingsExport export when no results + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 240) Species::ListingsExport export when results when file not cached + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 241) Species::ListingsExport export when results when file cached + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 242) Species::ListingsExport query when CITES when Appendix I + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 243) Species::ListingsExport query when CITES when Appendix I when Poland + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 244) Species::ListingsExport query when CITES when Appendix I when Nepal + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 245) Species::ListingsExport query when CITES when higher taxon ids + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 246) Species::ListingsExport query when CITES when implicitly listed subspecies present + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 247) Species::ListingsExport query when EU when Annex A + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 248) Species::ListingsExport query when EU when Annex A when Spain + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 249) Species::ListingsExport query when EU when Annex A when Nepal + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 250) Species::ListingsExport query when EU when higher taxon ids + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 251) Species::OrphanedTaxonConceptsExport export when results when file not cached + Failure/Error: subject.export + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - spec/public/downloads/orphaned_taxon_concepts/97d170e1550eee4afc0af065b78cda302a97674cen.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./spec/models/species/orphaned_taxon_concepts_export_spec.rb:34:in `block (5 levels) in ' + + 252) Species::Search results when searching by scientific name when regular query + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 253) Species::Search results when searching by scientific name when malicious query + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 254) Species::Search results when searching by scientific name when leading whitespace + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 255) Species::Search results when searching by scientific name when trailing whitespace + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 256) Species::SpeciesReferenceOutputExport export when results when file not cached + Failure/Error: subject.export + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - spec/public/downloads/species_reference_output/97d170e1550eee4afc0af065b78cda302a97674cen.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./spec/models/species/species_reference_output_spec.rb:33:in `block (5 levels) in ' + + 257) Species::StandardReferenceOutputExport export when results when file not cached + Failure/Error: subject.export + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - spec/public/downloads/standard_reference_output/97d170e1550eee4afc0af065b78cda302a97674cen.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./spec/models/species/standard_reference_output_spec.rb:33:in `block (5 levels) in ' + + 258) Species::SynonymsAndTradeNamesExport export when results when file not cached + Failure/Error: subject.export + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - spec/public/downloads/synonyms_and_trade_names/97d170e1550eee4afc0af065b78cda302a97674cen.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./spec/models/species/synonyms_and_trade_names_export_spec.rb:39:in `block (5 levels) in ' + + 259) Species::TaxonConceptPrefixMatcher results when searching by common name when searching by hyphenated common name + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 260) Species::TaxonConceptPrefixMatcher results when searching by common name when searching by hyphenated common name without hyphens + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 261) Species::TaxonConceptPrefixMatcher results when searching by common name when searching by part of hyphenated common name + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 262) Species::TaxonConceptPrefixMatcher results when searching by scientific name when regular query + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 263) Species::TaxonConceptPrefixMatcher results when searching by scientific name when malicious query + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 264) Species::TaxonConceptPrefixMatcher results when searching by scientific name when leading whitespace + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 265) Species::TaxonConceptPrefixMatcher results when searching by scientific name when trailing whitespace + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 266) Species::TaxonConceptPrefixMatcher results when searching by scientific name when implicitly listed subspecies + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 267) Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed subspecies + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 268) Species::TaxonConceptPrefixMatcher results when searching by scientific name when implicitly listed higher taxon (without an explicitly listed ancestor) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 269) Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 270) Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon but ranks expected FAMILY + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 271) Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon but ranks expected SPECIES + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 272) Species::TaxonConceptPrefixMatcher results when searching by scientific name when searching for name that matches Species and Subspecies but ranks expected SUBSPECIES + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 273) Species::TaxonConceptsNamesExport export when results when file not cached + Failure/Error: subject.export + Errno::ENOENT: + No such file or directory @ rb_file_s_ctime - spec/public/downloads/taxon_concepts_names/97d170e1550eee4afc0af065b78cda302a97674cen.csv + # ./app/models/species/csv_copy_export.rb:22:in `ctime' + # ./app/models/species/csv_copy_export.rb:22:in `export' + # ./spec/models/species/taxon_concepts_export_spec.rb:33:in `block (5 levels) in ' + + 274) Species::TaxonConceptPrefixMatcher results when searching for status N species when trade visibility + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' + + 275) Species::TaxonConceptPrefixMatcher results when searching for status N species when trade internal visibility + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' + + 276) Species::TaxonConceptPrefixMatcher results when searching for status N species when speciesplus visibility + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' + + 277) Species::TaxonConceptPrefixMatcher results when searching for trade name when trade visibility + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' + + 278) Species::TaxonConceptPrefixMatcher results when searching for trade name when trade visibility + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' + + 279) Species::TaxonConceptPrefixMatcher results when searching for trade name when trade internal visibility + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' + + 280) Species::TaxonConceptPrefixMatcher results when searching for trade name when trade internal visibility + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' + + 281) Species::TaxonConceptPrefixMatcher results when searching for trade name when speciesplus visibility + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' + + 282) Species::TaxonConceptPrefixMatcher results when searching for trade name when speciesplus visibility + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' + + 283) Species::Search results when searching by scientific name when subspecies previously listed + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 284) TaxonConcept Agalychnis REFERENCES cites_accepted for class Amphibia + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 285) TaxonConcept Agalychnis REFERENCES cites_accepted for family Hylidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 286) TaxonConcept Agalychnis REFERENCES cites_accepted for genus Agalychnis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 287) TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for class Amphibia + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 288) TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for family Hylidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 289) TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for genus Agalychnis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 290) TaxonConcept Agalychnis LISTING cites_listing for genus Agalychnis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 291) TaxonConcept Agalychnis LISTING eu_listing for genus Agalychnis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 292) TaxonConcept Agalychnis LISTING cites_listed for family Hylidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 293) TaxonConcept Agalychnis LISTING cites_listed for genus Agalychnis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 294) TaxonConcept Agalychnis LISTING eu_listed for family Hylidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 295) TaxonConcept Agalychnis LISTING eu_listed for genus Agalychnis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' + + 296) TaxonConcept Agave LISTING cites_listing for species Agave parviflora + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 297) TaxonConcept Agave LISTING cites_listing for species Agave arizonica + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 298) TaxonConcept Agave LISTING cites_listed for species Agave parviflora + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 299) TaxonConcept Agave LISTING cites_listed for species Agave arizonica + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 300) TaxonConcept Agave LISTING cites_show for species Agave parviflora + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 301) TaxonConcept Agave LISTING cites_show for species Agave arizonica + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 302) TaxonConcept Agave LISTING eu_listing for species Agave parviflora + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 303) TaxonConcept Agave LISTING eu_listing for species Agave arizonica + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 304) TaxonConcept Agave LISTING eu_listed for species Agave parviflora + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 305) TaxonConcept Agave LISTING eu_listed for species Agave arizonica + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 306) TaxonConcept Agave LISTING eu_show for species Agave parviflora + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 307) TaxonConcept Agave LISTING eu_show for species Agave arizonica + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/agave.rb:75:in `block (2 levels) in ' + + 308) TaxonConcept Ailuropoda LISTING cites_listing for species Ailuropoda melanoleuca + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' + + 309) TaxonConcept Ailuropoda LISTING cites_listing for genus level Ailuropoda + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' + + 310) TaxonConcept Ailuropoda LISTING eu_listing for species Ailuropoda melanoleuca + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' + + 311) TaxonConcept Ailuropoda LISTING eu_listing for genus level Ailuropoda + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' + + 312) TaxonConcept Ailuropoda LISTING cites_listed for genus Ailuropoda + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' + + 313) TaxonConcept Ailuropoda LISTING cites_listed for species Ailuropoda melanoleuca + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' + + 314) TaxonConcept Ailuropoda LISTING eu_listed for genus Ailuropoda + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' + + 315) TaxonConcept Ailuropoda LISTING eu_listed for species Ailuropoda melanoleuca + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' + + 316) TaxonConcept Arctocephalus LISTING cites_listing should be II at species level Arctocephalus australis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 317) TaxonConcept Arctocephalus LISTING cites_listing should be I at species level Arctocephalus townsendi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 318) TaxonConcept Arctocephalus LISTING cites_listing should be I/II at genus level Arctocephalus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 319) TaxonConcept Arctocephalus LISTING cites_listed should be true for genus Arctocephalus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 320) TaxonConcept Arctocephalus LISTING cites_listed should be true for species Arctocephalus townsendi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 321) TaxonConcept Arctocephalus LISTING cites_listed should be false for species Arctocephalus australis (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 322) TaxonConcept Arctocephalus LISTING eu_listed should be true for genus Arctocephalus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 323) TaxonConcept Arctocephalus LISTING eu_listed should be true for species Arctocephalus townsendi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 324) TaxonConcept Arctocephalus LISTING eu_listed should be false for species Arctocephalus australis (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' + + 325) TaxonConcept Boa constrictor TAXONOMY full_name for subspecies Boa constrictor occidentalis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 326) TaxonConcept Boa constrictor TAXONOMY full_name for species Boa constrictor + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 327) TaxonConcept Boa constrictor TAXONOMY full_name for genus Boa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 328) TaxonConcept Boa constrictor TAXONOMY ancestors family + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 329) TaxonConcept Boa constrictor TAXONOMY ancestors order + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 330) TaxonConcept Boa constrictor TAXONOMY ancestors class + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 331) TaxonConcept Boa constrictor LISTING cites_listing for subspecies Boa constrictor occidentalis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 332) TaxonConcept Boa constrictor LISTING cites_listing for subspecies Boa constrictor constrictor + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 333) TaxonConcept Boa constrictor LISTING cites_listing for species Boa constrictor + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 334) TaxonConcept Boa constrictor LISTING eu_listing for subspecies Boa constrictor occidentalis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 335) TaxonConcept Boa constrictor LISTING eu_listing for subspecies Boa constrictor constrictor + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 336) TaxonConcept Boa constrictor LISTING eu_listing for species Boa constrictor + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 337) TaxonConcept Boa constrictor LISTING cites_listed for family Boidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 338) TaxonConcept Boa constrictor LISTING cites_listed for genus Boa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 339) TaxonConcept Boa constrictor LISTING cites_listed for species Boa constrictor (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 340) TaxonConcept Boa constrictor LISTING cites_listed for subspecies Boa constrictor occidentalis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 341) TaxonConcept Boa constrictor LISTING cites_listed for subspecies Boa constrictor constrictor + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 342) TaxonConcept Boa constrictor LISTING cites_show for family Boidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 343) TaxonConcept Boa constrictor LISTING cites_show for genus Boa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 344) TaxonConcept Boa constrictor LISTING cites_show for species Boa constrictor (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 345) TaxonConcept Boa constrictor LISTING cites_show for subspecies Boa constrictor occidentalis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 346) TaxonConcept Boa constrictor LISTING cites_show for subspecies Boa constrictor constrictor + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 347) TaxonConcept Boa constrictor LISTING cites_listed_descendants for family Boidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 348) TaxonConcept Boa constrictor LISTING cites_listed_descendants for genus Boa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 349) TaxonConcept Boa constrictor LISTING cites_listed_descendants for species Boa constrictor (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 350) TaxonConcept Boa constrictor LISTING cites_listed_descendants for subspecies Boa constrictor occidentalis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 351) TaxonConcept Boa constrictor LISTING eu_listed for family Boidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 352) TaxonConcept Boa constrictor LISTING eu_listed for genus Boa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 353) TaxonConcept Boa constrictor LISTING eu_listed for species Boa constrictor (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 354) TaxonConcept Boa constrictor LISTING eu_listed for subspecies Boa constrictor occidentalis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 355) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for family Boidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 356) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for genus Boa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 357) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for species Boa constrictor (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 358) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for subspecies Boa constrictor occidentalis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 359) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for subspecies Boa constrictor constrictor + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 360) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for family Boidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 361) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for genus Boa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 362) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for species Boa constrictor (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 363) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for subspecies Boa constrictor occidentalis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 364) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for subspecies Boa constrictor constrictor + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' + + 365) TaxonConcept Caiman latirostris TAXONOMY full_name for species synonym Alligator cynocephalus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 366) TaxonConcept Caiman latirostris TAXONOMY rank_name for species synonym Alligator cynocephalus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 367) TaxonConcept Caiman latirostris REFERENCES cites_accepted for species Caiman latirostris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 368) TaxonConcept Caiman latirostris REFERENCES cites_accepted for synonym species Alligator cynocephalus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 369) TaxonConcept Caiman latirostris REFERENCES standard_taxon_concept_references for species Caiman latirostris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 370) TaxonConcept Caiman latirostris LISTING cites_listing for species Caiman latirostris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 371) TaxonConcept Caiman latirostris LISTING eu_listing for species Caiman latirostris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 372) TaxonConcept Caiman latirostris LISTING cites_listed for order Crocodylia + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 373) TaxonConcept Caiman latirostris LISTING cites_listed for family Alligatoridae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 374) TaxonConcept Caiman latirostris LISTING cites_listed for genus Caiman + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 375) TaxonConcept Caiman latirostris LISTING cites_listed for species Caiman latoristris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 376) TaxonConcept Caiman latirostris LISTING eu_listed for order Crocodylia + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 377) TaxonConcept Caiman latirostris LISTING eu_listed for family Alligatoridae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 378) TaxonConcept Caiman latirostris LISTING eu_listed for genus Caiman + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 379) TaxonConcept Caiman latirostris LISTING eu_listed for species Caiman latoristris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 380) TaxonConcept Caiman latirostris LISTING cites_show for order Crocodylia + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 381) TaxonConcept Caiman latirostris LISTING cites_show for family Alligatoridae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 382) TaxonConcept Caiman latirostris LISTING cites_show for genus Caiman + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 383) TaxonConcept Caiman latirostris LISTING cites_show for species Caiman latoristris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 384) TaxonConcept Caiman latirostris LISTING cites_show for synonym species Alligator cynocephalus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 385) TaxonConcept Caiman latirostris LISTING ann_symbol for species Caiman latirostris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 386) TaxonConcept Caiman latirostris LISTING hash_ann_symbol for species Caiman latirostris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' + + 387) TaxonConcept Canis lupus LISTING cites_listing for species Canis lupus (population split listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 388) TaxonConcept Canis lupus LISTING eu_listing for species Canis lupus (population split listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 389) TaxonConcept Canis lupus LISTING cites_listed for species Canis lupus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 390) TaxonConcept Canis lupus LISTING cites_listed for subspecies Canis lupus crassodon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 391) TaxonConcept Canis lupus LISTING eu_listed for species Canis lupus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 392) TaxonConcept Canis lupus LISTING show_in_species_plus_ac for species Canis lupus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 393) TaxonConcept Canis lupus LISTING show_in_species_plus_ac for subspecies Canis lupus crassodon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 394) TaxonConcept Canis lupus LISTING show_in_checklist_ac for species Canis lupus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 395) TaxonConcept Canis lupus LISTING show_in_checklist_ac for subspecies Canis lupus crassodon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 396) TaxonConcept Canis lupus LISTING show_in_species_plus for species Canis lupus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 397) TaxonConcept Canis lupus LISTING show_in_species_plus for subspecies Canis lupus crassodon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' + + 398) TaxonConcept Caretta caretta CMS LISTING cms_listing for family Cheloniidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' + + 399) TaxonConcept Caretta caretta CMS LISTING cms_listing for species Caretta caretta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' + + 400) TaxonConcept Caretta caretta CMS LISTING cms_listed for family Cheloniidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' + + 401) TaxonConcept Caretta caretta CMS LISTING cms_listed for species Caretta caretta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' + + 402) TaxonConcept Caretta caretta CMS CASCADING LISTING current_cms_additions for family Cheloniidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' + + 403) TaxonConcept Caretta caretta CMS CASCADING LISTING current_cms_additions for species Caretta caretta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' + + 404) TaxonConcept Cedrela montana LISTING cites_listing for species Cedrela montana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' + + 405) TaxonConcept Cedrela montana LISTING cites_listed for species Cedrela montana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' + + 406) TaxonConcept Cedrela montana LISTING cites_show for species Cedrela montana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' + + 407) TaxonConcept Cedrela montana LISTING eu_listing for species Cedrela montana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' + + 408) TaxonConcept Cedrela montana LISTING eu_listed for species Cedrela montana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' + + 409) TaxonConcept Cedrela montana LISTING eu_show for species Cedrela montana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' + + 410) TaxonConcept Cervus elphus CMS LISTING cms_listing for species Cervus elaphus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' + + 411) TaxonConcept Cervus elphus CMS LISTING cms_listing for subspecies Cervus elaphus bactrianus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' + + 412) TaxonConcept Cervus elphus CMS LISTING cms_listing for subspecies Cervus elaphus barbarus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' + + 413) TaxonConcept Cervus elphus CMS LISTING show_in_species_plus_ac for subspecies Cervus elaphus bactrianus (instrument) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' + + 414) TaxonConcept Cervus elphus CMS LISTING show_in_species_plus_ac for subspecies Cervus elaphus barbarus (listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' + + 415) TaxonConcept Cervus elphus CMS LISTING show_in_species_plus for subspecies Cervus elaphus bactrianus (instrument) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' + + 416) TaxonConcept Cervus elphus CMS LISTING show_in_species_plus for subspecies Cervus elaphus barbarus (listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' + + 417) TaxonConcept Cervus elaphus TAXONOMY full_name for subspecies Cervus elaphus bactrianus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 418) TaxonConcept Cervus elaphus TAXONOMY full_name for species Cervus elaphus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 419) TaxonConcept Cervus elaphus TAXONOMY full_name for genus Cervus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 420) TaxonConcept Cervus elaphus LISTING cites_listing for species Cervus elaphus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 421) TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus bactrianus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 422) TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus barbarus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 423) TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus hanglu + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 424) TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus canadensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 425) TaxonConcept Cervus elaphus LISTING eu_listing for species Cervus elaphus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 426) TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus bactrianus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 427) TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus barbarus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 428) TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus hanglu + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 429) TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus canadensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 430) TaxonConcept Cervus elaphus LISTING cites_listed for order Artiodactyla + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 431) TaxonConcept Cervus elaphus LISTING cites_listed for family Cervidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 432) TaxonConcept Cervus elaphus LISTING cites_listed for genus Cervus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 433) TaxonConcept Cervus elaphus LISTING cites_listed for species Cervus elaphus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 434) TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus bactrianus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 435) TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus barbarus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 436) TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus hanglu + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 437) TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus canadensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 438) TaxonConcept Cervus elaphus LISTING eu_listed for order Artiodactyla + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 439) TaxonConcept Cervus elaphus LISTING eu_listed for family Cervidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 440) TaxonConcept Cervus elaphus LISTING eu_listed for genus Cervus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 441) TaxonConcept Cervus elaphus LISTING eu_listed for species Cervus elaphus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 442) TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus bactrianus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 443) TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus barbarus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 444) TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus hanglu + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 445) TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus canadensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 446) TaxonConcept Cervus elaphus LISTING cites_show for subspecies Cervus elaphus hanglu + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 447) TaxonConcept Cervus elaphus LISTING cites_show for subspecies Cervus elaphus canadensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' + + 448) TaxonConcept Colophon LISTING cites_listing for genus Colophon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 449) TaxonConcept Colophon LISTING cites_listing for species Colophon barnardi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 450) TaxonConcept Colophon LISTING eu_listing for genus Colophon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 451) TaxonConcept Colophon LISTING eu_listing for species Colophon barnardi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 452) TaxonConcept Colophon LISTING cites_listed for genus Colophon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 453) TaxonConcept Colophon LISTING cites_listed for species Colophon barnardi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 454) TaxonConcept Colophon LISTING eu_listed for genus Colophon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 455) TaxonConcept Colophon LISTING eu_listed for species Colophon barnardi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 456) TaxonConcept Colophon LISTING cites_show for order Coleoptera + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 457) TaxonConcept Colophon LISTING cites_show for family Lucanidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 458) TaxonConcept Colophon LISTING current_party_ids for genus Colophon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 459) TaxonConcept Colophon LISTING current_party_ids for species Colophon barnardi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' + + 460) TaxonConcept Dalbergia LISTING cites_listing for species Dalbergia abbreviata + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' + + 461) TaxonConcept Dalbergia LISTING cites_listing for species Dalbergia abrahamii + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' + + 462) TaxonConcept Dalbergia LISTING cites_listed for species Dalbergia abbreviata + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' + + 463) TaxonConcept Dalbergia LISTING cites_listed for species Dalbergia abrahamii + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' + + 464) TaxonConcept Dalbergia LISTING cites_show for species Dalbergia abbreviata + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' + + 465) TaxonConcept Dalbergia LISTING cites_show for species Dalbergia abrahamii + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' + + 466) TaxonConcept Diospyros LISTING cites_listing for species Diospyros aculeata + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 467) TaxonConcept Diospyros LISTING cites_listing for species Diospyros acuta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 468) TaxonConcept Diospyros LISTING cites_listed for species Diospyros aculeata + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 469) TaxonConcept Diospyros LISTING cites_listed for species Diospyros acuta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 470) TaxonConcept Diospyros LISTING cites_show for species Diospyros aculeata + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 471) TaxonConcept Diospyros LISTING cites_show for species Diospyros acuta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 472) TaxonConcept Diospyros LISTING eu_listing for species Diospyros aculeata + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 473) TaxonConcept Diospyros LISTING eu_listing for species Diospyros acuta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 474) TaxonConcept Diospyros LISTING eu_listed for species Diospyros aculeata + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 475) TaxonConcept Diospyros LISTING eu_listed for species Diospyros acuta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 476) TaxonConcept Diospyros LISTING eu_show for species Diospyros aculeata + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 477) TaxonConcept Diospyros LISTING eu_show for species Diospyros acuta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' + + 478) TaxonConcept Falconiformes TAXONOMY rank_name for Falco hybrid + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 479) TaxonConcept Falconiformes LISTING cites_listing for order Falconiformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 480) TaxonConcept Falconiformes LISTING cites_listing for species Falco araea + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 481) TaxonConcept Falconiformes LISTING cites_listing for species Falco alopex (H) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 482) TaxonConcept Falconiformes LISTING cites_listing for species Gymnogyps californianus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 483) TaxonConcept Falconiformes LISTING cites_listing for species Sarcoramphus papa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 484) TaxonConcept Falconiformes LISTING cites_listing for species Vultur atratus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 485) TaxonConcept Falconiformes LISTING eu_listing for order Falconiformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 486) TaxonConcept Falconiformes LISTING eu_listing for species Falco araea + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 487) TaxonConcept Falconiformes LISTING eu_listing for species Falco alopex (H) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 488) TaxonConcept Falconiformes LISTING eu_listing for species Gymnogyps californianus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 489) TaxonConcept Falconiformes LISTING eu_listing for species Sarcoramphus papa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 490) TaxonConcept Falconiformes LISTING eu_listing for species Vultur atratus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 491) TaxonConcept Falconiformes LISTING cites_status for genus Vultur + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 492) TaxonConcept Falconiformes LISTING cites_status for species Vultur atratus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 493) TaxonConcept Falconiformes LISTING cites_listed for order Falconiformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 494) TaxonConcept Falconiformes LISTING cites_listed for family Falconidae (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 495) TaxonConcept Falconiformes LISTING cites_listed for genus Falco + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 496) TaxonConcept Falconiformes LISTING cites_listed for species Falco araea + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 497) TaxonConcept Falconiformes LISTING cites_listed for species Falco alopex + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 498) TaxonConcept Falconiformes LISTING cites_listed for species Vultur atratus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 499) TaxonConcept Falconiformes LISTING cites_listed for subspecies Falco peregrinus peregrinus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 500) TaxonConcept Falconiformes LISTING eu_listed for order Falconiformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 501) TaxonConcept Falconiformes LISTING eu_listed for family Falconidae (inclusion in higher taxa listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 502) TaxonConcept Falconiformes LISTING eu_listed for genus Falco + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 503) TaxonConcept Falconiformes LISTING eu_listed for species Falco araea + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 504) TaxonConcept Falconiformes LISTING eu_listed for species Falco alopex + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 505) TaxonConcept Falconiformes LISTING eu_listed for species Vultur atratus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 506) TaxonConcept Falconiformes LISTING eu_listed for subspecies Falco peregrinus peregrinus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 507) TaxonConcept Falconiformes LISTING cites_show for order Falconiformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 508) TaxonConcept Falconiformes LISTING cites_show for family Falconidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 509) TaxonConcept Falconiformes LISTING cites_show for Falco hybrid + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 510) TaxonConcept Falconiformes LISTING show_in_checklist_ac for subspecies Falco peregrinus peregrinus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 511) TaxonConcept Falconiformes LISTING show_in_species_plus_ac for subspecies Falco peregrinus peregrinus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' + + 512) TaxonConcept Loxodonta africana CMS TAXONOMY full_name for species Loxodonta africana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' + + 513) TaxonConcept Loxodonta africana CMS TAXONOMY full_name for genus Loxodonta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' + + 514) TaxonConcept Loxodonta africana CMS TAXONOMY rank for species Loxodonta africana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' + + 515) TaxonConcept Loxodonta africana CMS TAXONOMY ancestors family + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' + + 516) TaxonConcept Loxodonta africana CMS TAXONOMY ancestors order + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' + + 517) TaxonConcept Loxodonta africana CMS TAXONOMY ancestors class + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' + + 518) TaxonConcept Loxodonta africana CMS LISTING cms_listing for species Loxodonta africana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' + + 519) TaxonConcept Loxodonta africana CMS LISTING cms_listed for species Loxodonta africana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' + + 520) TaxonConcept Loxodonta africana TAXONOMY full_name for species Loxodonta africana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 521) TaxonConcept Loxodonta africana TAXONOMY full_name for genus Loxodonta + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 522) TaxonConcept Loxodonta africana TAXONOMY rank for species Loxodonta africana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 523) TaxonConcept Loxodonta africana TAXONOMY ancestors family + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 524) TaxonConcept Loxodonta africana TAXONOMY ancestors order + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 525) TaxonConcept Loxodonta africana TAXONOMY ancestors class + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 526) TaxonConcept Loxodonta africana LISTING cites_listing for species Loxodonta africana (population split listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 527) TaxonConcept Loxodonta africana LISTING eu_listing for species Loxodonta africana (population split listing) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 528) TaxonConcept Loxodonta africana LISTING cites_listed for species Loxodonta africana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 529) TaxonConcept Loxodonta africana LISTING cites_listed for family Elephantidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 530) TaxonConcept Loxodonta africana LISTING eu_listed for species Loxodonta africana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 531) TaxonConcept Loxodonta africana LISTING eu_listed for family Elephantidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' + + 532) TaxonConcept Mellivora capensis LISTING cites_listing for species Mellivora capensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' + + 533) TaxonConcept Mellivora capensis LISTING eu_listing for species Mellivora capensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' + + 534) TaxonConcept Mellivora capensis LISTING cites_listed for family Mustelinae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' + + 535) TaxonConcept Mellivora capensis LISTING cites_listed for genus Mellivora + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' + + 536) TaxonConcept Mellivora capensis LISTING cites_listed for species Mellivora capensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' + + 537) TaxonConcept Mellivora capensis LISTING eu_listed for family Mustelinae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' + + 538) TaxonConcept Mellivora capensis LISTING eu_listed for genus Mellivora + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' + + 539) TaxonConcept Mellivora capensis LISTING eu_listed for species Mellivora capensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' + + 540) TaxonConcept Mellivora capensis LISTING current_party_ids for species Mellivora capensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' + + 541) TaxonConcept Moschus LISTING cites_listing for genus Moschus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 542) TaxonConcept Moschus LISTING cites_listing for species Moschus leucogaster + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 543) TaxonConcept Moschus LISTING cites_listing for species Moschus moschiferus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 544) TaxonConcept Moschus LISTING cites_listing for subspecies Moschus moschiferus moschiferus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 545) TaxonConcept Moschus LISTING cites_listed for genus Moschus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 546) TaxonConcept Moschus LISTING cites_listed for species Moschus leucogaster + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 547) TaxonConcept Moschus LISTING cites_listed for species Moschus moschiferus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 548) TaxonConcept Moschus LISTING cites_listed for subspecies Moschus moschiferus moschiferus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 549) TaxonConcept Moschus CASCADING LISTING current_cites_additions for species Moschus leucogaster + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 550) TaxonConcept Moschus CASCADING LISTING current_cites_additions for species Moschus moschiferus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 551) TaxonConcept Moschus CASCADING LISTING current_cites_additions for subspecies Moschus moschiferus moschiferus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' + + 552) TaxonConcept Natator depressus LISTING cites_listing for family Cheloniidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/natator_depressus.rb:52:in `block (2 levels) in ' + + 553) TaxonConcept Natator depressus LISTING cites_listing for species Natator depressus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/natator_depressus.rb:52:in `block (2 levels) in ' + + 554) TaxonConcept Notomys aquilo LISTING cites_listing for genus Notomys + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/notomys_aquilo.rb:37:in `block (2 levels) in ' + + 555) TaxonConcept Notomys aquilo LISTING cites_listing for species Notomys aquilo + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/notomys_aquilo.rb:37:in `block (2 levels) in ' + + 556) TaxonConcept Notomys aquilo LISTING cites_show for genus Notomys + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/notomys_aquilo.rb:37:in `block (2 levels) in ' + + 557) TaxonConcept Notomys aquilo LISTING cites_show for species Notomys aquilo + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/notomys_aquilo.rb:37:in `block (2 levels) in ' + + 558) TaxonConcept Panax ginseng LISTING cites_listed for species Panax ginseng + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 559) TaxonConcept Panax ginseng LISTING cites_listed for genus Panax + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 560) TaxonConcept Panax ginseng LISTING eu_listed for species Panax ginseng + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 561) TaxonConcept Panax ginseng LISTING eu_listed for genus Panax + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 562) TaxonConcept Panax ginseng LISTING cites_listing for species Panax ginseng + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 563) TaxonConcept Panax ginseng LISTING eu_listing for species Panax ginseng + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 564) TaxonConcept Panax ginseng LISTING ann_symbol for species Panax ginseng + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 565) TaxonConcept Panax ginseng LISTING hash_ann_symbol for species Panax ginseng + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' + + 566) TaxonConcept Pereskia LISTING cites_listing for genus Pereskia (not listed, shown) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 567) TaxonConcept Pereskia LISTING cites_listing for genus Ariocarpus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 568) TaxonConcept Pereskia LISTING cites_listing for family Cactaceae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 569) TaxonConcept Pereskia LISTING eu_listing for genus Pereskia (not listed, shown) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 570) TaxonConcept Pereskia LISTING eu_listing for genus Ariocarpus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 571) TaxonConcept Pereskia LISTING eu_listing for family Cactaceae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 572) TaxonConcept Pereskia LISTING cites_listed for family Cactaceae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 573) TaxonConcept Pereskia LISTING cites_listed for genus Pereskia + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 574) TaxonConcept Pereskia LISTING eu_listed for family Cactaceae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 575) TaxonConcept Pereskia LISTING eu_listed for genus Pereskia + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 576) TaxonConcept Pereskia LISTING cites_status for genus Pereskia + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 577) TaxonConcept Pereskia LISTING cites_show for genus Pereskia + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' + + 578) TaxonConcept Platysternon megacephalum LISTING cites_listing for family Platysternidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' + + 579) TaxonConcept Platysternon megacephalum LISTING cites_listing for species Platysternon megacephalum + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' + + 580) TaxonConcept Platysternon megacephalum LISTING cites_listed for species Platysternon megacephalum + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' + + 581) TaxonConcept Platysternon megacephalum LISTING cites_show for species Platysternon megacephalum + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' + + 582) TaxonConcept Platysternon megacephalum LISTING eu_listing for family Platysternidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' + + 583) TaxonConcept Platysternon megacephalum LISTING eu_listing for species Platysternon megacephalum + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' + + 584) TaxonConcept Platysternon megacephalum LISTING eu_listed for species Platysternon megacephalum + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' + + 585) TaxonConcept Platysternon megacephalum LISTING eu_show for species Platysternon megacephalum + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' + + 586) TaxonConcept Pristis microdon LISTING cites_listing for family Pristidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' + + 587) TaxonConcept Pristis microdon LISTING cites_listing for species Pristis microdon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' + + 588) TaxonConcept Pristis microdon LISTING cites_listed for species Pristis microdon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' + + 589) TaxonConcept Pristis microdon LISTING cites_show for species Pristis microdon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' + + 590) TaxonConcept Pristis microdon LISTING eu_listing for family Pristidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' + + 591) TaxonConcept Pristis microdon LISTING eu_listing for species Pristis microdon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' + + 592) TaxonConcept Pristis microdon LISTING eu_listed for species Pristis microdon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' + + 593) TaxonConcept Pristis microdon LISTING eu_show for species Pristis microdon + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' + + 594) TaxonConcept Pseudomys fieldi LISTING cites_listing for subspecies Pseudomys fieldi preaconis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' + + 595) TaxonConcept Pseudomys fieldi LISTING cites_listing for species Pseudomys fieldi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' + + 596) TaxonConcept Pseudomys fieldi LISTING eu_listing for subspecies Pseudomys fieldi preaconis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' + + 597) TaxonConcept Pseudomys fieldi LISTING eu_listing for species Pseudomys fieldi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' + + 598) TaxonConcept Pseudomys fieldi LISTING cites_show for subspecies Pseudomys fieldi preaconis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' + + 599) TaxonConcept Pseudomys fieldi LISTING cites_show for species Pseudomys fieldi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' + + 600) TaxonConcept Psittaciformes LISTING cites_listing for order Psittaciformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 601) TaxonConcept Psittaciformes LISTING cites_listing for species Cacatua goffiniana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 602) TaxonConcept Psittaciformes LISTING cites_listing for species Cacatua ducorpsi (H) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 603) TaxonConcept Psittaciformes LISTING cites_listing for species Probosciger aterrimus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 604) TaxonConcept Psittaciformes LISTING cites_listing for species Amazona aestiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 605) TaxonConcept Psittaciformes LISTING cites_listing for species Agapornis roseicollis (DEL II, not listed, not shown) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 606) TaxonConcept Psittaciformes LISTING cites_listing for species Psittacula krameri (DEL III, not listed, not shown) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 607) TaxonConcept Psittaciformes LISTING cites_listing for subspecies Amazona festiva festiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 608) TaxonConcept Psittaciformes LISTING eu_listing for order Psittaciformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 609) TaxonConcept Psittaciformes LISTING eu_listing for species Cacatua goffiniana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 610) TaxonConcept Psittaciformes LISTING eu_listing for species Cacatua ducorpsi (H) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 611) TaxonConcept Psittaciformes LISTING eu_listing for species Probosciger aterrimus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 612) TaxonConcept Psittaciformes LISTING eu_listing for species Amazona aestiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 613) TaxonConcept Psittaciformes LISTING eu_listing for species Agapornis roseicollis (DEL II, not listed, not shown) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 614) TaxonConcept Psittaciformes LISTING eu_listing for species Psittacula krameri (DEL III, not listed, not shown) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 615) TaxonConcept Psittaciformes LISTING eu_listing for subspecies Amazona festiva festiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 616) TaxonConcept Psittaciformes LISTING cites_listed for order Psittaciformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 617) TaxonConcept Psittaciformes LISTING cites_listed for family Cacatuidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 618) TaxonConcept Psittaciformes LISTING cites_listed for genus Cacatua + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 619) TaxonConcept Psittaciformes LISTING cites_listed for species Cacatua goffiniana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 620) TaxonConcept Psittaciformes LISTING cites_listed for species Cacatua ducorpsi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 621) TaxonConcept Psittaciformes LISTING cites_listed for subspecies Amazona festiva festiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 622) TaxonConcept Psittaciformes LISTING eu_listed for order Psittaciformes + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 623) TaxonConcept Psittaciformes LISTING eu_listed for family Cacatuidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 624) TaxonConcept Psittaciformes LISTING eu_listed for genus Cacatua + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 625) TaxonConcept Psittaciformes LISTING eu_listed for species Cacatua goffiniana + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 626) TaxonConcept Psittaciformes LISTING eu_listed for species Cacatua ducorpsi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 627) TaxonConcept Psittaciformes LISTING eu_listed for subspecies Amazona festiva festiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 628) TaxonConcept Psittaciformes LISTING cites_show for species Agapornis roseicollis (DEL II) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 629) TaxonConcept Psittaciformes LISTING cites_show for species Amazona aestiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 630) TaxonConcept Psittaciformes LISTING cites_show for species Psittacula krameri (DEL III) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 631) TaxonConcept Psittaciformes LISTING cites_status for species Agapornis roseicollis (DEL II) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 632) TaxonConcept Psittaciformes LISTING cites_status for species Psittacula krameri (DEL III) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 633) TaxonConcept Psittaciformes LISTING show_in_checklist_ac for subspecies Amazona festiva festiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 634) TaxonConcept Psittaciformes LISTING show_in_species_plus_ac for subspecies Amazona festiva festiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 635) TaxonConcept Psittaciformes LISTING show_in_species_plus for subspecies Amazona festiva festiva + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' + + 636) TaxonConcept create when has accepted parent overnight calculations + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/taxon_concept/synonyms_spec.rb:90:in `block (5 levels) in ' + + 637) TaxonConcept Tapiridae TAXONOMY full_name for family Tapiridae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 638) TaxonConcept Tapiridae TAXONOMY rank for family Tapiridae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 639) TaxonConcept Tapiridae TAXONOMY ancestors order + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 640) TaxonConcept Tapiridae TAXONOMY ancestors class + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 641) TaxonConcept Tapiridae LISTING cites_listing for family Tapiridae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 642) TaxonConcept Tapiridae LISTING cites_listing for species Tapirus terrestris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 643) TaxonConcept Tapiridae LISTING eu_listing for family Tapiridae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 644) TaxonConcept Tapiridae LISTING eu_listing for species Tapirus terrestris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 645) TaxonConcept Tapiridae LISTING cites_listed for family Tapiridae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 646) TaxonConcept Tapiridae LISTING cites_listed for genus Tapirus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 647) TaxonConcept Tapiridae LISTING cites_listed for species Tapirus terrestris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 648) TaxonConcept Tapiridae LISTING eu_listed for family Tapiridae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 649) TaxonConcept Tapiridae LISTING eu_listed for genus Tapirus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 650) TaxonConcept Tapiridae LISTING eu_listed for species Tapirus terrestris + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' + + 651) TaxonConcept create when has accepted parent overnight calculations + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/taxon_concept/trade_names_spec.rb:90:in `block (5 levels) in ' + + 652) TaxonConcept Uroplatus REFERENCES cites_accepted for genus Uroplatus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 653) TaxonConcept Uroplatus REFERENCES cites_accepted for species Uroplatus alluaudi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 654) TaxonConcept Uroplatus REFERENCES cites_accepted for species Uroplatus giganteus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 655) TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for family Gekkonidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 656) TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for genus Uroplatus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 657) TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for species Uroplatus alluaudi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 658) TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for species Uroplatus giganteus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 659) TaxonConcept Uroplatus LISTING cites_listing for genus Uroplatus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 660) TaxonConcept Uroplatus LISTING cites_listing for species Uroplatus giganteus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 661) TaxonConcept Uroplatus LISTING eu_listing for genus Uroplatus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 662) TaxonConcept Uroplatus LISTING eu_listing for species Uroplatus giganteus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 663) TaxonConcept Uroplatus LISTING cites_listed for family Gekkonidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 664) TaxonConcept Uroplatus LISTING cites_listed for genus Uroplatus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 665) TaxonConcept Uroplatus LISTING cites_listed for species Uroplatus giganteus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 666) TaxonConcept Uroplatus LISTING eu_listed for family Gekkonidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 667) TaxonConcept Uroplatus LISTING eu_listed for genus Uroplatus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 668) TaxonConcept Uroplatus LISTING eu_listed for species Uroplatus giganteus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' + + 669) TaxonConcept Varanidae REFERENCES cites_accepted for species Varanus bengalensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 670) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for order Sauria + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 671) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for family Varanidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 672) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bengalensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 673) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bushi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 674) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bushi + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 675) TaxonConcept Varanidae LISTING cites_listing for genus Varanus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 676) TaxonConcept Varanidae LISTING cites_listing for species Varanus bengalensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 677) TaxonConcept Varanidae LISTING eu_listing for genus Varanus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 678) TaxonConcept Varanidae LISTING eu_listing for species Varanus bengalensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 679) TaxonConcept Varanidae LISTING cites_listed for family Varanidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 680) TaxonConcept Varanidae LISTING cites_listed for genus Varanus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 681) TaxonConcept Varanidae LISTING cites_listed for species Varanus bengalensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 682) TaxonConcept Varanidae LISTING eu_listed for family Varanidae + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 683) TaxonConcept Varanidae LISTING eu_listed for genus Varanus + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 684) TaxonConcept Varanidae LISTING eu_listed for species Varanus bengalensis + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' + + 685) Trade::AnnualReportUpload valid? when uploaded file as exporter with exporter column headers + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 686) Trade::AnnualReportUpload valid? when uploaded file as importer with exporter column headers + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 687) Trade::AnnualReportUpload valid? when uploaded file as importer with importer column headers + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 688) Trade::AnnualReportUpload valid? when uploaded file as exporter with importer column headers + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 689) Trade::AnnualReportUpload validation_errors + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 690) Trade::AnnualReportUpload create when blank lines in import file + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 691) Trade::AnnualReportUpload destroy + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 692) Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal importer (E) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 693) Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal importer (I) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 694) Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal country of origin + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 695) Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 696) Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 697) Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 698) Trade::Filter results when searching by taxon concepts ids in the public interface at FAMILY rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 699) Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 700) Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 701) Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 702) Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 703) Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 704) Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 705) Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 706) Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 707) Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 708) Trade::Filter results when searching by taxon concepts ids when status N shipments present + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 709) Trade::Filter results when searching by taxon concepts ids when subspecies shipments present + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 710) Trade::Filter results when searching by taxon concepts ids when synonym subspecies shipments present when searching by taxonomic parent + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 711) Trade::Filter results when searching by taxon concepts ids when synonym subspecies shipments present when searching by accepted name + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' + + 712) Trade::Filter results when searching by reported taxon concepts ids when trade names shipments present + Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/filter_spec.rb:108:in `block (4 levels) in ' + + 713) Trade::InclusionValidationRule matching_records_for_aru_and_error + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 714) Trade::InclusionValidationRule refresh_errors_if_needed when no updates + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 715) Trade::InclusionValidationRule refresh_errors_if_needed when updates and error fixed for all records error record is destroyed + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 716) Trade::InclusionValidationRule refresh_errors_if_needed when updates and error fixed for some records error record is updated to reflect new error_count + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 717) Trade::InclusionValidationRule validation_errors_for_aru species name may have extra whitespace between name segments + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 718) Trade::InclusionValidationRule validation_errors_for_aru trading partner should be a valid iso code + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 719) Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with unit as defined by term_trade_codes_pairs table when invalid combination + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 720) Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with unit as defined by term_trade_codes_pairs table when required unit blank + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 721) Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with purpose as defined by term_trade_codes_pairs table + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 722) Trade::InclusionValidationRule validation_errors_for_aru taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table when accepted name + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 723) Trade::InclusionValidationRule validation_errors_for_aru taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table when hybrid + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 724) Trade::InclusionValidationRule validation_errors_for_aru when W source and country of origin blank and exporter doesn't match distribution (E) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 725) Trade::InclusionValidationRule validation_errors_for_aru when W source and country of origin blank and exporter doesn't match distribution (I) + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 726) Trade::InclusionValidationRule validation_errors_for_aru when W source and country XX + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 727) Trade::InclusionValidationRule validation_errors_for_aru when W source and country doesn't match distribution of higher taxa + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 728) Trade::InclusionValidationRule validation_errors_for_aru when invalid scope specified + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 729) Trade::SandboxFilter results + Failure/Error: aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_34', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_34', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/models/trade/sandbox_filter_spec.rb:5:in `block (2 levels) in ' + # ./spec/models/trade/sandbox_filter_spec.rb:9:in `block (2 levels) in ' + # ./spec/models/trade/sandbox_filter_spec.rb:23:in `block (2 levels) in ' + + 730) Trade::SandboxFilter results + Failure/Error: aru.save(:validate => false) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist + LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_35', NU... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_35', NULL) + # ./app/models/trade/sandbox_template.rb:85:in `sanitize' + # ./app/models/trade/sandbox.rb:14:in `copy' + # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' + # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' + # ./spec/models/trade/sandbox_filter_spec.rb:5:in `block (2 levels) in ' + # ./spec/models/trade/sandbox_filter_spec.rb:9:in `block (2 levels) in ' + # ./spec/models/trade/sandbox_filter_spec.rb:23:in `block (2 levels) in ' + + 731) Trade::Sandbox destroy + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 732) Trade::SandboxTemplate update + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 733) Trade::SandboxTemplate update_batch + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 734) Trade::InclusionValidationRule validation_errors when W source and country of origin matches distribution + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' + + 735) Trade::InclusionValidationRule validation_errors when W source and country of origin blank + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::RecordInvalid: + Validation failed: Name has already been taken + # ./spec/support/sapi_helpers.rb:4:in `cites_eu' + # ./spec/support/sapi_helpers.rb:303:in `block (3 levels) in ' + # ./spec/support/sapi_helpers.rb:243:in `cites_eu_animalia' + # ./spec/support/sapi_helpers.rb:253:in `cites_eu_chordata' + # ./spec/support/sapi_helpers.rb:159:in `cites_eu_mammalia' + # ./spec/shared/pecari_tajacu.rb:51:in `block (2 levels) in ' + + 736) Trade::Shipment secondary validations when species name + appendix + year invalid + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/shipment_spec.rb:113:in `block (4 levels) in ' + + 737) Trade::Shipment secondary validations when species name + appendix + year invalid + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/shipment_spec.rb:113:in `block (4 levels) in ' + + 738) Trade::Shipment secondary validations when species name + appendix + year valid + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/shipment_spec.rb:113:in `block (4 levels) in ' + + 739) Trade::Shipment secondary validations when species name + appendix N + year valid + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/shipment_spec.rb:153:in `block (4 levels) in ' + + 740) Trade::Shipment secondary validations when species name + appendix N + year not CITES listed and not EU listed + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/shipment_spec.rb:174:in `block (4 levels) in ' + + 741) Trade::Shipment secondary validations when species name + source code invalid + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/shipment_spec.rb:434:in `block (4 levels) in ' + + 742) Trade::Shipment secondary validations when species name + source code valid + Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/models/trade/shipment_spec.rb:434:in `block (4 levels) in ' + + 743) Trade::ShipmentsComptabExport total_cnt when internal + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 5: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", importer_quantity AS "Importer reported quantity", exporter_quantity AS "Exporter reported quantity", term_name_en AS "Term", unit_name_en AS "Unit", purpose AS "Purpose", source AS "Source" FROM (SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + taxon_concept_class_name AS class_name, + taxon_concept_order_name AS order_name, + taxon_concept_family_name AS family_name, + taxon_concept_genus_name AS genus_name, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + country_of_origin_id, + countries_of_origin.iso_code2 AS country_of_origin, + TRIM_DECIMAL_ZERO( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END) + ) AS importer_quantity, + TRIM_DECIMAL_ZERO( + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) AS exporter_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr, + purpose_id, + purposes.code AS purpose, + source_id, + sources.code AS source + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_family_name, + taxon_concept_id, + taxon_concept_name_status, + taxon_concept_full_name, + class_name, + order_name, + family_name, + genus_name, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + country_of_origin_id, + countries_of_origin.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr, + purpose_id, + purposes.code, + source_id, + sources.code + ORDER BY + year ASC, + appendix, + taxon_concept_family_name, + taxon_concept_full_name, + importers.iso_code2, + exporters.iso_code2, + countries_of_origin.iso_code2, + terms.code, + units.code, + purposes.code, + sources.code) subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_comptab_export_spec.rb:12:in `block (4 levels) in ' + + 744) Trade::ShipmentsComptabExport total_cnt when public + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 5: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", importer_quantity AS "Importer reported quantity", exporter_quantity AS "Exporter reported quantity", term_name_en AS "Term", unit_name_en AS "Unit", purpose AS "Purpose", source AS "Source" FROM (SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + taxon_concept_class_name AS class_name, + taxon_concept_order_name AS order_name, + taxon_concept_family_name AS family_name, + taxon_concept_genus_name AS genus_name, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + country_of_origin_id, + countries_of_origin.iso_code2 AS country_of_origin, + TRIM_DECIMAL_ZERO( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END) + ) AS importer_quantity, + TRIM_DECIMAL_ZERO( + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) AS exporter_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr, + purpose_id, + purposes.code AS purpose, + source_id, + sources.code AS source + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_family_name, + taxon_concept_id, + taxon_concept_name_status, + taxon_concept_full_name, + class_name, + order_name, + family_name, + genus_name, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + country_of_origin_id, + countries_of_origin.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr, + purpose_id, + purposes.code, + source_id, + sources.code + ORDER BY + year ASC, + appendix, + taxon_concept_family_name, + taxon_concept_full_name, + importers.iso_code2, + exporters.iso_code2, + countries_of_origin.iso_code2, + terms.code, + units.code, + purposes.code, + sources.code) subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_comptab_export_spec.rb:16:in `block (4 levels) in ' + + 745) Trade::ShipmentsComptabExport query when internal + Failure/Error: specify { subject.query.ntuples.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 5: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", importer_quantity AS "Importer reported quantity", exporter_quantity AS "Exporter reported quantity", term_name_en AS "Term", unit_name_en AS "Unit", purpose AS "Purpose", source AS "Source" FROM (SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + taxon_concept_class_name AS class_name, + taxon_concept_order_name AS order_name, + taxon_concept_family_name AS family_name, + taxon_concept_genus_name AS genus_name, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + country_of_origin_id, + countries_of_origin.iso_code2 AS country_of_origin, + TRIM_DECIMAL_ZERO( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END) + ) AS importer_quantity, + TRIM_DECIMAL_ZERO( + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) AS exporter_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr, + purpose_id, + purposes.code AS purpose, + source_id, + sources.code AS source + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_family_name, + taxon_concept_id, + taxon_concept_name_status, + taxon_concept_full_name, + class_name, + order_name, + family_name, + genus_name, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + country_of_origin_id, + countries_of_origin.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr, + purpose_id, + purposes.code, + source_id, + sources.code + ORDER BY + year ASC, + appendix, + taxon_concept_family_name, + taxon_concept_full_name, + importers.iso_code2, + exporters.iso_code2, + countries_of_origin.iso_code2, + terms.code, + units.code, + purposes.code, + sources.code) subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_comptab_export_spec.rb:23:in `block (4 levels) in ' + + 746) Trade::ShipmentsComptabExport query when public + Failure/Error: specify { subject.query.ntuples.should == 3 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 5: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", importer_quantity AS "Importer reported quantity", exporter_quantity AS "Exporter reported quantity", term_name_en AS "Term", unit_name_en AS "Unit", purpose AS "Purpose", source AS "Source" FROM (SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + taxon_concept_class_name AS class_name, + taxon_concept_order_name AS order_name, + taxon_concept_family_name AS family_name, + taxon_concept_genus_name AS genus_name, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + country_of_origin_id, + countries_of_origin.iso_code2 AS country_of_origin, + TRIM_DECIMAL_ZERO( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END) + ) AS importer_quantity, + TRIM_DECIMAL_ZERO( + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) AS exporter_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr, + purpose_id, + purposes.code AS purpose, + source_id, + sources.code AS source + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_family_name, + taxon_concept_id, + taxon_concept_name_status, + taxon_concept_full_name, + class_name, + order_name, + family_name, + genus_name, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + country_of_origin_id, + countries_of_origin.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr, + purpose_id, + purposes.code, + source_id, + sources.code + ORDER BY + year ASC, + appendix, + taxon_concept_family_name, + taxon_concept_full_name, + importers.iso_code2, + exporters.iso_code2, + countries_of_origin.iso_code2, + terms.code, + units.code, + purposes.code, + sources.code) subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_comptab_export_spec.rb:27:in `block (4 levels) in ' + + 747) Trade::ShipmentsExport query when internal + Failure/Error: specify { subject.query.ntuples.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 6: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT id AS "ID", year AS "Year", appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", reported_taxon AS "Reported Taxon", reported_taxon_concept_id AS "Reported Taxon ID", term_name_en AS "Term", quantity AS "Quantity", unit_name_en AS "Unit", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", purpose AS "Purpose", source AS "Source", reporter_type AS "Reporter Type", import_permit_number AS "Import Permit", export_permit_number AS "Export Permit", origin_permit_number AS "Origin Permit", legacy_shipment_number AS "Legacy Shipment No", created_by AS "Created by", updated_by AS "Updated by" FROM (SELECT + shipments.id, + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + reported_taxon_concept_id, + full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_concept_name_status) AS reported_taxon, + taxon_concept_class_name AS class_name, + taxon_concept_order_name AS order_name, + taxon_concept_family_name AS family_name, + taxon_concept_genus_name AS genus_name, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + reported_by_exporter, + CASE + WHEN reported_by_exporter THEN 'E' + ELSE 'I' + END AS reporter_type, + country_of_origin_id, + countries_of_origin.iso_code2 AS country_of_origin, + CASE WHEN quantity = 0 THEN NULL ELSE quantity END, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + purpose_id, + purposes.code AS purpose, + source_id, + sources.code AS source, + import_permit_number, + export_permit_number, + origin_permit_number, + import_permits_ids, + export_permits_ids, + origin_permits_ids, + legacy_shipment_number, + uc.name AS created_by, + uu.name AS updated_by + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + LEFT JOIN ranks AS reported_taxon_ranks + ON reported_taxon_ranks.id = reported_taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + LEFT JOIN users as uc + ON shipments.created_by_id = uc.id + LEFT JOIN users as uu + ON shipments.updated_by_id = uu.id) subquery + # ./app/models/trade/shipments_export.rb:40:in `query' + # ./spec/models/trade/shipments_export_spec.rb:23:in `block (4 levels) in ' + + 748) Trade::ShipmentsExport query when public + Failure/Error: specify { subject.query.ntuples.should == 3 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 6: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", quantity AS "Quantity", unit_name_en AS "Unit", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", purpose AS "Purpose", source AS "Source" FROM (SELECT + shipments.id, + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + reported_taxon_concept_id, + full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_concept_name_status) AS reported_taxon, + taxon_concept_class_name AS class_name, + taxon_concept_order_name AS order_name, + taxon_concept_family_name AS family_name, + taxon_concept_genus_name AS genus_name, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + reported_by_exporter, + CASE + WHEN reported_by_exporter THEN 'E' + ELSE 'I' + END AS reporter_type, + country_of_origin_id, + countries_of_origin.iso_code2 AS country_of_origin, + CASE WHEN quantity = 0 THEN NULL ELSE quantity END, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + purpose_id, + purposes.code AS purpose, + source_id, + sources.code AS source, + import_permit_number, + export_permit_number, + origin_permit_number, + import_permits_ids, + export_permits_ids, + origin_permits_ids, + legacy_shipment_number, + uc.name AS created_by, + uu.name AS updated_by + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + LEFT JOIN ranks AS reported_taxon_ranks + ON reported_taxon_ranks.id = reported_taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + LEFT JOIN users as uc + ON shipments.created_by_id = uc.id + LEFT JOIN users as uu + ON shipments.updated_by_id = uu.id) subquery + # ./app/models/trade/shipments_export.rb:40:in `query' + # ./spec/models/trade/shipments_export_spec.rb:27:in `block (4 levels) in ' + + 749) Trade::ShipmentsGrossExportsExport total_cnt when internal + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8 + : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_gross_exports_export_spec.rb:12:in `block (4 levels) in ' + + 750) Trade::ShipmentsGrossExportsExport total_cnt when public + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7 + : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_gross_exports_export_spec.rb:16:in `block (4 levels) in ' + + 751) Trade::ShipmentsGrossExportsExport query when internal + Failure/Error: specify { subject.query.ntuples.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8 + : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_gross_exports_export_spec.rb:23:in `block (4 levels) in ' + + 752) Trade::ShipmentsGrossExportsExport query when public + Failure/Error: specify { subject.query.ntuples.should == 3 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7 + : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_gross_exports_export_spec.rb:27:in `block (4 levels) in ' + + 753) Trade::ShipmentsGrossImportsExport total_cnt when internal + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8 + : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_gross_imports_export_spec.rb:12:in `block (4 levels) in ' + + 754) Trade::ShipmentsGrossImportsExport total_cnt when public + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7 + : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_gross_imports_export_spec.rb:16:in `block (4 levels) in ' + + 755) Trade::ShipmentsGrossImportsExport query when internal + Failure/Error: specify { subject.query.ntuples.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8 + : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_gross_imports_export_spec.rb:23:in `block (4 levels) in ' + + 756) Trade::ShipmentsGrossImportsExport query when public + Failure/Error: specify { subject.query.ntuples.should == 3 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7 + : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_gross_imports_export_spec.rb:27:in `block (4 levels) in ' + + 757) Trade::ShipmentsNetExportsExport total_cnt when internal + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + exports.year, + exports.appendix, + exports.taxon_concept_id, + exports.taxon, + exports.term_id, + exports.term, + exports.term_name_en, + exports.term_name_es, + exports.term_name_fr, + exports.unit_id, + exports.unit, + exports.unit_name_en, + exports.unit_name_es, + exports.unit_name_fr, + exports.country_id, + exports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM exports + LEFT JOIN imports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.year = imports.year + AND exports.country_id = imports.country_id + WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8 + : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + exports.year, + exports.appendix, + exports.taxon_concept_id, + exports.taxon, + exports.term_id, + exports.term, + exports.term_name_en, + exports.term_name_es, + exports.term_name_fr, + exports.unit_id, + exports.unit, + exports.unit_name_en, + exports.unit_name_es, + exports.unit_name_fr, + exports.country_id, + exports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM exports + LEFT JOIN imports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.year = imports.year + AND exports.country_id = imports.country_id + WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_net_exports_export_spec.rb:12:in `block (4 levels) in ' + + 758) Trade::ShipmentsNetExportsExport total_cnt when public + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + exports.year, + exports.appendix, + exports.taxon_concept_id, + exports.taxon, + exports.term_id, + exports.term, + exports.term_name_en, + exports.term_name_es, + exports.term_name_fr, + exports.unit_id, + exports.unit, + exports.unit_name_en, + exports.unit_name_es, + exports.unit_name_fr, + exports.country_id, + exports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM exports + LEFT JOIN imports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.year = imports.year + AND exports.country_id = imports.country_id + WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7 + : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + exports.year, + exports.appendix, + exports.taxon_concept_id, + exports.taxon, + exports.term_id, + exports.term, + exports.term_name_en, + exports.term_name_es, + exports.term_name_fr, + exports.unit_id, + exports.unit, + exports.unit_name_en, + exports.unit_name_es, + exports.unit_name_fr, + exports.country_id, + exports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM exports + LEFT JOIN imports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.year = imports.year + AND exports.country_id = imports.country_id + WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_net_exports_export_spec.rb:16:in `block (4 levels) in ' + + 759) Trade::ShipmentsNetExportsExport query when internal + Failure/Error: specify { subject.query.ntuples.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + exports.year, + exports.appendix, + exports.taxon_concept_id, + exports.taxon, + exports.term_id, + exports.term, + exports.term_name_en, + exports.term_name_es, + exports.term_name_fr, + exports.unit_id, + exports.unit, + exports.unit_name_en, + exports.unit_name_es, + exports.unit_name_fr, + exports.country_id, + exports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM exports + LEFT JOIN imports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.year = imports.year + AND exports.country_id = imports.country_id + WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8 + : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + exports.year, + exports.appendix, + exports.taxon_concept_id, + exports.taxon, + exports.term_id, + exports.term, + exports.term_name_en, + exports.term_name_es, + exports.term_name_fr, + exports.unit_id, + exports.unit, + exports.unit_name_en, + exports.unit_name_es, + exports.unit_name_fr, + exports.country_id, + exports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM exports + LEFT JOIN imports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.year = imports.year + AND exports.country_id = imports.country_id + WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_net_exports_export_spec.rb:23:in `block (4 levels) in ' + + 760) Trade::ShipmentsNetExportsExport query when public + Failure/Error: specify { subject.query.ntuples.should == 3 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + exports.year, + exports.appendix, + exports.taxon_concept_id, + exports.taxon, + exports.term_id, + exports.term, + exports.term_name_en, + exports.term_name_es, + exports.term_name_fr, + exports.unit_id, + exports.unit, + exports.unit_name_en, + exports.unit_name_es, + exports.unit_name_fr, + exports.country_id, + exports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM exports + LEFT JOIN imports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.year = imports.year + AND exports.country_id = imports.country_id + WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7 + : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + exports.year, + exports.appendix, + exports.taxon_concept_id, + exports.taxon, + exports.term_id, + exports.term, + exports.term_name_en, + exports.term_name_es, + exports.term_name_fr, + exports.unit_id, + exports.unit, + exports.unit_name_en, + exports.unit_name_es, + exports.unit_name_fr, + exports.country_id, + exports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM exports + LEFT JOIN imports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.year = imports.year + AND exports.country_id = imports.country_id + WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_net_exports_export_spec.rb:27:in `block (4 levels) in ' + + 761) Trade::ShipmentsNetImportsExport total_cnt when internal + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + imports.year, + imports.appendix, + imports.taxon_concept_id, + imports.taxon, + imports.term_id, + imports.term, + imports.term_name_en, + imports.term_name_es, + imports.term_name_fr, + imports.unit_id, + imports.unit, + imports.unit_name_en, + imports.unit_name_es, + imports.unit_name_fr, + imports.country_id, + imports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM imports + LEFT JOIN exports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.country_id = imports.country_id + WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8 + : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + imports.year, + imports.appendix, + imports.taxon_concept_id, + imports.taxon, + imports.term_id, + imports.term, + imports.term_name_en, + imports.term_name_es, + imports.term_name_fr, + imports.unit_id, + imports.unit, + imports.unit_name_en, + imports.unit_name_es, + imports.unit_name_fr, + imports.country_id, + imports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM imports + LEFT JOIN exports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.country_id = imports.country_id + WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_net_imports_export_spec.rb:12:in `block (4 levels) in ' + + 762) Trade::ShipmentsNetImportsExport total_cnt when public + Failure/Error: specify { subject.total_cnt.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + imports.year, + imports.appendix, + imports.taxon_concept_id, + imports.taxon, + imports.term_id, + imports.term, + imports.term_name_en, + imports.term_name_es, + imports.term_name_fr, + imports.unit_id, + imports.unit, + imports.unit_name_en, + imports.unit_name_es, + imports.unit_name_fr, + imports.country_id, + imports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM imports + LEFT JOIN exports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.country_id = imports.country_id + WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7 + : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + imports.year, + imports.appendix, + imports.taxon_concept_id, + imports.taxon, + imports.term_id, + imports.term, + imports.term_name_en, + imports.term_name_es, + imports.term_name_fr, + imports.unit_id, + imports.unit, + imports.unit_name_en, + imports.unit_name_es, + imports.unit_name_fr, + imports.country_id, + imports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM imports + LEFT JOIN exports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.country_id = imports.country_id + WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' + # ./spec/models/trade/shipments_net_imports_export_spec.rb:16:in `block (4 levels) in ' + + 763) Trade::ShipmentsNetImportsExport query when internal + Failure/Error: specify { subject.query.ntuples.should == 4 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + imports.year, + imports.appendix, + imports.taxon_concept_id, + imports.taxon, + imports.term_id, + imports.term, + imports.term_name_en, + imports.term_name_es, + imports.term_name_fr, + imports.unit_id, + imports.unit, + imports.unit_name_en, + imports.unit_name_es, + imports.unit_name_fr, + imports.country_id, + imports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM imports + LEFT JOIN exports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.country_id = imports.country_id + WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8 + : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + imports.year, + imports.appendix, + imports.taxon_concept_id, + imports.taxon, + imports.term_id, + imports.term, + imports.term_name_en, + imports.term_name_es, + imports.term_name_fr, + imports.unit_id, + imports.unit, + imports.unit_name_en, + imports.unit_name_es, + imports.unit_name_fr, + imports.country_id, + imports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM imports + LEFT JOIN exports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.country_id = imports.country_id + WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_net_imports_export_spec.rb:23:in `block (4 levels) in ' + + 764) Trade::ShipmentsNetImportsExport query when public + Failure/Error: specify { subject.query.ntuples.should == 3 } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist + LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + imports.year, + imports.appendix, + imports.taxon_concept_id, + imports.taxon, + imports.term_id, + imports.term, + imports.term_name_en, + imports.term_name_es, + imports.term_name_fr, + imports.unit_id, + imports.unit, + imports.unit_name_en, + imports.unit_name_es, + imports.unit_name_fr, + imports.country_id, + imports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM imports + LEFT JOIN exports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.country_id = imports.country_id + WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7 + : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], + appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity + FROM (WITH exports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id AS country_id, + exporter AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + exporter_id, + exporter + ORDER BY + appendix, + taxon, + term, + unit, + country + ), imports AS ( + WITH gross_net_subquery AS ( + SELECT + year, + appendix, + taxon_concept_id, + full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, + importer_id, + importers.iso_code2 AS importer, + exporter_id, + exporters.iso_code2 AS exporter, + TRIM_DECIMAL_ZERO( + GREATEST( + SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), + SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) + ) + ) AS gross_quantity, + term_id, + terms.code AS term, + terms.name_en AS term_name_en, + terms.name_es AS term_name_es, + terms.name_fr AS term_name_fr, + unit_id, + units.code AS unit, + units.name_en AS unit_name_en, + units.name_es AS unit_name_es, + units.name_fr AS unit_name_fr + FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments + JOIN ranks + ON ranks.id = taxon_concept_rank_id + JOIN geo_entities importers + ON importers.id = importer_id + JOIN geo_entities exporters + ON exporters.id = exporter_id + LEFT JOIN geo_entities countries_of_origin + ON countries_of_origin.id = country_of_origin_id + LEFT JOIN trade_codes units + ON units.id = unit_id + JOIN trade_codes terms + ON terms.id = term_id + LEFT JOIN trade_codes purposes + ON purposes.id = purpose_id + LEFT JOIN trade_codes sources + ON sources.id = source_id + GROUP BY + year, + appendix, + taxon_concept_id, + taxon_concept_full_name, + taxon_concept_name_status, + ranks.name, + importer_id, + importers.iso_code2, + exporter_id, + exporters.iso_code2, + unit_id, + units.code, + units.name_en, + units.name_es, + units.name_fr, + term_id, + terms.code, + terms.name_en, + terms.name_es, + terms.name_fr + ) + SELECT + year, + appendix, + taxon_concept_id, + taxon, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id AS country_id, + importer AS country, + TRIM_DECIMAL_ZERO( + SUM(gross_quantity) + ) AS gross_quantity + FROM gross_net_subquery + GROUP BY + year, + appendix, + taxon_concept_id, + taxon, + taxon_concept_name_status, + term_id, + term, + term_name_en, + term_name_es, + term_name_fr, + unit_id, + unit, + unit_name_en, + unit_name_es, + unit_name_fr, + importer_id, + importer + ORDER BY + appendix, + taxon, + term, + unit, + country + ) + SELECT + imports.year, + imports.appendix, + imports.taxon_concept_id, + imports.taxon, + imports.term_id, + imports.term, + imports.term_name_en, + imports.term_name_es, + imports.term_name_fr, + imports.unit_id, + imports.unit, + imports.unit_name_en, + imports.unit_name_es, + imports.unit_name_fr, + imports.country_id, + imports.country, + TRIM_DECIMAL_ZERO( + CASE + WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) + ELSE NULL + END + ) AS gross_quantity + FROM imports + LEFT JOIN exports + ON exports.taxon_concept_id = imports.taxon_concept_id + AND exports.appendix = imports.appendix + AND exports.year = imports.year + AND exports.term_id = imports.term_id + AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) + AND exports.country_id = imports.country_id + WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 + ORDER BY + appendix, + taxon, + term, + unit, + country) subquery + ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') + AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) + ) ct_subquery + # ./app/models/trade/shipments_comptab_export.rb:9:in `query' + # ./spec/models/trade/shipments_net_imports_export_spec.rb:27:in `block (4 levels) in ' + + 765) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when split listing + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 766) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when old listing + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 767) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when old listing + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 768) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when appendix N and CITES listed + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 769) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when appendix N and CITES listed + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 770) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when reported under a synonym, but otherwise fine + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 771) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when hybrid + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 772) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when not CITES listed but EU listed + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist + LINE 1: SELECT * FROM rebuild_taxonomy() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM rebuild_taxonomy() + # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:91:in `each' + # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' + # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' + # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' + + 773) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when not CITES listed and not EU listed + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::RecordInvalid: + Validation failed: Name has already been taken + # ./spec/support/sapi_helpers.rb:4:in `cites_eu' + # ./spec/support/sapi_helpers.rb:303:in `block (3 levels) in ' + # ./spec/support/sapi_helpers.rb:236:in `cites_eu_plantae' + # ./spec/shared/agave.rb:14:in `block (2 levels) in ' + + 774) Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Animalia, source_code can't be A + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 775) Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Animalia, source_code can't be A + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 776) Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Plantae, source_code can't be C or R + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 777) Trade::ValidationRule matching_records_for_aru_and_error + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 778) Trade::ValidationRule refresh_errors_if_needed when no updates + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 779) Trade::ValidationRule refresh_errors_if_needed when updates and error fixed for all records error record is destroyed + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 780) Trade::ValidationRule refresh_errors_if_needed when updates and error fixed for some records error record is updated to reflect new error_count + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 781) Trade::ValidationRule Trade::PresenceValidationRule validation_errors_for_aru trading_partner should not be blank + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 782) Trade::ValidationRule Trade::NumericalityValidationRule validation_errors_for_aru quantity should be a number + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 783) Trade::ValidationRule Trade::FormatValidationRule validation_errors_for_aru year should be a 4 digit value + Failure/Error: Unable to find matching line from backtrace + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist + LINE 1: SELECT * FROM drop_trade_sandboxes() + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM drop_trade_sandboxes() + # ./spec/spec_helper.rb:69:in `block (2 levels) in ' + + 784) EuRegulationActivationWorker Set new EU regulation to true + Failure/Error: EventListingChangesCopyWorker.drain + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2441, + 2442 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/eu_regulation_activation_worker_spec.rb:28:in `block (3 levels) in ' + + 785) EuRegulationActivationWorker Set new EU regulation to true + Failure/Error: EventListingChangesCopyWorker.drain + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2443, + 2444 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/eu_regulation_activation_worker_spec.rb:28:in `block (3 levels) in ' + + 786) EuRegulationActivationWorker Set new EU regulation to true Set old EU regulation to false + Failure/Error: EventListingChangesCopyWorker.drain + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2445, + 2446 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/eu_regulation_activation_worker_spec.rb:28:in `block (3 levels) in ' + + 787) EuRegulationActivationWorker Set new EU regulation to true Set old EU regulation to false + Failure/Error: EventListingChangesCopyWorker.drain + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2447, + 2448 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/eu_regulation_activation_worker_spec.rb:28:in `block (3 levels) in ' + + 788) EventListingChangesCopyWorker when copy into non-current regulation + Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2449, + 2450 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/event_listing_changes_copy_worker_spec.rb:41:in `block (3 levels) in ' + + 789) EventListingChangesCopyWorker when copy into non-current regulation + Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2451, + 2452 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/event_listing_changes_copy_worker_spec.rb:41:in `block (3 levels) in ' + + 790) EventListingChangesCopyWorker when copy into current regulation + Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2453, + 2454 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/event_listing_changes_copy_worker_spec.rb:47:in `block (3 levels) in ' + + 791) EventListingChangesCopyWorker when copy into current regulation + Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2455, + 2456 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/event_listing_changes_copy_worker_spec.rb:47:in `block (3 levels) in ' + + 792) EventListingChangesCopyWorker when exclusion + Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2457, + 2458 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/event_listing_changes_copy_worker_spec.rb:69:in `block (3 levels) in ' + + 793) EventListingChangesCopyWorker when exclusion + Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2459, + 2460 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/event_listing_changes_copy_worker_spec.rb:69:in `block (3 levels) in ' + + 794) EventListingChangesCopyWorker when exclusion + Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2461, + 2462 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/event_listing_changes_copy_worker_spec.rb:69:in `block (3 levels) in ' + + 795) EventListingChangesCopyWorker when exclusion + Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist + LINE 1: SELECT * FROM copy_listing_changes_across_events( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_listing_changes_across_events( + 2463, + 2464 + ) + # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' + # ./spec/workers/event_listing_changes_copy_worker_spec.rb:69:in `block (3 levels) in ' + + 796) QuotasCopyWorker Copy single quota, for a given year + Failure/Error: QuotasCopyWorker.new.perform(job_defaults) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:45:in `block (3 levels) in ' + + 797) QuotasCopyWorker Copy single quota, for a given year + Failure/Error: QuotasCopyWorker.new.perform(job_defaults) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:45:in `block (3 levels) in ' + + 798) QuotasCopyWorker Copy single quota, for a given year + Failure/Error: QuotasCopyWorker.new.perform(job_defaults) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:45:in `block (3 levels) in ' + + 799) QuotasCopyWorker Copy single quota, for a given year + Failure/Error: QuotasCopyWorker.new.perform(job_defaults) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:45:in `block (3 levels) in ' + + 800) QuotasCopyWorker Try to copy quota from wrong year + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2024, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:55:in `block (3 levels) in ' + + 801) QuotasCopyWorker Try to copy quota from wrong year + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2024, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:55:in `block (3 levels) in ' + + 802) QuotasCopyWorker Try to copy quota from wrong year + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2024, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:55:in `block (3 levels) in ' + + 803) QuotasCopyWorker Copy quota when there are no current quotas + Failure/Error: QuotasCopyWorker.new.perform(job_defaults) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:68:in `block (3 levels) in ' + + 804) QuotasCopyWorker Copy quota when there are no current quotas + Failure/Error: QuotasCopyWorker.new.perform(job_defaults) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:68:in `block (3 levels) in ' + + 805) QuotasCopyWorker Copy quota when there are no current quotas + Failure/Error: QuotasCopyWorker.new.perform(job_defaults) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:68:in `block (3 levels) in ' + + 806) QuotasCopyWorker When multiple quotas copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3416]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' + + 807) QuotasCopyWorker When multiple quotas copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3418]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' + + 808) QuotasCopyWorker When multiple quotas copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3420]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' + + 809) QuotasCopyWorker When multiple quotas copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3422]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' + + 810) QuotasCopyWorker When multiple quotas copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3424]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' + + 811) QuotasCopyWorker When multiple quotas copy quota for both countries + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3426,3427]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' + + 812) QuotasCopyWorker When multiple quotas copy quota for both countries + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3428,3429]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' + + 813) QuotasCopyWorker When multiple quotas copy quota for both countries + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3430,3431]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' + + 814) QuotasCopyWorker When multiple quotas copy quota for both countries + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3432,3433]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' + + 815) QuotasCopyWorker When multiple quotas copy quota for both countries + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3434,3435]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' + + 816) QuotasCopyWorker When multiple quotas don't copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3437]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' + + 817) QuotasCopyWorker When multiple quotas don't copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3439]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' + + 818) QuotasCopyWorker When multiple quotas don't copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3441]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' + + 819) QuotasCopyWorker When multiple quotas don't copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3443]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' + + 820) QuotasCopyWorker When multiple quotas don't copy quota for given country + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[3445]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' + + 821) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34866]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' + + 822) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34873]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' + + 823) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34884]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' + + 824) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34901]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' + + 825) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34906]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' + + 826) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34916,34923]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' + + 827) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34929,34931]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' + + 828) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34933,34941]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' + + 829) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34950,34957]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' + + 830) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[34962,34967]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' + + 831) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[34975]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' + + 832) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[34984]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' + + 833) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[34991]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' + + 834) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[35002]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' + + 835) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[35014]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' + + 836) QuotasCopyWorker When text to replace passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + 'Caviar Quota Forever', + 'Salmon is my favourite fish', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' + + 837) QuotasCopyWorker When text to replace passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + 'Caviar Quota Forever', + 'Salmon is my favourite fish', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' + + 838) QuotasCopyWorker When text to replace passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + 'Caviar Quota Forever', + 'Salmon is my favourite fish', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' + + 839) QuotasCopyWorker When text to replace passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + 'Caviar Quota Forever', + 'Salmon is my favourite fish', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' + + 840) QuotasCopyWorker When text to replace passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + 'Caviar Quota Forever', + 'Salmon is my favourite fish', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' + + 841) QuotasCopyWorker When text to replace passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + 'Caviar Quota Forever', + 'Salmon is my favourite fish', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' + + 842) QuotasCopyWorker When text to replace passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + 'Caviar Quota Forever', + 'Salmon is my favourite fish', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' + + 843) QuotasCopyWorker When text to replace passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + 'Caviar Quota Forever', + 'Salmon is my favourite fish', + NULL, + '' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' + + 844) QuotasCopyWorker When url passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + 'http://myurl.co.uk' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' + + 845) QuotasCopyWorker When url passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + 'http://myurl.co.uk' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' + + 846) QuotasCopyWorker When url passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + 'http://myurl.co.uk' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' + + 847) QuotasCopyWorker When url passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + 'http://myurl.co.uk' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' + + 848) QuotasCopyWorker When url passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + 'http://myurl.co.uk' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' + + 849) QuotasCopyWorker When url passed, should be replaced + Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) + ActiveRecord::StatementInvalid: + PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist + LINE 1: SELECT * FROM copy_quotas_across_years( + ^ + HINT: No function matches the given name and argument types. You might need to add explicit type casts. + : SELECT * FROM copy_quotas_across_years( + 2023, + '2024-01-04', + '2024-01-05', + '2024-01-04', + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + ARRAY[NULL]::integer[], + '', + '', + NULL, + 'http://myurl.co.uk' + ) + # ./app/workers/quotas_copy_worker.rb:22:in `perform' + # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' + +Deprecation Warnings: + +Requiring `rspec/autorun` when running RSpec via the `rspec` command is deprecated. Called from /usr/local/bundle/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:247:in `require'. + +Using `any_instance` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /SAPI/spec/controllers/admin/exports_controller_spec.rb:20:in `block (4 levels) in '. + +Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /SAPI/spec/controllers/admin/change_types_controller_spec.rb:14:in `block (3 levels) in '. + +`failure_message_for_should_not` is deprecated. Use `failure_message_when_negated` instead. Called from /usr/local/bundle/gems/cancan-1.6.10/lib/cancan/matchers.rb:11:in `block in '. + +`failure_message_for_should` is deprecated. Use `failure_message` instead. Called from /usr/local/bundle/gems/cancan-1.6.10/lib/cancan/matchers.rb:7:in `block in '. + + +If you need more of the backtrace for any of these deprecations to +identify where to make the necessary changes, you can configure +`config.raise_errors_for_deprecations!`, and it will turn the +deprecation warnings into errors, giving you the full backtrace. + +5 deprecation warnings total + +Finished in 13 minutes 38 seconds (files took 23.1 seconds to load) +2138 examples, 849 failures, 20 pending + +Failed examples: + +rspec ./spec/controllers/admin/documents_controller_spec.rb:35 # Admin::DocumentsController index GET index search runs a full text search on title +rspec ./spec/controllers/admin/event_documents_controller_spec.rb:22 # Admin::EventDocumentsController ordering POST update_order updates sort index for collection of documents +rspec ./spec/controllers/admin/exports_controller_spec.rb:18 # Admin::ExportsController GET download with data_type=Names all returns taxon concepts names file +rspec ./spec/controllers/admin/exports_controller_spec.rb:31 # Admin::ExportsController GET download with data_type=Names CITES_EU returns CITES_EU taxon concepts names file +rspec ./spec/controllers/admin/exports_controller_spec.rb:44 # Admin::ExportsController GET download with data_type=Names CMS returns CMS taxon concepts names file +rspec ./spec/controllers/admin/exports_controller_spec.rb:62 # Admin::ExportsController GET download with data_type=Distributions all returns taxon concepts distributions file +rspec ./spec/controllers/admin/exports_controller_spec.rb:76 # Admin::ExportsController GET download with data_type=Distributions CITES_EU returns CITES_EU taxon concepts distributions file +rspec ./spec/controllers/admin/exports_controller_spec.rb:90 # Admin::ExportsController GET download with data_type=Distributions CMS returns CMS taxon concepts distributions file +rspec ./spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb:7 # Api::V1::AutoCompleteTaxonConceptsController GET index returns 1 result when searching for species name and filtering for rank SPECIES +rspec ./spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb:14 # Api::V1::AutoCompleteTaxonConceptsController GET index returns 3 results when searching for species name and not filtering by rank +rspec ./spec/controllers/api/document_geo_entities_controller_spec.rb:26 # Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns Poland when searching by wolf +rspec ./spec/controllers/api/document_geo_entities_controller_spec.rb:31 # Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns 0 geo entities when no match for taxon name +rspec ./spec/controllers/api/document_geo_entities_controller_spec.rb:36 # Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns all geo entities when no taxon name given +rspec ./spec/controllers/api/events_controller_spec.rb:10 # Api::V1::EventsController GET index returns only E-library events most recent first +rspec ./spec/controllers/api/purposes_controller_spec.rb:8 # Api::V1::PurposesController GET index returns purposes +rspec ./spec/controllers/api/sources_controller_spec.rb:8 # Api::V1::SourcesController GET index returns sources +rspec ./spec/controllers/api/taxon_concepts_controller_spec.rb:5 # Api::V1::TaxonConceptsController GET index logs with Ahoy with different parameters +rspec ./spec/controllers/api/terms_controller_spec.rb:8 # Api::V1::TermsController GET index returns terms +rspec ./spec/controllers/api/units_controller_spec.rb:8 # Api::V1::UnitsController GET index returns units +rspec ./spec/controllers/checklist/taxon_concepts_controller_spec.rb:6 # Checklist::TaxonConceptsController XHR GET JSON autocomplete when searching by accepted name returns 1 result +rspec ./spec/controllers/checklist/taxon_concepts_controller_spec.rb:13 # Checklist::TaxonConceptsController XHR GET JSON autocomplete when query blank returns 0 results +rspec ./spec/controllers/cites_trade/exports_controller_spec.rb:14 # CitesTrade::ExportsController GET download comptab returns comptab shipments file +rspec ./spec/controllers/cites_trade/exports_controller_spec.rb:23 # CitesTrade::ExportsController GET download comptab logs download information from public interface to the TradeDataDownload model +rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:28 # CitesTrade::ShipmentsController GET index should return all comptab shipments +rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:32 # CitesTrade::ShipmentsController GET index should return all gross_exports shipments +rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:40 # CitesTrade::ShipmentsController GET index should return genus & species shipments when searching by genus +rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:47 # CitesTrade::ShipmentsController GET index should return family, genus & species shipments when searching by family +rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:54 # CitesTrade::ShipmentsController GET index should return genus shipments when searching by taxon +rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:9 # CitesTrade::ShipmentsController GET index serializer should return comptab export when report_type invalid +rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:15 # CitesTrade::ShipmentsController GET index serializer should return comptab export when report_type = comptab +rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:21 # CitesTrade::ShipmentsController GET index serializer should return gross net export when report_type = gross_exports +rspec ./spec/controllers/registrations_controller_spec.rb:49 # RegistrationsController when signing up should create an account with the role set to api +rspec ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:35 # Trade::AnnualReportUploadsController GET index should return all annual report uploads +rspec ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:39 # Trade::AnnualReportUploadsController GET index should return annual report uploads in progress +rspec ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:46 # Trade::AnnualReportUploadsController GET show should return success +rspec ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:53 # Trade::AnnualReportUploadsController POST create should return success in jQuery File Upload way +rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:35 # Trade::SandboxShipmentsController PUT update should return success when taxon_name not set +rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:42 # Trade::SandboxShipmentsController PUT update should return success when taxon_name does not exist +rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:52 # Trade::SandboxShipmentsController DELETE destroy should return success +rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:61 # Trade::SandboxShipmentsController POST update_batch should return success +rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:74 # Trade::SandboxShipmentsController POST destroy_batch should return success +rspec ./spec/controllers/trade/shipments_controller_spec.rb:10 # Trade::ShipmentsController GET index should return all shipments +rspec ./spec/controllers/trade/shipments_controller_spec.rb:14 # Trade::ShipmentsController GET index should return genus & species shipments when searching by genus +rspec ./spec/controllers/trade/shipments_controller_spec.rb:19 # Trade::ShipmentsController GET index should return 1 shipment when searching for reporter_type I +rspec ./spec/controllers/trade/shipments_controller_spec.rb:28 # Trade::ShipmentsController PUT update should auto resolve accepted taxon when blank +rspec ./spec/controllers/trade/shipments_controller_spec.rb:35 # Trade::ShipmentsController PUT update should not auto resolve accepted taxon when given +rspec ./spec/controllers/trade/shipments_controller_spec.rb:43 # Trade::ShipmentsController PUT update should delete orphaned permits +rspec ./spec/controllers/trade/shipments_controller_spec.rb:54 # Trade::ShipmentsController POST update_batch should change reporter type from I to E +rspec ./spec/controllers/trade/shipments_controller_spec.rb:71 # Trade::ShipmentsController POST update_batch should change reporter type from E to I +rspec ./spec/controllers/trade/shipments_controller_spec.rb:89 # Trade::ShipmentsController POST update_batch should update year +rspec ./spec/controllers/trade/shipments_controller_spec.rb:106 # Trade::ShipmentsController POST update_batch should auto resolve accepted taxon when blank +rspec ./spec/controllers/trade/shipments_controller_spec.rb:122 # Trade::ShipmentsController POST update_batch should not auto resolve accepted taxon when given +rspec ./spec/controllers/trade/shipments_controller_spec.rb:139 # Trade::ShipmentsController POST update_batch should set permit number to blank and delete orphaned permits +rspec ./spec/controllers/trade/shipments_controller_spec.rb:161 # Trade::ShipmentsController POST destroy_batch should delete 1 shipment +rspec ./spec/controllers/trade/shipments_controller_spec.rb:172 # Trade::ShipmentsController POST destroy_batch should delete 5 shipment +rspec ./spec/controllers/trade/shipments_controller_spec.rb:183 # Trade::ShipmentsController POST destroy_batch should delete 2 shipments +rspec ./spec/controllers/trade/shipments_controller_spec.rb:188 # Trade::ShipmentsController POST destroy_batch should delete 1 shipments +rspec ./spec/controllers/trade/shipments_controller_spec.rb:193 # Trade::ShipmentsController POST destroy_batch should delete all shipments +rspec ./spec/controllers/trade/shipments_controller_spec.rb:198 # Trade::ShipmentsController POST destroy_batch shouldn't delete any shipments +rspec ./spec/controllers/trade/shipments_controller_spec.rb:203 # Trade::ShipmentsController POST destroy_batch should delete 1 shipment +rspec ./spec/controllers/trade/shipments_controller_spec.rb:208 # Trade::ShipmentsController POST destroy_batch should delete 3 shipment +rspec ./spec/controllers/trade/shipments_controller_spec.rb:213 # Trade::ShipmentsController POST destroy_batch should delete 0 shipments +rspec ./spec/controllers/trade/shipments_controller_spec.rb:219 # Trade::ShipmentsController POST destroy_batch should delete 4 shipments +rspec ./spec/controllers/trade/shipments_controller_spec.rb:225 # Trade::ShipmentsController POST destroy_batch should delete orphaned permits +rspec ./spec/controllers/trade/shipments_controller_spec.rb:241 # Trade::ShipmentsController DELETE destroy should delete 1 shipment +rspec ./spec/controllers/trade/shipments_controller_spec.rb:245 # Trade::ShipmentsController DELETE destroy should delete orphaned permits +rspec ./spec/controllers/trade/validation_errors_controller_spec.rb:34 # Trade::ValidationErrorsController PUT update should update is_ignored +rspec ./spec/controllers/trade/validation_errors_controller_spec.rb:45 # Trade::ValidationErrorsController GET show should return success +rspec ./spec/models/api_request_spec.rb:63 # ApiRequest recent_requests +rspec ./spec/models/checklist/annotations_spec.rb:16 # Checklist ann_symbol for species Caiman latirostris +rspec ./spec/models/checklist/annotations_spec.rb:20 # Checklist ann_symbol for species Panax ginseng +rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:14 # Checklist search by cites populations when America +rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:25 # Checklist search by cites populations when Mexico +rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:36 # Checklist search by cites populations when Canada +rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:47 # Checklist search by cites populations when Argentina +rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:58 # Checklist search by cites populations when South America +rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:69 # Checklist search by cites populations when North America +rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:81 # Checklist search by cites populations when North America and Argentina +rspec ./spec/models/checklist/appendix_population_spec.rb:15 # Checklist search by cites populations when Nepal +rspec ./spec/models/checklist/appendix_population_spec.rb:26 # Checklist search by cites populations when Poland +rspec ./spec/models/checklist/appendix_population_spec.rb:40 # Checklist search by cites appendices when App I +rspec ./spec/models/checklist/appendix_population_spec.rb:51 # Checklist search by cites appendices when App II +rspec ./spec/models/checklist/appendix_population_spec.rb:62 # Checklist search by cites appendices when App III +rspec ./spec/models/checklist/appendix_population_spec.rb:78 # Checklist search by cites populations and appendices when Nepal when App I +rspec ./spec/models/checklist/appendix_population_spec.rb:90 # Checklist search by cites populations and appendices when Nepal when App II +rspec ./spec/models/checklist/appendix_population_spec.rb:104 # Checklist search by cites populations and appendices when Poland when App I +rspec ./spec/models/checklist/appendix_population_spec.rb:116 # Checklist search by cites populations and appendices when Poland when App II +rspec ./spec/models/checklist/appendix_population_spec.rb:130 # Checklist search by cites populations and appendices when Poland or Nepal when App I +rspec ./spec/models/checklist/appendix_population_spec.rb:142 # Checklist search by cites populations and appendices when Poland or Nepal when App II +rspec ./spec/models/checklist/appendix_population_spec.rb:156 # Checklist search by cites populations and appendices when App I or II when Poland +rspec ./spec/models/checklist/appendix_population_spec.rb:168 # Checklist search by cites populations and appendices when App I or II when Nepal +rspec ./spec/models/checklist/appendix_spec.rb:14 # Checklist when filtering by appendix I should return Cacatua goffiniana +rspec ./spec/models/checklist/appendix_spec.rb:18 # Checklist when filtering by appendix I should not return Agapornis roseicollis +rspec ./spec/models/checklist/common_names_spec.rb:19 # Checklist when common names displayed should return all English names for Arctocephalus australis: 'South American Fur Seal, Southern Fur Seal' +rspec ./spec/models/checklist/common_names_spec.rb:23 # Checklist when common names displayed should return all Spanish names for Arctocephalus australis: 'Lobo fino sudamericano, Oso marino austral' +rspec ./spec/models/checklist/common_names_spec.rb:27 # Checklist when common names displayed should return all French names for Arctocephalus australis: 'Otarie à fourrure australe' +rspec ./spec/models/checklist/common_names_spec.rb:31 # Checklist when common names displayed should return all English names for Arctocephalus spp.: 'Fur seals, Southern fur seals' +rspec ./spec/models/checklist/common_names_spec.rb:35 # Checklist when common names displayed should return all Spanish names for Arctocephalus spp.: 'Osos marinos' +rspec ./spec/models/checklist/common_names_spec.rb:39 # Checklist when common names displayed should return all French names for Arctocephalus spp.: 'Arctocéphales du sud, Otaries à fourrure, Otaries à fourrure du sud' +rspec ./spec/models/checklist/common_names_spec.rb:43 # Checklist when common names displayed should include a species without any common names defined +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:122 # Checklist::HigherTaxaInjector run when same phylum when two species from different classes +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:139 # Checklist::HigherTaxaInjector run when same phylum when two species from different classes and expand_headers set +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:158 # Checklist::HigherTaxaInjector run when same order when two species from different families +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:171 # Checklist::HigherTaxaInjector run when same order when two species from different families and skip family set +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:188 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:201 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species and skip family set +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:213 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species and expand headers set +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:228 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when two species +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:241 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when species and subspecies +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:256 # Checklist::HigherTaxaInjector higher_taxa_headers when same family when two species from different genera +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:271 # Checklist::HigherTaxaInjector higher_taxa_headers when same order when two species from different families +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:286 # Checklist::HigherTaxaInjector higher_taxa_headers when same order when two species from different families and expand headers set +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:301 # Checklist::HigherTaxaInjector higher_taxa_headers when same order when genus and different family +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:316 # Checklist::HigherTaxaInjector higher_taxa_headers when same order when family and genus in different family +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:333 # Checklist::HigherTaxaInjector higher_taxa_headers when same class when order and genus from different order +rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:348 # Checklist::HigherTaxaInjector higher_taxa_headers when same class when order and genus from different order and expand headers set +rspec ./spec/models/checklist/order_spec.rb:17 # Checklist when taxonomic order Plantae should include Agave (Agavaceae) before Panax (Araliaceae) +rspec ./spec/models/checklist/order_spec.rb:28 # Checklist when taxonomic order Animalia should include birds after last mammal +rspec ./spec/models/checklist/order_spec.rb:32 # Checklist when taxonomic order Animalia should include Falconiformes (Aves) before Psittaciformes (Aves) +rspec ./spec/models/checklist/order_spec.rb:36 # Checklist when taxonomic order Animalia should include Cathartidae within Falconiformes +rspec ./spec/models/checklist/order_spec.rb:42 # Checklist when taxonomic order Animalia should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) +rspec ./spec/models/checklist/order_spec.rb:46 # Checklist when taxonomic order Animalia should include Cathartidae (Falconiformes) before Cacatuidae (Psittaciformes) +rspec ./spec/models/checklist/order_spec.rb:50 # Checklist when taxonomic order Animalia should include Hirudo medicinalis at the very end (after all Chordata) +rspec ./spec/models/checklist/order_spec.rb:61 # Checklist when alphabetical order should include Falconiformes (Aves) before Psittaciformes (Aves) +rspec ./spec/models/checklist/order_spec.rb:65 # Checklist when alphabetical order should include Cathartidae before Falconiformes +rspec ./spec/models/checklist/order_spec.rb:69 # Checklist when alphabetical order should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) +rspec ./spec/models/checklist/order_spec.rb:73 # Checklist when alphabetical order should include Cathartidae (Falconiformes) after Cacatuidae (Psittaciformes) +rspec ./spec/models/checklist/pdf/history_annotations_key_spec.rb:59 # Checklist::Pdf::HistoryAnnotationsKey hash_annotations_key +rspec ./spec/models/checklist/pdf/history_spec.rb:38 # Checklist::Pdf::History higher_taxon_name when family +rspec ./spec/models/checklist/pdf/history_spec.rb:56 # Checklist::Pdf::History listed_taxon_name when family +rspec ./spec/models/checklist/pdf/history_spec.rb:71 # Checklist::Pdf::History listed_taxon_name when genus +rspec ./spec/models/checklist/pdf/history_spec.rb:99 # Checklist::Pdf::History annotation_for_language annotation with footnote +rspec ./spec/models/checklist/pdf/index_annotations_key_spec.rb:46 # Checklist::Pdf::IndexAnnotationsKey hash_annotations_key +rspec ./spec/models/checklist/pdf/index_annotations_key_spec.rb:102 # Checklist::Pdf::IndexAnnotationsKey non_hash_annotations_key +rspec ./spec/models/checklist/pdf/index_fetcher_spec.rb:49 # Checklist::Pdf::IndexFetcher with common names +rspec ./spec/models/checklist/pdf/index_fetcher_spec.rb:77 # Checklist::Pdf::IndexFetcher with synonyms and authors +rspec ./spec/models/checklist/scientific_name_spec.rb:15 # Checklist when filtering by name by scientific name +rspec ./spec/models/checklist/scientific_name_spec.rb:28 # Checklist when filtering by name by common name +rspec ./spec/models/checklist/synonyms_spec.rb:15 # Checklist when synonyms displayed should return Alligator cynocephalus as synonym for Caiman latirostris +rspec ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:13 # Species::TaxonConceptPrefixMatcher results when query in capital letters +rspec ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:22 # Species::TaxonConceptPrefixMatcher results when match on accepted name +rspec ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:31 # Species::TaxonConceptPrefixMatcher results when match on synonym +rspec ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:40 # Species::TaxonConceptPrefixMatcher results when match on common name +rspec ./spec/models/checklist/timeline_spec.rb:23 # Checklist::Timeline when deleted +rspec ./spec/models/checklist/timeline_spec.rb:24 # Checklist::Timeline when deleted +rspec ./spec/models/checklist/timeline_spec.rb:25 # Checklist::Timeline when deleted +rspec ./spec/models/checklist/timeline_spec.rb:83 # Checklist::Timeline when deleted from III multiple times +rspec ./spec/models/checklist/timeline_spec.rb:84 # Checklist::Timeline when deleted from III multiple times +rspec ./spec/models/checklist/timeline_spec.rb:85 # Checklist::Timeline when deleted from III multiple times +rspec ./spec/models/checklist/timeline_spec.rb:112 # Checklist::Timeline when deleted and then readded +rspec ./spec/models/checklist/timeline_spec.rb:113 # Checklist::Timeline when deleted and then readded +rspec ./spec/models/checklist/timeline_spec.rb:114 # Checklist::Timeline when deleted and then readded +rspec ./spec/models/checklist/timeline_spec.rb:154 # Checklist::Timeline when reservation withdrawn +rspec ./spec/models/checklist/timeline_spec.rb:155 # Checklist::Timeline when reservation withdrawn +rspec ./spec/models/checklist/timeline_spec.rb:156 # Checklist::Timeline when reservation withdrawn +rspec ./spec/models/checklist/timeline_spec.rb:202 # Checklist::Timeline when reservation withdrawn and then readded +rspec ./spec/models/checklist/timeline_spec.rb:203 # Checklist::Timeline when reservation withdrawn and then readded +rspec ./spec/models/checklist/timeline_spec.rb:204 # Checklist::Timeline when reservation withdrawn and then readded +rspec ./spec/models/checklist/timeline_spec.rb:205 # Checklist::Timeline when reservation withdrawn and then readded +rspec ./spec/models/checklist/timeline_spec.rb:227 # Checklist::Timeline when added multiple times +rspec ./spec/models/checklist/timeline_spec.rb:231 # Checklist::Timeline when added multiple times +rspec ./spec/models/checklist/timeline_spec.rb:232 # Checklist::Timeline when added multiple times +rspec ./spec/models/checklist/timeline_spec.rb:256 # Checklist::Timeline when automatic deletion from ancestor listing +rspec ./spec/models/checklist/timeline_spec.rb:260 # Checklist::Timeline when automatic deletion from ancestor listing +rspec ./spec/models/checklist/timeline_spec.rb:261 # Checklist::Timeline when automatic deletion from ancestor listing +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:25 # Checklist::TimelinesForTaxonConcept timelines when Appendix I +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:26 # Checklist::TimelinesForTaxonConcept timelines when Appendix I +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:46 # Checklist::TimelinesForTaxonConcept timelines when Appendix III +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:47 # Checklist::TimelinesForTaxonConcept timelines when Appendix III +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:67 # Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:68 # Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:69 # Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:81 # Checklist::TimelinesForTaxonConcept timeline_years when in 1990 +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:82 # Checklist::TimelinesForTaxonConcept timeline_years when in 1990 +rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:83 # Checklist::TimelinesForTaxonConcept timeline_years when in 1990 +rspec ./spec/models/cites_suspension_notification_spec.rb:85 # CitesSuspensionNotification destroy when dependent objects attached when confirmation notification, make sure it gets destroyed +rspec ./spec/models/dashboard_stats_species_spec.rb:35 # DashboardStats#species has one results for argentina +rspec ./spec/models/dashboard_stats_species_spec.rb:38 # DashboardStats#species has no results for ghana +rspec ./spec/models/dashboard_stats_trade_spec.rb:46 # DashboardStats#trade when no time range specified argentina should have 40 exported animals and no imports +rspec ./spec/models/dashboard_stats_trade_spec.rb:60 # DashboardStats#trade when time range specified argentina should have no exports in 2012-2012 +rspec ./spec/models/eu_decision_spec.rb:68 # EuDecision create downloads cache should be populated +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:101 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:102 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:108 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:115 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:122 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:129 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:136 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:142 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:149 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:150 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:156 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:163 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:170 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:177 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:26 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:27 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:28 # NomenclatureChange::ReassignmentCopyProcessor run when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:101 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:102 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:108 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:115 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:122 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:129 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:136 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:142 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:149 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:150 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:156 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:163 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:170 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:177 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:26 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:27 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:28 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:70 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:71 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:77 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:84 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:91 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:98 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:104 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:111 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:112 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:118 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:125 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:132 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:139 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:140 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:141 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:142 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation +rspec ./spec/models/species/common_names_export_spec.rb:32 # Species::CommonNamesExport export when results when file not cached +rspec ./spec/models/species/hybrid_prefix_matcher_spec.rb:14 # Species::TaxonConceptPrefixMatcher results when searching for hybrid when trade visibility +rspec ./spec/models/species/hybrid_prefix_matcher_spec.rb:24 # Species::TaxonConceptPrefixMatcher results when searching for hybrid when trade internal visibility +rspec ./spec/models/species/hybrid_prefix_matcher_spec.rb:33 # Species::TaxonConceptPrefixMatcher results when searching for hybrid when speciesplus visibility +rspec ./spec/models/species/invisible_subspecies_search_spec.rb:8 # Species::Search results when searching by scientific name when subspecies never listed +rspec ./spec/models/species/invisible_subspecies_search_spec.rb:9 # Species::Search results when searching by scientific name when subspecies never listed +rspec ./spec/models/species/listings_export_spec.rb:10 # Species::ListingsExport path +rspec ./spec/models/species/listings_export_spec.rb:21 # Species::ListingsExport export when no results +rspec ./spec/models/species/listings_export_spec.rb:42 # Species::ListingsExport export when results when file not cached +rspec ./spec/models/species/listings_export_spec.rb:48 # Species::ListingsExport export when results when file cached +rspec ./spec/models/species/listings_export_spec.rb:65 # Species::ListingsExport query when CITES when Appendix I +rspec ./spec/models/species/listings_export_spec.rb:75 # Species::ListingsExport query when CITES when Appendix I when Poland +rspec ./spec/models/species/listings_export_spec.rb:86 # Species::ListingsExport query when CITES when Appendix I when Nepal +rspec ./spec/models/species/listings_export_spec.rb:96 # Species::ListingsExport query when CITES when higher taxon ids +rspec ./spec/models/species/listings_export_spec.rb:111 # Species::ListingsExport query when CITES when implicitly listed subspecies present +rspec ./spec/models/species/listings_export_spec.rb:122 # Species::ListingsExport query when EU when Annex A +rspec ./spec/models/species/listings_export_spec.rb:132 # Species::ListingsExport query when EU when Annex A when Spain +rspec ./spec/models/species/listings_export_spec.rb:143 # Species::ListingsExport query when EU when Annex A when Nepal +rspec ./spec/models/species/listings_export_spec.rb:153 # Species::ListingsExport query when EU when higher taxon ids +rspec ./spec/models/species/orphaned_taxon_concepts_export_spec.rb:33 # Species::OrphanedTaxonConceptsExport export when results when file not cached +rspec ./spec/models/species/search_spec.rb:8 # Species::Search results when searching by scientific name when regular query +rspec ./spec/models/species/search_spec.rb:12 # Species::Search results when searching by scientific name when malicious query +rspec ./spec/models/species/search_spec.rb:16 # Species::Search results when searching by scientific name when leading whitespace +rspec ./spec/models/species/search_spec.rb:20 # Species::Search results when searching by scientific name when trailing whitespace +rspec ./spec/models/species/species_reference_output_spec.rb:32 # Species::SpeciesReferenceOutputExport export when results when file not cached +rspec ./spec/models/species/standard_reference_output_spec.rb:32 # Species::StandardReferenceOutputExport export when results when file not cached +rspec ./spec/models/species/synonyms_and_trade_names_export_spec.rb:38 # Species::SynonymsAndTradeNamesExport export when results when file not cached +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:14 # Species::TaxonConceptPrefixMatcher results when searching by common name when searching by hyphenated common name +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:23 # Species::TaxonConceptPrefixMatcher results when searching by common name when searching by hyphenated common name without hyphens +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:32 # Species::TaxonConceptPrefixMatcher results when searching by common name when searching by part of hyphenated common name +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:43 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when regular query +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:52 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when malicious query +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:61 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when leading whitespace +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:70 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when trailing whitespace +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:79 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when implicitly listed subspecies +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:88 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed subspecies +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:97 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when implicitly listed higher taxon (without an explicitly listed ancestor) +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:106 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:117 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon but ranks expected FAMILY +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:127 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon but ranks expected SPECIES +rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:137 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when searching for name that matches Species and Subspecies but ranks expected SUBSPECIES +rspec ./spec/models/species/taxon_concepts_export_spec.rb:32 # Species::TaxonConceptsNamesExport export when results when file not cached +rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:39 # Species::TaxonConceptPrefixMatcher results when searching for status N species when trade visibility +rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:49 # Species::TaxonConceptPrefixMatcher results when searching for status N species when trade internal visibility +rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:58 # Species::TaxonConceptPrefixMatcher results when searching for status N species when speciesplus visibility +rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:70 # Species::TaxonConceptPrefixMatcher results when searching for trade name when trade visibility +rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:71 # Species::TaxonConceptPrefixMatcher results when searching for trade name when trade visibility +rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:81 # Species::TaxonConceptPrefixMatcher results when searching for trade name when trade internal visibility +rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:82 # Species::TaxonConceptPrefixMatcher results when searching for trade name when trade internal visibility +rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:91 # Species::TaxonConceptPrefixMatcher results when searching for trade name when speciesplus visibility +rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:92 # Species::TaxonConceptPrefixMatcher results when searching for trade name when speciesplus visibility +rspec ./spec/models/species/visible_subspecies_search_spec.rb:8 # Species::Search results when searching by scientific name when subspecies previously listed +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:10 # TaxonConcept Agalychnis REFERENCES cites_accepted for class Amphibia +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:13 # TaxonConcept Agalychnis REFERENCES cites_accepted for family Hylidae +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:16 # TaxonConcept Agalychnis REFERENCES cites_accepted for genus Agalychnis +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:21 # TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for class Amphibia +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:24 # TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for family Hylidae +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:27 # TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for genus Agalychnis +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:34 # TaxonConcept Agalychnis LISTING cites_listing for genus Agalychnis +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:40 # TaxonConcept Agalychnis LISTING eu_listing for genus Agalychnis +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:46 # TaxonConcept Agalychnis LISTING cites_listed for family Hylidae +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:49 # TaxonConcept Agalychnis LISTING cites_listed for genus Agalychnis +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:55 # TaxonConcept Agalychnis LISTING eu_listed for family Hylidae +rspec ./spec/models/taxon_concept/agalychnis_spec.rb:58 # TaxonConcept Agalychnis LISTING eu_listed for genus Agalychnis +rspec ./spec/models/taxon_concept/agave_spec.rb:10 # TaxonConcept Agave LISTING cites_listing for species Agave parviflora +rspec ./spec/models/taxon_concept/agave_spec.rb:13 # TaxonConcept Agave LISTING cites_listing for species Agave arizonica +rspec ./spec/models/taxon_concept/agave_spec.rb:19 # TaxonConcept Agave LISTING cites_listed for species Agave parviflora +rspec ./spec/models/taxon_concept/agave_spec.rb:22 # TaxonConcept Agave LISTING cites_listed for species Agave arizonica +rspec ./spec/models/taxon_concept/agave_spec.rb:28 # TaxonConcept Agave LISTING cites_show for species Agave parviflora +rspec ./spec/models/taxon_concept/agave_spec.rb:31 # TaxonConcept Agave LISTING cites_show for species Agave arizonica +rspec ./spec/models/taxon_concept/agave_spec.rb:37 # TaxonConcept Agave LISTING eu_listing for species Agave parviflora +rspec ./spec/models/taxon_concept/agave_spec.rb:40 # TaxonConcept Agave LISTING eu_listing for species Agave arizonica +rspec ./spec/models/taxon_concept/agave_spec.rb:46 # TaxonConcept Agave LISTING eu_listed for species Agave parviflora +rspec ./spec/models/taxon_concept/agave_spec.rb:49 # TaxonConcept Agave LISTING eu_listed for species Agave arizonica +rspec ./spec/models/taxon_concept/agave_spec.rb:55 # TaxonConcept Agave LISTING eu_show for species Agave parviflora +rspec ./spec/models/taxon_concept/agave_spec.rb:58 # TaxonConcept Agave LISTING eu_show for species Agave arizonica +rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:10 # TaxonConcept Ailuropoda LISTING cites_listing for species Ailuropoda melanoleuca +rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:13 # TaxonConcept Ailuropoda LISTING cites_listing for genus level Ailuropoda +rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:19 # TaxonConcept Ailuropoda LISTING eu_listing for species Ailuropoda melanoleuca +rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:22 # TaxonConcept Ailuropoda LISTING eu_listing for genus level Ailuropoda +rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:28 # TaxonConcept Ailuropoda LISTING cites_listed for genus Ailuropoda +rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:31 # TaxonConcept Ailuropoda LISTING cites_listed for species Ailuropoda melanoleuca +rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:37 # TaxonConcept Ailuropoda LISTING eu_listed for genus Ailuropoda +rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:40 # TaxonConcept Ailuropoda LISTING eu_listed for species Ailuropoda melanoleuca +rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:9 # TaxonConcept Arctocephalus LISTING cites_listing should be II at species level Arctocephalus australis +rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:12 # TaxonConcept Arctocephalus LISTING cites_listing should be I at species level Arctocephalus townsendi +rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:15 # TaxonConcept Arctocephalus LISTING cites_listing should be I/II at genus level Arctocephalus +rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:21 # TaxonConcept Arctocephalus LISTING cites_listed should be true for genus Arctocephalus +rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:24 # TaxonConcept Arctocephalus LISTING cites_listed should be true for species Arctocephalus townsendi +rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:27 # TaxonConcept Arctocephalus LISTING cites_listed should be false for species Arctocephalus australis (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:33 # TaxonConcept Arctocephalus LISTING eu_listed should be true for genus Arctocephalus +rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:36 # TaxonConcept Arctocephalus LISTING eu_listed should be true for species Arctocephalus townsendi +rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:39 # TaxonConcept Arctocephalus LISTING eu_listed should be false for species Arctocephalus australis (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:9 # TaxonConcept Boa constrictor TAXONOMY full_name for subspecies Boa constrictor occidentalis +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:12 # TaxonConcept Boa constrictor TAXONOMY full_name for species Boa constrictor +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:15 # TaxonConcept Boa constrictor TAXONOMY full_name for genus Boa +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:21 # TaxonConcept Boa constrictor TAXONOMY ancestors family +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:24 # TaxonConcept Boa constrictor TAXONOMY ancestors order +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:27 # TaxonConcept Boa constrictor TAXONOMY ancestors class +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:35 # TaxonConcept Boa constrictor LISTING cites_listing for subspecies Boa constrictor occidentalis +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:38 # TaxonConcept Boa constrictor LISTING cites_listing for subspecies Boa constrictor constrictor +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:41 # TaxonConcept Boa constrictor LISTING cites_listing for species Boa constrictor +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:47 # TaxonConcept Boa constrictor LISTING eu_listing for subspecies Boa constrictor occidentalis +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:50 # TaxonConcept Boa constrictor LISTING eu_listing for subspecies Boa constrictor constrictor +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:53 # TaxonConcept Boa constrictor LISTING eu_listing for species Boa constrictor +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:59 # TaxonConcept Boa constrictor LISTING cites_listed for family Boidae +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:62 # TaxonConcept Boa constrictor LISTING cites_listed for genus Boa +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:65 # TaxonConcept Boa constrictor LISTING cites_listed for species Boa constrictor (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:68 # TaxonConcept Boa constrictor LISTING cites_listed for subspecies Boa constrictor occidentalis +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:71 # TaxonConcept Boa constrictor LISTING cites_listed for subspecies Boa constrictor constrictor +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:77 # TaxonConcept Boa constrictor LISTING cites_show for family Boidae +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:80 # TaxonConcept Boa constrictor LISTING cites_show for genus Boa +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:83 # TaxonConcept Boa constrictor LISTING cites_show for species Boa constrictor (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:86 # TaxonConcept Boa constrictor LISTING cites_show for subspecies Boa constrictor occidentalis +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:89 # TaxonConcept Boa constrictor LISTING cites_show for subspecies Boa constrictor constrictor +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:95 # TaxonConcept Boa constrictor LISTING cites_listed_descendants for family Boidae +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:98 # TaxonConcept Boa constrictor LISTING cites_listed_descendants for genus Boa +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:101 # TaxonConcept Boa constrictor LISTING cites_listed_descendants for species Boa constrictor (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:104 # TaxonConcept Boa constrictor LISTING cites_listed_descendants for subspecies Boa constrictor occidentalis +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:110 # TaxonConcept Boa constrictor LISTING eu_listed for family Boidae +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:113 # TaxonConcept Boa constrictor LISTING eu_listed for genus Boa +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:116 # TaxonConcept Boa constrictor LISTING eu_listed for species Boa constrictor (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:119 # TaxonConcept Boa constrictor LISTING eu_listed for subspecies Boa constrictor occidentalis +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:125 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for family Boidae +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:128 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for genus Boa +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:131 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for species Boa constrictor (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:134 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for subspecies Boa constrictor occidentalis +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:137 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for subspecies Boa constrictor constrictor +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:143 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for family Boidae +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:146 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for genus Boa +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:149 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for species Boa constrictor (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:152 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for subspecies Boa constrictor occidentalis +rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:155 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for subspecies Boa constrictor constrictor +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:10 # TaxonConcept Caiman latirostris TAXONOMY full_name for species synonym Alligator cynocephalus +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:15 # TaxonConcept Caiman latirostris TAXONOMY rank_name for species synonym Alligator cynocephalus +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:23 # TaxonConcept Caiman latirostris REFERENCES cites_accepted for species Caiman latirostris +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:26 # TaxonConcept Caiman latirostris REFERENCES cites_accepted for synonym species Alligator cynocephalus +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:31 # TaxonConcept Caiman latirostris REFERENCES standard_taxon_concept_references for species Caiman latirostris +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:38 # TaxonConcept Caiman latirostris LISTING cites_listing for species Caiman latirostris +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:44 # TaxonConcept Caiman latirostris LISTING eu_listing for species Caiman latirostris +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:50 # TaxonConcept Caiman latirostris LISTING cites_listed for order Crocodylia +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:53 # TaxonConcept Caiman latirostris LISTING cites_listed for family Alligatoridae +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:56 # TaxonConcept Caiman latirostris LISTING cites_listed for genus Caiman +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:59 # TaxonConcept Caiman latirostris LISTING cites_listed for species Caiman latoristris +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:65 # TaxonConcept Caiman latirostris LISTING eu_listed for order Crocodylia +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:68 # TaxonConcept Caiman latirostris LISTING eu_listed for family Alligatoridae +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:71 # TaxonConcept Caiman latirostris LISTING eu_listed for genus Caiman +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:74 # TaxonConcept Caiman latirostris LISTING eu_listed for species Caiman latoristris +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:80 # TaxonConcept Caiman latirostris LISTING cites_show for order Crocodylia +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:83 # TaxonConcept Caiman latirostris LISTING cites_show for family Alligatoridae +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:86 # TaxonConcept Caiman latirostris LISTING cites_show for genus Caiman +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:89 # TaxonConcept Caiman latirostris LISTING cites_show for species Caiman latoristris +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:92 # TaxonConcept Caiman latirostris LISTING cites_show for synonym species Alligator cynocephalus +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:98 # TaxonConcept Caiman latirostris LISTING ann_symbol for species Caiman latirostris +rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:104 # TaxonConcept Caiman latirostris LISTING hash_ann_symbol for species Caiman latirostris +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:9 # TaxonConcept Canis lupus LISTING cites_listing for species Canis lupus (population split listing) +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:15 # TaxonConcept Canis lupus LISTING eu_listing for species Canis lupus (population split listing) +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:21 # TaxonConcept Canis lupus LISTING cites_listed for species Canis lupus +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:24 # TaxonConcept Canis lupus LISTING cites_listed for subspecies Canis lupus crassodon +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:30 # TaxonConcept Canis lupus LISTING eu_listed for species Canis lupus +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:36 # TaxonConcept Canis lupus LISTING show_in_species_plus_ac for species Canis lupus +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:39 # TaxonConcept Canis lupus LISTING show_in_species_plus_ac for subspecies Canis lupus crassodon +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:45 # TaxonConcept Canis lupus LISTING show_in_checklist_ac for species Canis lupus +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:48 # TaxonConcept Canis lupus LISTING show_in_checklist_ac for subspecies Canis lupus crassodon +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:54 # TaxonConcept Canis lupus LISTING show_in_species_plus for species Canis lupus +rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:57 # TaxonConcept Canis lupus LISTING show_in_species_plus for subspecies Canis lupus crassodon +rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:10 # TaxonConcept Caretta caretta CMS LISTING cms_listing for family Cheloniidae +rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:13 # TaxonConcept Caretta caretta CMS LISTING cms_listing for species Caretta caretta +rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:19 # TaxonConcept Caretta caretta CMS LISTING cms_listed for family Cheloniidae +rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:22 # TaxonConcept Caretta caretta CMS LISTING cms_listed for species Caretta caretta +rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:30 # TaxonConcept Caretta caretta CMS CASCADING LISTING current_cms_additions for family Cheloniidae +rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:35 # TaxonConcept Caretta caretta CMS CASCADING LISTING current_cms_additions for species Caretta caretta +rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:10 # TaxonConcept Cedrela montana LISTING cites_listing for species Cedrela montana +rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:16 # TaxonConcept Cedrela montana LISTING cites_listed for species Cedrela montana +rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:22 # TaxonConcept Cedrela montana LISTING cites_show for species Cedrela montana +rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:28 # TaxonConcept Cedrela montana LISTING eu_listing for species Cedrela montana +rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:34 # TaxonConcept Cedrela montana LISTING eu_listed for species Cedrela montana +rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:40 # TaxonConcept Cedrela montana LISTING eu_show for species Cedrela montana +rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:10 # TaxonConcept Cervus elphus CMS LISTING cms_listing for species Cervus elaphus +rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:13 # TaxonConcept Cervus elphus CMS LISTING cms_listing for subspecies Cervus elaphus bactrianus +rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:16 # TaxonConcept Cervus elphus CMS LISTING cms_listing for subspecies Cervus elaphus barbarus +rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:22 # TaxonConcept Cervus elphus CMS LISTING show_in_species_plus_ac for subspecies Cervus elaphus bactrianus (instrument) +rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:25 # TaxonConcept Cervus elphus CMS LISTING show_in_species_plus_ac for subspecies Cervus elaphus barbarus (listing) +rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:31 # TaxonConcept Cervus elphus CMS LISTING show_in_species_plus for subspecies Cervus elaphus bactrianus (instrument) +rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:34 # TaxonConcept Cervus elphus CMS LISTING show_in_species_plus for subspecies Cervus elaphus barbarus (listing) +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:10 # TaxonConcept Cervus elaphus TAXONOMY full_name for subspecies Cervus elaphus bactrianus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:13 # TaxonConcept Cervus elaphus TAXONOMY full_name for species Cervus elaphus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:16 # TaxonConcept Cervus elaphus TAXONOMY full_name for genus Cervus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:24 # TaxonConcept Cervus elaphus LISTING cites_listing for species Cervus elaphus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:27 # TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus bactrianus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:30 # TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus barbarus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:33 # TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus hanglu +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:36 # TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus canadensis +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:42 # TaxonConcept Cervus elaphus LISTING eu_listing for species Cervus elaphus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:45 # TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus bactrianus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:48 # TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus barbarus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:51 # TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus hanglu +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:54 # TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus canadensis +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:60 # TaxonConcept Cervus elaphus LISTING cites_listed for order Artiodactyla +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:63 # TaxonConcept Cervus elaphus LISTING cites_listed for family Cervidae +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:66 # TaxonConcept Cervus elaphus LISTING cites_listed for genus Cervus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:69 # TaxonConcept Cervus elaphus LISTING cites_listed for species Cervus elaphus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:72 # TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus bactrianus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:75 # TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus barbarus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:78 # TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus hanglu +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:81 # TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus canadensis +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:87 # TaxonConcept Cervus elaphus LISTING eu_listed for order Artiodactyla +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:90 # TaxonConcept Cervus elaphus LISTING eu_listed for family Cervidae +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:93 # TaxonConcept Cervus elaphus LISTING eu_listed for genus Cervus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:96 # TaxonConcept Cervus elaphus LISTING eu_listed for species Cervus elaphus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:99 # TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus bactrianus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:102 # TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus barbarus +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:105 # TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus hanglu +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:108 # TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus canadensis +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:114 # TaxonConcept Cervus elaphus LISTING cites_show for subspecies Cervus elaphus hanglu +rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:117 # TaxonConcept Cervus elaphus LISTING cites_show for subspecies Cervus elaphus canadensis +rspec ./spec/models/taxon_concept/colophon_spec.rb:10 # TaxonConcept Colophon LISTING cites_listing for genus Colophon +rspec ./spec/models/taxon_concept/colophon_spec.rb:13 # TaxonConcept Colophon LISTING cites_listing for species Colophon barnardi +rspec ./spec/models/taxon_concept/colophon_spec.rb:19 # TaxonConcept Colophon LISTING eu_listing for genus Colophon +rspec ./spec/models/taxon_concept/colophon_spec.rb:22 # TaxonConcept Colophon LISTING eu_listing for species Colophon barnardi +rspec ./spec/models/taxon_concept/colophon_spec.rb:28 # TaxonConcept Colophon LISTING cites_listed for genus Colophon +rspec ./spec/models/taxon_concept/colophon_spec.rb:31 # TaxonConcept Colophon LISTING cites_listed for species Colophon barnardi +rspec ./spec/models/taxon_concept/colophon_spec.rb:37 # TaxonConcept Colophon LISTING eu_listed for genus Colophon +rspec ./spec/models/taxon_concept/colophon_spec.rb:40 # TaxonConcept Colophon LISTING eu_listed for species Colophon barnardi +rspec ./spec/models/taxon_concept/colophon_spec.rb:46 # TaxonConcept Colophon LISTING cites_show for order Coleoptera +rspec ./spec/models/taxon_concept/colophon_spec.rb:49 # TaxonConcept Colophon LISTING cites_show for family Lucanidae +rspec ./spec/models/taxon_concept/colophon_spec.rb:55 # TaxonConcept Colophon LISTING current_party_ids for genus Colophon +rspec ./spec/models/taxon_concept/colophon_spec.rb:58 # TaxonConcept Colophon LISTING current_party_ids for species Colophon barnardi +rspec ./spec/models/taxon_concept/dalbergia_spec.rb:10 # TaxonConcept Dalbergia LISTING cites_listing for species Dalbergia abbreviata +rspec ./spec/models/taxon_concept/dalbergia_spec.rb:13 # TaxonConcept Dalbergia LISTING cites_listing for species Dalbergia abrahamii +rspec ./spec/models/taxon_concept/dalbergia_spec.rb:19 # TaxonConcept Dalbergia LISTING cites_listed for species Dalbergia abbreviata +rspec ./spec/models/taxon_concept/dalbergia_spec.rb:22 # TaxonConcept Dalbergia LISTING cites_listed for species Dalbergia abrahamii +rspec ./spec/models/taxon_concept/dalbergia_spec.rb:28 # TaxonConcept Dalbergia LISTING cites_show for species Dalbergia abbreviata +rspec ./spec/models/taxon_concept/dalbergia_spec.rb:31 # TaxonConcept Dalbergia LISTING cites_show for species Dalbergia abrahamii +rspec ./spec/models/taxon_concept/diospyros_spec.rb:10 # TaxonConcept Diospyros LISTING cites_listing for species Diospyros aculeata +rspec ./spec/models/taxon_concept/diospyros_spec.rb:13 # TaxonConcept Diospyros LISTING cites_listing for species Diospyros acuta +rspec ./spec/models/taxon_concept/diospyros_spec.rb:19 # TaxonConcept Diospyros LISTING cites_listed for species Diospyros aculeata +rspec ./spec/models/taxon_concept/diospyros_spec.rb:22 # TaxonConcept Diospyros LISTING cites_listed for species Diospyros acuta +rspec ./spec/models/taxon_concept/diospyros_spec.rb:28 # TaxonConcept Diospyros LISTING cites_show for species Diospyros aculeata +rspec ./spec/models/taxon_concept/diospyros_spec.rb:31 # TaxonConcept Diospyros LISTING cites_show for species Diospyros acuta +rspec ./spec/models/taxon_concept/diospyros_spec.rb:37 # TaxonConcept Diospyros LISTING eu_listing for species Diospyros aculeata +rspec ./spec/models/taxon_concept/diospyros_spec.rb:40 # TaxonConcept Diospyros LISTING eu_listing for species Diospyros acuta +rspec ./spec/models/taxon_concept/diospyros_spec.rb:46 # TaxonConcept Diospyros LISTING eu_listed for species Diospyros aculeata +rspec ./spec/models/taxon_concept/diospyros_spec.rb:49 # TaxonConcept Diospyros LISTING eu_listed for species Diospyros acuta +rspec ./spec/models/taxon_concept/diospyros_spec.rb:55 # TaxonConcept Diospyros LISTING eu_show for species Diospyros aculeata +rspec ./spec/models/taxon_concept/diospyros_spec.rb:58 # TaxonConcept Diospyros LISTING eu_show for species Diospyros acuta +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:10 # TaxonConcept Falconiformes TAXONOMY rank_name for Falco hybrid +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:18 # TaxonConcept Falconiformes LISTING cites_listing for order Falconiformes +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:21 # TaxonConcept Falconiformes LISTING cites_listing for species Falco araea +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:24 # TaxonConcept Falconiformes LISTING cites_listing for species Falco alopex (H) +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:27 # TaxonConcept Falconiformes LISTING cites_listing for species Gymnogyps californianus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:30 # TaxonConcept Falconiformes LISTING cites_listing for species Sarcoramphus papa +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:33 # TaxonConcept Falconiformes LISTING cites_listing for species Vultur atratus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:39 # TaxonConcept Falconiformes LISTING eu_listing for order Falconiformes +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:42 # TaxonConcept Falconiformes LISTING eu_listing for species Falco araea +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:45 # TaxonConcept Falconiformes LISTING eu_listing for species Falco alopex (H) +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:48 # TaxonConcept Falconiformes LISTING eu_listing for species Gymnogyps californianus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:51 # TaxonConcept Falconiformes LISTING eu_listing for species Sarcoramphus papa +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:54 # TaxonConcept Falconiformes LISTING eu_listing for species Vultur atratus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:60 # TaxonConcept Falconiformes LISTING cites_status for genus Vultur +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:63 # TaxonConcept Falconiformes LISTING cites_status for species Vultur atratus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:69 # TaxonConcept Falconiformes LISTING cites_listed for order Falconiformes +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:72 # TaxonConcept Falconiformes LISTING cites_listed for family Falconidae (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:75 # TaxonConcept Falconiformes LISTING cites_listed for genus Falco +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:78 # TaxonConcept Falconiformes LISTING cites_listed for species Falco araea +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:81 # TaxonConcept Falconiformes LISTING cites_listed for species Falco alopex +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:84 # TaxonConcept Falconiformes LISTING cites_listed for species Vultur atratus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:87 # TaxonConcept Falconiformes LISTING cites_listed for subspecies Falco peregrinus peregrinus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:93 # TaxonConcept Falconiformes LISTING eu_listed for order Falconiformes +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:96 # TaxonConcept Falconiformes LISTING eu_listed for family Falconidae (inclusion in higher taxa listing) +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:99 # TaxonConcept Falconiformes LISTING eu_listed for genus Falco +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:102 # TaxonConcept Falconiformes LISTING eu_listed for species Falco araea +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:105 # TaxonConcept Falconiformes LISTING eu_listed for species Falco alopex +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:108 # TaxonConcept Falconiformes LISTING eu_listed for species Vultur atratus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:111 # TaxonConcept Falconiformes LISTING eu_listed for subspecies Falco peregrinus peregrinus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:117 # TaxonConcept Falconiformes LISTING cites_show for order Falconiformes +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:120 # TaxonConcept Falconiformes LISTING cites_show for family Falconidae +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:123 # TaxonConcept Falconiformes LISTING cites_show for Falco hybrid +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:129 # TaxonConcept Falconiformes LISTING show_in_checklist_ac for subspecies Falco peregrinus peregrinus +rspec ./spec/models/taxon_concept/falconiformes_spec.rb:135 # TaxonConcept Falconiformes LISTING show_in_species_plus_ac for subspecies Falco peregrinus peregrinus +rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:9 # TaxonConcept Loxodonta africana CMS TAXONOMY full_name for species Loxodonta africana +rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:12 # TaxonConcept Loxodonta africana CMS TAXONOMY full_name for genus Loxodonta +rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:17 # TaxonConcept Loxodonta africana CMS TAXONOMY rank for species Loxodonta africana +rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:22 # TaxonConcept Loxodonta africana CMS TAXONOMY ancestors family +rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:25 # TaxonConcept Loxodonta africana CMS TAXONOMY ancestors order +rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:28 # TaxonConcept Loxodonta africana CMS TAXONOMY ancestors class +rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:36 # TaxonConcept Loxodonta africana CMS LISTING cms_listing for species Loxodonta africana +rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:42 # TaxonConcept Loxodonta africana CMS LISTING cms_listed for species Loxodonta africana +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:9 # TaxonConcept Loxodonta africana TAXONOMY full_name for species Loxodonta africana +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:12 # TaxonConcept Loxodonta africana TAXONOMY full_name for genus Loxodonta +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:17 # TaxonConcept Loxodonta africana TAXONOMY rank for species Loxodonta africana +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:22 # TaxonConcept Loxodonta africana TAXONOMY ancestors family +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:25 # TaxonConcept Loxodonta africana TAXONOMY ancestors order +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:28 # TaxonConcept Loxodonta africana TAXONOMY ancestors class +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:36 # TaxonConcept Loxodonta africana LISTING cites_listing for species Loxodonta africana (population split listing) +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:42 # TaxonConcept Loxodonta africana LISTING eu_listing for species Loxodonta africana (population split listing) +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:48 # TaxonConcept Loxodonta africana LISTING cites_listed for species Loxodonta africana +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:51 # TaxonConcept Loxodonta africana LISTING cites_listed for family Elephantidae +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:57 # TaxonConcept Loxodonta africana LISTING eu_listed for species Loxodonta africana +rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:60 # TaxonConcept Loxodonta africana LISTING eu_listed for family Elephantidae +rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:9 # TaxonConcept Mellivora capensis LISTING cites_listing for species Mellivora capensis +rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:15 # TaxonConcept Mellivora capensis LISTING eu_listing for species Mellivora capensis +rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:21 # TaxonConcept Mellivora capensis LISTING cites_listed for family Mustelinae +rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:24 # TaxonConcept Mellivora capensis LISTING cites_listed for genus Mellivora +rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:27 # TaxonConcept Mellivora capensis LISTING cites_listed for species Mellivora capensis +rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:33 # TaxonConcept Mellivora capensis LISTING eu_listed for family Mustelinae +rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:36 # TaxonConcept Mellivora capensis LISTING eu_listed for genus Mellivora +rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:39 # TaxonConcept Mellivora capensis LISTING eu_listed for species Mellivora capensis +rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:45 # TaxonConcept Mellivora capensis LISTING current_party_ids for species Mellivora capensis +rspec ./spec/models/taxon_concept/moschus_spec.rb:10 # TaxonConcept Moschus LISTING cites_listing for genus Moschus +rspec ./spec/models/taxon_concept/moschus_spec.rb:13 # TaxonConcept Moschus LISTING cites_listing for species Moschus leucogaster +rspec ./spec/models/taxon_concept/moschus_spec.rb:16 # TaxonConcept Moschus LISTING cites_listing for species Moschus moschiferus +rspec ./spec/models/taxon_concept/moschus_spec.rb:19 # TaxonConcept Moschus LISTING cites_listing for subspecies Moschus moschiferus moschiferus +rspec ./spec/models/taxon_concept/moschus_spec.rb:25 # TaxonConcept Moschus LISTING cites_listed for genus Moschus +rspec ./spec/models/taxon_concept/moschus_spec.rb:28 # TaxonConcept Moschus LISTING cites_listed for species Moschus leucogaster +rspec ./spec/models/taxon_concept/moschus_spec.rb:31 # TaxonConcept Moschus LISTING cites_listed for species Moschus moschiferus +rspec ./spec/models/taxon_concept/moschus_spec.rb:34 # TaxonConcept Moschus LISTING cites_listed for subspecies Moschus moschiferus moschiferus +rspec ./spec/models/taxon_concept/moschus_spec.rb:42 # TaxonConcept Moschus CASCADING LISTING current_cites_additions for species Moschus leucogaster +rspec ./spec/models/taxon_concept/moschus_spec.rb:51 # TaxonConcept Moschus CASCADING LISTING current_cites_additions for species Moschus moschiferus +rspec ./spec/models/taxon_concept/moschus_spec.rb:60 # TaxonConcept Moschus CASCADING LISTING current_cites_additions for subspecies Moschus moschiferus moschiferus +rspec ./spec/models/taxon_concept/natator_depressus_spec.rb:10 # TaxonConcept Natator depressus LISTING cites_listing for family Cheloniidae +rspec ./spec/models/taxon_concept/natator_depressus_spec.rb:13 # TaxonConcept Natator depressus LISTING cites_listing for species Natator depressus +rspec ./spec/models/taxon_concept/notomys_aquilo_spec.rb:10 # TaxonConcept Notomys aquilo LISTING cites_listing for genus Notomys +rspec ./spec/models/taxon_concept/notomys_aquilo_spec.rb:13 # TaxonConcept Notomys aquilo LISTING cites_listing for species Notomys aquilo +rspec ./spec/models/taxon_concept/notomys_aquilo_spec.rb:19 # TaxonConcept Notomys aquilo LISTING cites_show for genus Notomys +rspec ./spec/models/taxon_concept/notomys_aquilo_spec.rb:22 # TaxonConcept Notomys aquilo LISTING cites_show for species Notomys aquilo +rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:11 # TaxonConcept Panax ginseng LISTING cites_listed for species Panax ginseng +rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:14 # TaxonConcept Panax ginseng LISTING cites_listed for genus Panax +rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:20 # TaxonConcept Panax ginseng LISTING eu_listed for species Panax ginseng +rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:23 # TaxonConcept Panax ginseng LISTING eu_listed for genus Panax +rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:29 # TaxonConcept Panax ginseng LISTING cites_listing for species Panax ginseng +rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:35 # TaxonConcept Panax ginseng LISTING eu_listing for species Panax ginseng +rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:41 # TaxonConcept Panax ginseng LISTING ann_symbol for species Panax ginseng +rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:47 # TaxonConcept Panax ginseng LISTING hash_ann_symbol for species Panax ginseng +rspec ./spec/models/taxon_concept/pereskia_spec.rb:10 # TaxonConcept Pereskia LISTING cites_listing for genus Pereskia (not listed, shown) +rspec ./spec/models/taxon_concept/pereskia_spec.rb:13 # TaxonConcept Pereskia LISTING cites_listing for genus Ariocarpus +rspec ./spec/models/taxon_concept/pereskia_spec.rb:16 # TaxonConcept Pereskia LISTING cites_listing for family Cactaceae +rspec ./spec/models/taxon_concept/pereskia_spec.rb:22 # TaxonConcept Pereskia LISTING eu_listing for genus Pereskia (not listed, shown) +rspec ./spec/models/taxon_concept/pereskia_spec.rb:25 # TaxonConcept Pereskia LISTING eu_listing for genus Ariocarpus +rspec ./spec/models/taxon_concept/pereskia_spec.rb:28 # TaxonConcept Pereskia LISTING eu_listing for family Cactaceae +rspec ./spec/models/taxon_concept/pereskia_spec.rb:34 # TaxonConcept Pereskia LISTING cites_listed for family Cactaceae +rspec ./spec/models/taxon_concept/pereskia_spec.rb:37 # TaxonConcept Pereskia LISTING cites_listed for genus Pereskia +rspec ./spec/models/taxon_concept/pereskia_spec.rb:43 # TaxonConcept Pereskia LISTING eu_listed for family Cactaceae +rspec ./spec/models/taxon_concept/pereskia_spec.rb:46 # TaxonConcept Pereskia LISTING eu_listed for genus Pereskia +rspec ./spec/models/taxon_concept/pereskia_spec.rb:52 # TaxonConcept Pereskia LISTING cites_status for genus Pereskia +rspec ./spec/models/taxon_concept/pereskia_spec.rb:58 # TaxonConcept Pereskia LISTING cites_show for genus Pereskia +rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:10 # TaxonConcept Platysternon megacephalum LISTING cites_listing for family Platysternidae +rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:13 # TaxonConcept Platysternon megacephalum LISTING cites_listing for species Platysternon megacephalum +rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:19 # TaxonConcept Platysternon megacephalum LISTING cites_listed for species Platysternon megacephalum +rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:25 # TaxonConcept Platysternon megacephalum LISTING cites_show for species Platysternon megacephalum +rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:31 # TaxonConcept Platysternon megacephalum LISTING eu_listing for family Platysternidae +rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:34 # TaxonConcept Platysternon megacephalum LISTING eu_listing for species Platysternon megacephalum +rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:40 # TaxonConcept Platysternon megacephalum LISTING eu_listed for species Platysternon megacephalum +rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:46 # TaxonConcept Platysternon megacephalum LISTING eu_show for species Platysternon megacephalum +rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:10 # TaxonConcept Pristis microdon LISTING cites_listing for family Pristidae +rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:13 # TaxonConcept Pristis microdon LISTING cites_listing for species Pristis microdon +rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:19 # TaxonConcept Pristis microdon LISTING cites_listed for species Pristis microdon +rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:25 # TaxonConcept Pristis microdon LISTING cites_show for species Pristis microdon +rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:31 # TaxonConcept Pristis microdon LISTING eu_listing for family Pristidae +rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:34 # TaxonConcept Pristis microdon LISTING eu_listing for species Pristis microdon +rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:40 # TaxonConcept Pristis microdon LISTING eu_listed for species Pristis microdon +rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:46 # TaxonConcept Pristis microdon LISTING eu_show for species Pristis microdon +rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:10 # TaxonConcept Pseudomys fieldi LISTING cites_listing for subspecies Pseudomys fieldi preaconis +rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:13 # TaxonConcept Pseudomys fieldi LISTING cites_listing for species Pseudomys fieldi +rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:19 # TaxonConcept Pseudomys fieldi LISTING eu_listing for subspecies Pseudomys fieldi preaconis +rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:22 # TaxonConcept Pseudomys fieldi LISTING eu_listing for species Pseudomys fieldi +rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:28 # TaxonConcept Pseudomys fieldi LISTING cites_show for subspecies Pseudomys fieldi preaconis +rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:31 # TaxonConcept Pseudomys fieldi LISTING cites_show for species Pseudomys fieldi +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:10 # TaxonConcept Psittaciformes LISTING cites_listing for order Psittaciformes +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:13 # TaxonConcept Psittaciformes LISTING cites_listing for species Cacatua goffiniana +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:16 # TaxonConcept Psittaciformes LISTING cites_listing for species Cacatua ducorpsi (H) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:19 # TaxonConcept Psittaciformes LISTING cites_listing for species Probosciger aterrimus +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:22 # TaxonConcept Psittaciformes LISTING cites_listing for species Amazona aestiva +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:25 # TaxonConcept Psittaciformes LISTING cites_listing for species Agapornis roseicollis (DEL II, not listed, not shown) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:28 # TaxonConcept Psittaciformes LISTING cites_listing for species Psittacula krameri (DEL III, not listed, not shown) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:31 # TaxonConcept Psittaciformes LISTING cites_listing for subspecies Amazona festiva festiva +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:37 # TaxonConcept Psittaciformes LISTING eu_listing for order Psittaciformes +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:40 # TaxonConcept Psittaciformes LISTING eu_listing for species Cacatua goffiniana +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:43 # TaxonConcept Psittaciformes LISTING eu_listing for species Cacatua ducorpsi (H) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:46 # TaxonConcept Psittaciformes LISTING eu_listing for species Probosciger aterrimus +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:49 # TaxonConcept Psittaciformes LISTING eu_listing for species Amazona aestiva +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:52 # TaxonConcept Psittaciformes LISTING eu_listing for species Agapornis roseicollis (DEL II, not listed, not shown) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:55 # TaxonConcept Psittaciformes LISTING eu_listing for species Psittacula krameri (DEL III, not listed, not shown) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:58 # TaxonConcept Psittaciformes LISTING eu_listing for subspecies Amazona festiva festiva +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:64 # TaxonConcept Psittaciformes LISTING cites_listed for order Psittaciformes +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:67 # TaxonConcept Psittaciformes LISTING cites_listed for family Cacatuidae +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:70 # TaxonConcept Psittaciformes LISTING cites_listed for genus Cacatua +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:73 # TaxonConcept Psittaciformes LISTING cites_listed for species Cacatua goffiniana +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:76 # TaxonConcept Psittaciformes LISTING cites_listed for species Cacatua ducorpsi +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:79 # TaxonConcept Psittaciformes LISTING cites_listed for subspecies Amazona festiva festiva +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:85 # TaxonConcept Psittaciformes LISTING eu_listed for order Psittaciformes +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:88 # TaxonConcept Psittaciformes LISTING eu_listed for family Cacatuidae +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:91 # TaxonConcept Psittaciformes LISTING eu_listed for genus Cacatua +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:94 # TaxonConcept Psittaciformes LISTING eu_listed for species Cacatua goffiniana +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:97 # TaxonConcept Psittaciformes LISTING eu_listed for species Cacatua ducorpsi +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:100 # TaxonConcept Psittaciformes LISTING eu_listed for subspecies Amazona festiva festiva +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:106 # TaxonConcept Psittaciformes LISTING cites_show for species Agapornis roseicollis (DEL II) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:109 # TaxonConcept Psittaciformes LISTING cites_show for species Amazona aestiva +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:112 # TaxonConcept Psittaciformes LISTING cites_show for species Psittacula krameri (DEL III) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:118 # TaxonConcept Psittaciformes LISTING cites_status for species Agapornis roseicollis (DEL II) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:121 # TaxonConcept Psittaciformes LISTING cites_status for species Psittacula krameri (DEL III) +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:127 # TaxonConcept Psittaciformes LISTING show_in_checklist_ac for subspecies Amazona festiva festiva +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:133 # TaxonConcept Psittaciformes LISTING show_in_species_plus_ac for subspecies Amazona festiva festiva +rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:139 # TaxonConcept Psittaciformes LISTING show_in_species_plus for subspecies Amazona festiva festiva +rspec ./spec/models/taxon_concept/synonyms_spec.rb:93 # TaxonConcept create when has accepted parent overnight calculations +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:9 # TaxonConcept Tapiridae TAXONOMY full_name for family Tapiridae +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:14 # TaxonConcept Tapiridae TAXONOMY rank for family Tapiridae +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:19 # TaxonConcept Tapiridae TAXONOMY ancestors order +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:22 # TaxonConcept Tapiridae TAXONOMY ancestors class +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:30 # TaxonConcept Tapiridae LISTING cites_listing for family Tapiridae +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:33 # TaxonConcept Tapiridae LISTING cites_listing for species Tapirus terrestris +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:39 # TaxonConcept Tapiridae LISTING eu_listing for family Tapiridae +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:42 # TaxonConcept Tapiridae LISTING eu_listing for species Tapirus terrestris +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:48 # TaxonConcept Tapiridae LISTING cites_listed for family Tapiridae +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:51 # TaxonConcept Tapiridae LISTING cites_listed for genus Tapirus +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:54 # TaxonConcept Tapiridae LISTING cites_listed for species Tapirus terrestris +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:60 # TaxonConcept Tapiridae LISTING eu_listed for family Tapiridae +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:63 # TaxonConcept Tapiridae LISTING eu_listed for genus Tapirus +rspec ./spec/models/taxon_concept/tapiridae_spec.rb:66 # TaxonConcept Tapiridae LISTING eu_listed for species Tapirus terrestris +rspec ./spec/models/taxon_concept/trade_names_spec.rb:93 # TaxonConcept create when has accepted parent overnight calculations +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:10 # TaxonConcept Uroplatus REFERENCES cites_accepted for genus Uroplatus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:13 # TaxonConcept Uroplatus REFERENCES cites_accepted for species Uroplatus alluaudi +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:16 # TaxonConcept Uroplatus REFERENCES cites_accepted for species Uroplatus giganteus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:21 # TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for family Gekkonidae +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:24 # TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for genus Uroplatus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:27 # TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for species Uroplatus alluaudi +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:30 # TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for species Uroplatus giganteus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:37 # TaxonConcept Uroplatus LISTING cites_listing for genus Uroplatus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:40 # TaxonConcept Uroplatus LISTING cites_listing for species Uroplatus giganteus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:46 # TaxonConcept Uroplatus LISTING eu_listing for genus Uroplatus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:49 # TaxonConcept Uroplatus LISTING eu_listing for species Uroplatus giganteus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:55 # TaxonConcept Uroplatus LISTING cites_listed for family Gekkonidae +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:58 # TaxonConcept Uroplatus LISTING cites_listed for genus Uroplatus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:61 # TaxonConcept Uroplatus LISTING cites_listed for species Uroplatus giganteus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:67 # TaxonConcept Uroplatus LISTING eu_listed for family Gekkonidae +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:70 # TaxonConcept Uroplatus LISTING eu_listed for genus Uroplatus +rspec ./spec/models/taxon_concept/uroplatus_spec.rb:73 # TaxonConcept Uroplatus LISTING eu_listed for species Uroplatus giganteus +rspec ./spec/models/taxon_concept/varanidae_spec.rb:10 # TaxonConcept Varanidae REFERENCES cites_accepted for species Varanus bengalensis +rspec ./spec/models/taxon_concept/varanidae_spec.rb:15 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for order Sauria +rspec ./spec/models/taxon_concept/varanidae_spec.rb:18 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for family Varanidae +rspec ./spec/models/taxon_concept/varanidae_spec.rb:21 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bengalensis +rspec ./spec/models/taxon_concept/varanidae_spec.rb:24 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bushi +rspec ./spec/models/taxon_concept/varanidae_spec.rb:25 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bushi +rspec ./spec/models/taxon_concept/varanidae_spec.rb:32 # TaxonConcept Varanidae LISTING cites_listing for genus Varanus +rspec ./spec/models/taxon_concept/varanidae_spec.rb:35 # TaxonConcept Varanidae LISTING cites_listing for species Varanus bengalensis +rspec ./spec/models/taxon_concept/varanidae_spec.rb:41 # TaxonConcept Varanidae LISTING eu_listing for genus Varanus +rspec ./spec/models/taxon_concept/varanidae_spec.rb:44 # TaxonConcept Varanidae LISTING eu_listing for species Varanus bengalensis +rspec ./spec/models/taxon_concept/varanidae_spec.rb:50 # TaxonConcept Varanidae LISTING cites_listed for family Varanidae +rspec ./spec/models/taxon_concept/varanidae_spec.rb:53 # TaxonConcept Varanidae LISTING cites_listed for genus Varanus +rspec ./spec/models/taxon_concept/varanidae_spec.rb:56 # TaxonConcept Varanidae LISTING cites_listed for species Varanus bengalensis +rspec ./spec/models/taxon_concept/varanidae_spec.rb:62 # TaxonConcept Varanidae LISTING eu_listed for family Varanidae +rspec ./spec/models/taxon_concept/varanidae_spec.rb:65 # TaxonConcept Varanidae LISTING eu_listed for genus Varanus +rspec ./spec/models/taxon_concept/varanidae_spec.rb:68 # TaxonConcept Varanidae LISTING eu_listed for species Varanus bengalensis +rspec ./spec/models/trade/annual_report_upload_spec.rb:54 # Trade::AnnualReportUpload valid? when uploaded file as exporter with exporter column headers +rspec ./spec/models/trade/annual_report_upload_spec.rb:64 # Trade::AnnualReportUpload valid? when uploaded file as importer with exporter column headers +rspec ./spec/models/trade/annual_report_upload_spec.rb:74 # Trade::AnnualReportUpload valid? when uploaded file as importer with importer column headers +rspec ./spec/models/trade/annual_report_upload_spec.rb:84 # Trade::AnnualReportUpload valid? when uploaded file as exporter with importer column headers +rspec ./spec/models/trade/annual_report_upload_spec.rb:99 # Trade::AnnualReportUpload validation_errors +rspec ./spec/models/trade/annual_report_upload_spec.rb:112 # Trade::AnnualReportUpload create when blank lines in import file +rspec ./spec/models/trade/annual_report_upload_spec.rb:127 # Trade::AnnualReportUpload destroy +rspec ./spec/models/trade/distinct_values_validation_rule_spec.rb:52 # Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal importer (E) +rspec ./spec/models/trade/distinct_values_validation_rule_spec.rb:69 # Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal importer (I) +rspec ./spec/models/trade/distinct_values_validation_rule_spec.rb:82 # Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal country of origin +rspec ./spec/models/trade/filter_spec.rb:15 # Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank +rspec ./spec/models/trade/filter_spec.rb:16 # Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank +rspec ./spec/models/trade/filter_spec.rb:17 # Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank +rspec ./spec/models/trade/filter_spec.rb:25 # Trade::Filter results when searching by taxon concepts ids in the public interface at FAMILY rank +rspec ./spec/models/trade/filter_spec.rb:34 # Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank +rspec ./spec/models/trade/filter_spec.rb:35 # Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank +rspec ./spec/models/trade/filter_spec.rb:36 # Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank +rspec ./spec/models/trade/filter_spec.rb:43 # Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank +rspec ./spec/models/trade/filter_spec.rb:44 # Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank +rspec ./spec/models/trade/filter_spec.rb:45 # Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank +rspec ./spec/models/trade/filter_spec.rb:54 # Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks +rspec ./spec/models/trade/filter_spec.rb:55 # Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks +rspec ./spec/models/trade/filter_spec.rb:56 # Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks +rspec ./spec/models/trade/filter_spec.rb:68 # Trade::Filter results when searching by taxon concepts ids when status N shipments present +rspec ./spec/models/trade/filter_spec.rb:79 # Trade::Filter results when searching by taxon concepts ids when subspecies shipments present +rspec ./spec/models/trade/filter_spec.rb:95 # Trade::Filter results when searching by taxon concepts ids when synonym subspecies shipments present when searching by taxonomic parent +rspec ./spec/models/trade/filter_spec.rb:103 # Trade::Filter results when searching by taxon concepts ids when synonym subspecies shipments present when searching by accepted name +rspec ./spec/models/trade/filter_spec.rb:122 # Trade::Filter results when searching by reported taxon concepts ids when trade names shipments present +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:65 # Trade::InclusionValidationRule matching_records_for_aru_and_error +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:104 # Trade::InclusionValidationRule refresh_errors_if_needed when no updates +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:112 # Trade::InclusionValidationRule refresh_errors_if_needed when updates and error fixed for all records error record is destroyed +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:123 # Trade::InclusionValidationRule refresh_errors_if_needed when updates and error fixed for some records error record is updated to reflect new error_count +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:148 # Trade::InclusionValidationRule validation_errors_for_aru species name may have extra whitespace between name segments +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:175 # Trade::InclusionValidationRule validation_errors_for_aru trading partner should be a valid iso code +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:202 # Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with unit as defined by term_trade_codes_pairs table when invalid combination +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:214 # Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with unit as defined by term_trade_codes_pairs table when required unit blank +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:234 # Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with purpose as defined by term_trade_codes_pairs table +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:255 # Trade::InclusionValidationRule validation_errors_for_aru taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table when accepted name +rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:272 # Trade::InclusionValidationRule validation_errors_for_aru taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table when hybrid +rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:74 # Trade::InclusionValidationRule validation_errors_for_aru when W source and country of origin blank and exporter doesn't match distribution (E) +rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:97 # Trade::InclusionValidationRule validation_errors_for_aru when W source and country of origin blank and exporter doesn't match distribution (I) +rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:120 # Trade::InclusionValidationRule validation_errors_for_aru when W source and country XX +rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:143 # Trade::InclusionValidationRule validation_errors_for_aru when W source and country doesn't match distribution of higher taxa +rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:160 # Trade::InclusionValidationRule validation_errors_for_aru when invalid scope specified +rspec ./spec/models/trade/sandbox_filter_spec.rb:64 # Trade::SandboxFilter results +rspec ./spec/models/trade/sandbox_filter_spec.rb:65 # Trade::SandboxFilter results +rspec ./spec/models/trade/sandbox_spec.rb:47 # Trade::Sandbox destroy +rspec ./spec/models/trade/sandbox_template_spec.rb:56 # Trade::SandboxTemplate update +rspec ./spec/models/trade/sandbox_template_spec.rb:78 # Trade::SandboxTemplate update_batch +rspec ./spec/models/trade/scoped_inclusion_validation_rule_spec.rb:21 # Trade::InclusionValidationRule validation_errors when W source and country of origin matches distribution +rspec ./spec/models/trade/scoped_inclusion_validation_rule_spec.rb:48 # Trade::InclusionValidationRule validation_errors when W source and country of origin blank +rspec ./spec/models/trade/shipment_spec.rb:123 # Trade::Shipment secondary validations when species name + appendix + year invalid +rspec ./spec/models/trade/shipment_spec.rb:132 # Trade::Shipment secondary validations when species name + appendix + year invalid +rspec ./spec/models/trade/shipment_spec.rb:141 # Trade::Shipment secondary validations when species name + appendix + year valid +rspec ./spec/models/trade/shipment_spec.rb:163 # Trade::Shipment secondary validations when species name + appendix N + year valid +rspec ./spec/models/trade/shipment_spec.rb:184 # Trade::Shipment secondary validations when species name + appendix N + year not CITES listed and not EU listed +rspec ./spec/models/trade/shipment_spec.rb:445 # Trade::Shipment secondary validations when species name + source code invalid +rspec ./spec/models/trade/shipment_spec.rb:455 # Trade::Shipment secondary validations when species name + source code valid +rspec ./spec/models/trade/shipments_comptab_export_spec.rb:12 # Trade::ShipmentsComptabExport total_cnt when internal +rspec ./spec/models/trade/shipments_comptab_export_spec.rb:16 # Trade::ShipmentsComptabExport total_cnt when public +rspec ./spec/models/trade/shipments_comptab_export_spec.rb:23 # Trade::ShipmentsComptabExport query when internal +rspec ./spec/models/trade/shipments_comptab_export_spec.rb:27 # Trade::ShipmentsComptabExport query when public +rspec ./spec/models/trade/shipments_export_spec.rb:23 # Trade::ShipmentsExport query when internal +rspec ./spec/models/trade/shipments_export_spec.rb:27 # Trade::ShipmentsExport query when public +rspec ./spec/models/trade/shipments_gross_exports_export_spec.rb:12 # Trade::ShipmentsGrossExportsExport total_cnt when internal +rspec ./spec/models/trade/shipments_gross_exports_export_spec.rb:16 # Trade::ShipmentsGrossExportsExport total_cnt when public +rspec ./spec/models/trade/shipments_gross_exports_export_spec.rb:23 # Trade::ShipmentsGrossExportsExport query when internal +rspec ./spec/models/trade/shipments_gross_exports_export_spec.rb:27 # Trade::ShipmentsGrossExportsExport query when public +rspec ./spec/models/trade/shipments_gross_imports_export_spec.rb:12 # Trade::ShipmentsGrossImportsExport total_cnt when internal +rspec ./spec/models/trade/shipments_gross_imports_export_spec.rb:16 # Trade::ShipmentsGrossImportsExport total_cnt when public +rspec ./spec/models/trade/shipments_gross_imports_export_spec.rb:23 # Trade::ShipmentsGrossImportsExport query when internal +rspec ./spec/models/trade/shipments_gross_imports_export_spec.rb:27 # Trade::ShipmentsGrossImportsExport query when public +rspec ./spec/models/trade/shipments_net_exports_export_spec.rb:12 # Trade::ShipmentsNetExportsExport total_cnt when internal +rspec ./spec/models/trade/shipments_net_exports_export_spec.rb:16 # Trade::ShipmentsNetExportsExport total_cnt when public +rspec ./spec/models/trade/shipments_net_exports_export_spec.rb:23 # Trade::ShipmentsNetExportsExport query when internal +rspec ./spec/models/trade/shipments_net_exports_export_spec.rb:27 # Trade::ShipmentsNetExportsExport query when public +rspec ./spec/models/trade/shipments_net_imports_export_spec.rb:12 # Trade::ShipmentsNetImportsExport total_cnt when internal +rspec ./spec/models/trade/shipments_net_imports_export_spec.rb:16 # Trade::ShipmentsNetImportsExport total_cnt when public +rspec ./spec/models/trade/shipments_net_imports_export_spec.rb:23 # Trade::ShipmentsNetImportsExport query when internal +rspec ./spec/models/trade/shipments_net_imports_export_spec.rb:27 # Trade::ShipmentsNetImportsExport query when public +rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:77 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when split listing +rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:94 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when old listing +rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:98 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when old listing +rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:113 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when appendix N and CITES listed +rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:117 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when appendix N and CITES listed +rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:132 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when reported under a synonym, but otherwise fine +rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:169 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when hybrid +rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:185 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when not CITES listed but EU listed +rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:200 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when not CITES listed and not EU listed +rspec ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:42 # Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Animalia, source_code can't be A +rspec ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:46 # Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Animalia, source_code can't be A +rspec ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:63 # Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Plantae, source_code can't be C or R +rspec ./spec/models/trade/validation_rule_spec.rb:56 # Trade::ValidationRule matching_records_for_aru_and_error +rspec ./spec/models/trade/validation_rule_spec.rb:94 # Trade::ValidationRule refresh_errors_if_needed when no updates +rspec ./spec/models/trade/validation_rule_spec.rb:102 # Trade::ValidationRule refresh_errors_if_needed when updates and error fixed for all records error record is destroyed +rspec ./spec/models/trade/validation_rule_spec.rb:113 # Trade::ValidationRule refresh_errors_if_needed when updates and error fixed for some records error record is updated to reflect new error_count +rspec ./spec/models/trade/validation_rule_spec.rb:136 # Trade::ValidationRule Trade::PresenceValidationRule validation_errors_for_aru trading_partner should not be blank +rspec ./spec/models/trade/validation_rule_spec.rb:157 # Trade::ValidationRule Trade::NumericalityValidationRule validation_errors_for_aru quantity should be a number +rspec ./spec/models/trade/validation_rule_spec.rb:174 # Trade::ValidationRule Trade::FormatValidationRule validation_errors_for_aru year should be a 4 digit value +rspec ./spec/workers/eu_regulation_activation_worker_spec.rb:32 # EuRegulationActivationWorker Set new EU regulation to true +rspec ./spec/workers/eu_regulation_activation_worker_spec.rb:33 # EuRegulationActivationWorker Set new EU regulation to true +rspec ./spec/workers/eu_regulation_activation_worker_spec.rb:40 # EuRegulationActivationWorker Set new EU regulation to true Set old EU regulation to false +rspec ./spec/workers/eu_regulation_activation_worker_spec.rb:41 # EuRegulationActivationWorker Set new EU regulation to true Set old EU regulation to false +rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:42 # EventListingChangesCopyWorker when copy into non-current regulation +rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:43 # EventListingChangesCopyWorker when copy into non-current regulation +rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:48 # EventListingChangesCopyWorker when copy into current regulation +rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:49 # EventListingChangesCopyWorker when copy into current regulation +rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:70 # EventListingChangesCopyWorker when exclusion +rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:71 # EventListingChangesCopyWorker when exclusion +rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:72 # EventListingChangesCopyWorker when exclusion +rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:73 # EventListingChangesCopyWorker when exclusion +rspec ./spec/workers/quotas_copy_worker_spec.rb:47 # QuotasCopyWorker Copy single quota, for a given year +rspec ./spec/workers/quotas_copy_worker_spec.rb:48 # QuotasCopyWorker Copy single quota, for a given year +rspec ./spec/workers/quotas_copy_worker_spec.rb:49 # QuotasCopyWorker Copy single quota, for a given year +rspec ./spec/workers/quotas_copy_worker_spec.rb:50 # QuotasCopyWorker Copy single quota, for a given year +rspec ./spec/workers/quotas_copy_worker_spec.rb:59 # QuotasCopyWorker Try to copy quota from wrong year +rspec ./spec/workers/quotas_copy_worker_spec.rb:60 # QuotasCopyWorker Try to copy quota from wrong year +rspec ./spec/workers/quotas_copy_worker_spec.rb:61 # QuotasCopyWorker Try to copy quota from wrong year +rspec ./spec/workers/quotas_copy_worker_spec.rb:70 # QuotasCopyWorker Copy quota when there are no current quotas +rspec ./spec/workers/quotas_copy_worker_spec.rb:71 # QuotasCopyWorker Copy quota when there are no current quotas +rspec ./spec/workers/quotas_copy_worker_spec.rb:72 # QuotasCopyWorker Copy quota when there are no current quotas +rspec ./spec/workers/quotas_copy_worker_spec.rb:90 # QuotasCopyWorker When multiple quotas copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:91 # QuotasCopyWorker When multiple quotas copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:92 # QuotasCopyWorker When multiple quotas copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:93 # QuotasCopyWorker When multiple quotas copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:94 # QuotasCopyWorker When multiple quotas copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:112 # QuotasCopyWorker When multiple quotas copy quota for both countries +rspec ./spec/workers/quotas_copy_worker_spec.rb:113 # QuotasCopyWorker When multiple quotas copy quota for both countries +rspec ./spec/workers/quotas_copy_worker_spec.rb:114 # QuotasCopyWorker When multiple quotas copy quota for both countries +rspec ./spec/workers/quotas_copy_worker_spec.rb:115 # QuotasCopyWorker When multiple quotas copy quota for both countries +rspec ./spec/workers/quotas_copy_worker_spec.rb:116 # QuotasCopyWorker When multiple quotas copy quota for both countries +rspec ./spec/workers/quotas_copy_worker_spec.rb:134 # QuotasCopyWorker When multiple quotas don't copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:135 # QuotasCopyWorker When multiple quotas don't copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:136 # QuotasCopyWorker When multiple quotas don't copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:137 # QuotasCopyWorker When multiple quotas don't copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:138 # QuotasCopyWorker When multiple quotas don't copy quota for given country +rspec ./spec/workers/quotas_copy_worker_spec.rb:155 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:156 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:157 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:158 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:159 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:177 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts +rspec ./spec/workers/quotas_copy_worker_spec.rb:178 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts +rspec ./spec/workers/quotas_copy_worker_spec.rb:179 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts +rspec ./spec/workers/quotas_copy_worker_spec.rb:180 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts +rspec ./spec/workers/quotas_copy_worker_spec.rb:181 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts +rspec ./spec/workers/quotas_copy_worker_spec.rb:198 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:199 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:200 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:201 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:202 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept +rspec ./spec/workers/quotas_copy_worker_spec.rb:222 # QuotasCopyWorker When text to replace passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:223 # QuotasCopyWorker When text to replace passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:224 # QuotasCopyWorker When text to replace passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:225 # QuotasCopyWorker When text to replace passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:226 # QuotasCopyWorker When text to replace passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:227 # QuotasCopyWorker When text to replace passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:228 # QuotasCopyWorker When text to replace passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:229 # QuotasCopyWorker When text to replace passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:245 # QuotasCopyWorker When url passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:246 # QuotasCopyWorker When url passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:247 # QuotasCopyWorker When url passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:248 # QuotasCopyWorker When url passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:249 # QuotasCopyWorker When url passed, should be replaced +rspec ./spec/workers/quotas_copy_worker_spec.rb:250 # QuotasCopyWorker When url passed, should be replaced +[Coveralls] Outside the Travis environment, not sending data. +Coverage report generated for RSpec to /SAPI/coverage. 7170 / 10441 LOC (68.67%) covered. From a49ae3d7630b5610f5672dfba10985589ecc1037 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 11:50:00 +0000 Subject: [PATCH 025/334] https://stackoverflow.com/questions/16848052/value-to-boolean-deprecated-whats-a-good-replacement --- app/models/common_name.rb | 4 +++- app/models/document_batch.rb | 5 ++++- lib/modules/search_param_sanitiser.rb | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/models/common_name.rb b/app/models/common_name.rb index d4b18a1de7..d43fe50e12 100644 --- a/app/models/common_name.rb +++ b/app/models/common_name.rb @@ -30,6 +30,8 @@ def self.english_to_pdf(common_name) # for distinguishing between official CITES languages an non official languages # might need to be reviewed: TODO def convention_language - ActiveRecord::ConnectionAdapters::Column.value_to_boolean(self[:convention_language]) + value = self[:convention_language] + ActiveRecord::Type::Boolean.new.type_cast_from_database(value) # Rails 4 + # ActiveRecord::Type::Boolean.new.cast(value) # TODO Rails 5 end end diff --git a/app/models/document_batch.rb b/app/models/document_batch.rb index 9c2dc5886c..5bf95d60e5 100644 --- a/app/models/document_batch.rb +++ b/app/models/document_batch.rb @@ -49,11 +49,14 @@ def initialize_documents(documents_attributes, files) end def common_attributes + is_public = ActiveRecord::Type::Boolean.new.type_cast_from_database(@is_public) # Rails 4 + # is_public = ActiveRecord::Type::Boolean.new.cast(@is_public) # TODO Rails 5 + { 'event_id' => @event_id, 'date' => @date, 'language_id' => @language_id, - 'is_public' => ActiveRecord::ConnectionAdapters::Column.value_to_boolean(@is_public) + 'is_public' => is_public } end diff --git a/lib/modules/search_param_sanitiser.rb b/lib/modules/search_param_sanitiser.rb index 2a04e21415..852cb7dd7c 100644 --- a/lib/modules/search_param_sanitiser.rb +++ b/lib/modules/search_param_sanitiser.rb @@ -15,7 +15,8 @@ def sanitise_symbol(s, default = nil) end def sanitise_boolean(b, default = nil) - b && ActiveRecord::ConnectionAdapters::Column.value_to_boolean(b) || default + b && ActiveRecord::Type::Boolean.new.type_cast_from_database(b) || default # Rails 4 + # b && ActiveRecord::Type::Boolean.new.cast(b) || default # TODO Rails 5 end def sanitise_positive_integer(i, default = nil) From e1ab9566976bdf964d123fd795a9a473266845d3 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 12:05:31 +0000 Subject: [PATCH 026/334] remove 'activeuuid'. psql build-in uuid support, i don't see why we need that, and it break when we upgrade rails/pg. Only Ahoy using that. --- Gemfile | 5 ++--- Gemfile.lock | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index cd51014bd0..95ff96bfab 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,6 @@ gem 'active_model_serializers', '0.8.4' gem 'activeresource', '4.1.0' # TODO: can be removed? Seems no place using this. gem 'dalli', '2.7.10' gem 'pg', '0.21.0' # TODO: latest 1.5.4, need Rails 5 to upgrade to 1.0.0 -gem 'activeuuid', '0.6.1' # TODO: should remove when upgrade to Rails 6. gem 'pg_array_parser', '0.0.9' # TODO: latest 0.0.9 gem 'nested-hstore', '0.1.2' # TODO: latest 0.1.2 @ 2015 gem 'pg_search', '0.6.4' @@ -26,8 +25,8 @@ gem 'traco', '2.0.0' gem 'protected_attributes', '1.1.4' # TODO: Only support Rails version < 5 (https://github.com/rails/protected_attributes) gem 'devise', '4.0.0' gem 'cancan', '1.6.10' -gem 'ahoy_matey', '1.0.1' -gem 'browser', '0.6.0' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 +gem 'ahoy_matey', '1.6.1' # TODO: latest 5.0.2. Can't upgrade to 2.0 until upgrade to Rails 5 +gem 'browser', '2.5.3' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 gem 'gon', '5.2.0' gem 'wicked', '1.3.3' gem 'groupdate', '2.4.0' diff --git a/Gemfile.lock b/Gemfile.lock index 0fca79ce25..f27454a1f5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -46,20 +46,20 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - activeuuid (0.6.1) - activerecord (>= 3.1) - uuidtools acts-as-taggable-on (4.0.0) activerecord (>= 4.0) addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) afm (0.2.2) - ahoy_matey (1.0.1) + ahoy_matey (1.6.1) addressable - browser (>= 0.4.0) + browser (~> 2.0) geocoder - referer-parser + rack-attack (< 6) + railties + referer-parser (>= 0.3.0) request_store + safely_block (>= 0.1.1) user_agent_parser uuidtools airbrussh (1.5.0) @@ -92,7 +92,7 @@ GEM sass (~> 3.2) brightbox (2.3.9) capistrano (>= 2.5) - browser (0.6.0) + browser (2.5.3) builder (3.2.4) byebug (11.1.3) cancan (1.6.10) @@ -188,6 +188,7 @@ GEM railties (>= 3.1) ember-source (1.6.1) handlebars-source (~> 1.0) + errbase (0.2.2) erubis (2.7.0) eventmachine (1.2.7) execjs (2.9.1) @@ -360,6 +361,8 @@ GEM railties (>= 3.1, < 5.0) racc (1.7.3) rack (1.6.13) + rack-attack (5.4.2) + rack (>= 1.0, < 3) rack-cors (0.3.0) rack-livereload (0.3.11) rack @@ -462,6 +465,8 @@ GEM ruby-progressbar (1.13.0) ruby-rc4 (0.1.5) rubyzip (1.1.7) + safely_block (0.3.0) + errbase (>= 0.1.1) sass (3.4.25) sass-rails (5.0.7) railties (>= 4.0.0, < 6) @@ -568,16 +573,15 @@ DEPENDENCIES actionpack-page_caching (= 1.1.1) active_model_serializers (= 0.8.4) activeresource (= 4.1.0) - activeuuid (= 0.6.1) acts-as-taggable-on (= 4.0.0) - ahoy_matey (= 1.0.1) + ahoy_matey (= 1.6.1) annotate (= 2.5.0) appsignal (= 1.3.3) aws-sdk (~> 2) bcrypt_pbkdf (= 1.1.0) bootstrap-sass (= 2.3.2.2) brightbox (= 2.3.9) - browser (= 0.6.0) + browser (= 2.5.3) byebug cancan (= 1.6.10) capistrano (= 3.11.0) From 2f80e631fff5b9daf22462222170cf92337bb1e3 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 12:27:10 +0000 Subject: [PATCH 027/334] remove 'sinatra'. Look like only Sidekiq using that, but newer version sidekiq don't --- Gemfile | 6 ++---- Gemfile.lock | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Gemfile b/Gemfile index 95ff96bfab..c3bdfbc8b7 100644 --- a/Gemfile +++ b/Gemfile @@ -33,8 +33,8 @@ gem 'groupdate', '2.4.0' gem "chartkick", '1.3.2' gem 'rubyzip', '1.1.7' -gem 'sidekiq', '4.1.1' -gem 'sidekiq-status', '0.6.0' +gem 'sidekiq', '4.2.10' +gem 'sidekiq-status', '1.1.4' # TODO: latest is 3.0.3 @ 2023 gem 'sidekiq-unique-jobs', '4.0.18' gem 'redis-rails', '4.0.0' @@ -147,8 +147,6 @@ end gem 'rake', '10.0.4' gem 'slim', '1.3.6' -# if you require 'sinatra' you get the DSL extended to Object -gem 'sinatra', '1.3.5', :require => nil gem 'memcache-client', '1.8.5' diff --git a/Gemfile.lock b/Gemfile.lock index f27454a1f5..0d0d9296f4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -131,6 +131,8 @@ GEM mime-types (>= 1.16) chartkick (1.3.2) chronic (0.10.2) + chronic_duration (0.10.6) + numerizer (~> 0.1.1) clerk (0.2.2) activerecord (> 3) railties (> 3.1) @@ -324,6 +326,7 @@ GEM nokogiri (1.12.5) mini_portile2 (~> 2.6.1) racc (~> 1.4) + numerizer (0.1.1) oj (3.14.2) orm_adapter (0.5.0) paper_trail (4.2.0) @@ -366,7 +369,7 @@ GEM rack-cors (0.3.0) rack-livereload (0.3.11) rack - rack-protection (1.5.5) + rack-protection (2.2.4) rack rack-test (0.6.3) rack (>= 1.0) @@ -478,12 +481,14 @@ GEM thor (~> 0.14) sentient_user (0.4.0) railties (>= 3.1) - sidekiq (4.1.1) + sidekiq (4.2.10) concurrent-ruby (~> 1.0) connection_pool (~> 2.2, >= 2.2.0) + rack-protection (>= 1.5.0) redis (~> 3.2, >= 3.2.1) - sidekiq-status (0.6.0) - sidekiq (>= 2.7) + sidekiq-status (1.1.4) + chronic_duration + sidekiq (>= 3.0) sidekiq-unique-jobs (4.0.18) sidekiq (>= 2.6) thor @@ -492,10 +497,6 @@ GEM multi_json (~> 1.0) simplecov-html (~> 0.8.0) simplecov-html (0.8.0) - sinatra (1.3.5) - rack (~> 1.4) - rack-protection (~> 1.3) - tilt (~> 1.3, >= 1.3.3) sitemap_generator (5.1.0) builder slackistrano (0.1.9) @@ -657,11 +658,10 @@ DEPENDENCIES rubyzip (= 1.1.7) sass-rails (= 5.0.7) select2-rails (= 3.5.10) - sidekiq (= 4.1.1) - sidekiq-status (= 0.6.0) + sidekiq (= 4.2.10) + sidekiq-status (= 1.1.4) sidekiq-unique-jobs (= 4.0.18) simplecov (= 0.9.1) - sinatra (= 1.3.5) sitemap_generator (= 5.1.0) slackistrano (= 0.1.9) slim (= 1.3.6) From ad0a42aef5433c0e63fc34a1e8a048b310b420b8 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 12:27:36 +0000 Subject: [PATCH 028/334] https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#responders --- Gemfile | 1 + Gemfile.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index c3bdfbc8b7..edc93de45c 100644 --- a/Gemfile +++ b/Gemfile @@ -32,6 +32,7 @@ gem 'wicked', '1.3.3' gem 'groupdate', '2.4.0' gem "chartkick", '1.3.2' gem 'rubyzip', '1.1.7' +gem 'responders', '~> 2.0' # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#responders gem 'sidekiq', '4.2.10' gem 'sidekiq-status', '1.1.4' # TODO: latest is 3.0.3 @ 2023 diff --git a/Gemfile.lock b/Gemfile.lock index 0d0d9296f4..a711fda5d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -650,6 +650,7 @@ DEPENDENCIES rbnacl-libsodium (= 1.0.16) redis-rails (= 4.0.0) request_store (= 1.3.2) + responders (~> 2.0) rest-client (= 1.8.0) rspec-collection_matchers (= 1.1.3) rspec-mocks (= 3.0.4) From f022703734685bc3473a9c5938219283f1b696ec Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 12:39:55 +0000 Subject: [PATCH 029/334] update simplecov to remove deprecation warning --- Gemfile | 2 +- Gemfile.lock | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index edc93de45c..52f61ed00a 100644 --- a/Gemfile +++ b/Gemfile @@ -140,7 +140,7 @@ end group :test do gem "codeclimate-test-reporter", '0.1.1', require: nil # TODO, should be removed gem "factory_girl_rails", '4.2.1' - gem 'simplecov', '0.9.1', :require => false + gem 'simplecov', '0.22.0', :require => false # TODO: latest gem 'coveralls', '0.7.1', :require => false gem 'capybara', '2.2.1' end diff --git a/Gemfile.lock b/Gemfile.lock index a711fda5d9..fc54636463 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -167,7 +167,7 @@ GEM warden (~> 1.2.3) diff-lcs (1.5.0) digest (3.1.1) - docile (1.1.5) + docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.0.1) @@ -492,11 +492,12 @@ GEM sidekiq-unique-jobs (4.0.18) sidekiq (>= 2.6) thor - simplecov (0.9.1) - docile (~> 1.1.0) - multi_json (~> 1.0) - simplecov-html (~> 0.8.0) - simplecov-html (0.8.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) sitemap_generator (5.1.0) builder slackistrano (0.1.9) @@ -662,7 +663,7 @@ DEPENDENCIES sidekiq (= 4.2.10) sidekiq-status (= 1.1.4) sidekiq-unique-jobs (= 4.0.18) - simplecov (= 0.9.1) + simplecov (= 0.22.0) sitemap_generator (= 5.1.0) slackistrano (= 0.1.9) slim (= 1.3.6) From fdf9c5dd0d10d801fca3934c6930fa5d9fb357b9 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 14:41:47 +0000 Subject: [PATCH 030/334] upgrade devise so it works with Ruby 2.5 --- Gemfile | 2 +- Gemfile.lock | 6 +++--- app/controllers/application_controller.rb | 5 ++--- app/controllers/registrations_controller.rb | 4 +++- spec/spec_helper.rb | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 52f61ed00a..0318b107bf 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ gem 'inherited_resources', '1.7.2' # TODO: need upgrade when upgrade to Rails 5 gem 'traco', '2.0.0' # gem 'strong_parameters' gem 'protected_attributes', '1.1.4' # TODO: Only support Rails version < 5 (https://github.com/rails/protected_attributes) -gem 'devise', '4.0.0' +gem 'devise', '4.4.0' gem 'cancan', '1.6.10' gem 'ahoy_matey', '1.6.1' # TODO: latest 5.0.2. Can't upgrade to 2.0 until upgrade to Rails 5 gem 'browser', '2.5.3' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 diff --git a/Gemfile.lock b/Gemfile.lock index fc54636463..d43a6d05e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -159,10 +159,10 @@ GEM dalli (2.7.10) database_cleaner (1.2.0) debug_inspector (1.2.0) - devise (4.0.0) + devise (4.4.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) + railties (>= 4.1.0, < 5.2) responders warden (~> 1.2.3) diff-lcs (1.5.0) @@ -603,7 +603,7 @@ DEPENDENCIES coveralls (= 0.7.1) dalli (= 2.7.10) database_cleaner (= 1.2.0) - devise (= 4.0.0) + devise (= 4.4.0) dotenv-rails (= 2.0.1) ed25519 (= 1.2.4) ember-data-source (= 0.14) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 57994c14c0..204d410739 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -38,10 +38,9 @@ def access_denied_error(exception) end def configure_permitted_parameters - # TODO: deprecations https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#400rc1---2016-02-01 extra_parameters = [:name, :is_cites_authority, :organisation, :geo_entity_id] - devise_parameter_sanitizer.for(:sign_up).push(*extra_parameters) - devise_parameter_sanitizer.for(:account_update).push(*extra_parameters) + devise_parameter_sanitizer.permit(:sign_up, keys: extra_parameters) + devise_parameter_sanitizer.permit(:account_update, keys: extra_parameters) end private diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index b84a68717f..86faad5aad 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -4,12 +4,14 @@ def update successfully_updated = if needs_password?(@user, params) + # TODO: not sure if this still work, need test. # TODO: deprecations https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#400rc1---2016-02-01 @user.update_with_password(devise_parameter_sanitizer.sanitize(:account_update)) else # remove the virtual current_password attribute # update_without_password doesn't know how to ignore it params[:user].delete(:current_password) + # TODO: not sure if this still work, need test. # TODO: deprecations https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#400rc1---2016-02-01 @user.update_without_password(devise_parameter_sanitizer.sanitize(:account_update)) end @@ -17,7 +19,7 @@ def update if successfully_updated set_flash_message :notice, :updated # Sign in the user bypassing validation in case his password changed - sign_in @user, :bypass => true + bypass_sign_in @user redirect_to after_update_path_for(@user) else render "edit" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 949769fc28..79a0693223 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -47,7 +47,7 @@ config.infer_base_class_for_anonymous_controllers = true config.infer_spec_type_from_file_location! - config.include Devise::TestHelpers, type: :controller + config.include Devise::Test::ControllerHelpers, type: :controller config.extend ControllerMacros, :type => :controller config.include FactoryGirl::Syntax::Methods From dc7ccb60536933af1e7c253ca92b3d888d76bf46 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 22:09:56 +0000 Subject: [PATCH 031/334] Remove Timecop gem. Use rails build-in time helper. --- Gemfile | 1 - Gemfile.lock | 2 -- .../timelines_for_taxon_concept_spec.rb | 4 ++-- spec/models/cites_suspension_spec.rb | 4 ++-- spec/models/document_search_spec.rb | 16 ++++++------- .../trade/inclusion_validation_rule_spec.rb | 24 ++++++++++--------- spec/models/trade/validation_rule_spec.rb | 24 ++++++++++--------- spec/spec_helper.rb | 1 + 8 files changed, 39 insertions(+), 37 deletions(-) diff --git a/Gemfile b/Gemfile index 0318b107bf..357a9649a4 100644 --- a/Gemfile +++ b/Gemfile @@ -131,7 +131,6 @@ group :test, :development do gem "rspec-mocks", '3.0.4' gem "json_spec", '1.1.5' gem "database_cleaner", "1.2.0" # TODO, should remove after upgrade Rails. - gem "timecop", '0.6.3' gem "launchy", '2.4.3' # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' diff --git a/Gemfile.lock b/Gemfile.lock index d43a6d05e5..41e34c434f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -532,7 +532,6 @@ GEM thor (0.20.3) thread_safe (0.3.6) tilt (1.3.7) - timecop (0.6.3) timeout (0.4.0) tins (1.32.1) sync @@ -671,7 +670,6 @@ DEPENDENCIES sprockets (= 2.12.5) susy (= 2.2.14) test-unit (= 3.1.5) - timecop (= 0.6.3) traco (= 2.0.0) uglifier (= 2.7.2) underscore-rails (= 1.4.3) diff --git a/spec/models/checklist/timelines_for_taxon_concept_spec.rb b/spec/models/checklist/timelines_for_taxon_concept_spec.rb index 5072ccd499..dee5ddb570 100644 --- a/spec/models/checklist/timelines_for_taxon_concept_spec.rb +++ b/spec/models/checklist/timelines_for_taxon_concept_spec.rb @@ -2,11 +2,11 @@ describe Checklist::TimelinesForTaxonConcept do before do - Timecop.freeze(Time.local(1990)) + travel_to Time.local(1990) end after do - Timecop.return + travel_back end describe :timelines do diff --git a/spec/models/cites_suspension_spec.rb b/spec/models/cites_suspension_spec.rb index ab12ebc0b6..1708bef946 100644 --- a/spec/models/cites_suspension_spec.rb +++ b/spec/models/cites_suspension_spec.rb @@ -50,7 +50,7 @@ ) } before do - Timecop.freeze(10.minutes.ago) + travel -10.minutes @genus = create_cites_eu_genus @taxon_concept = create_cites_eu_species(parent: @genus) @another_taxon_concept = create_cites_eu_species @@ -64,7 +64,7 @@ :taxon_concept_id => @another_taxon_concept.id, :geo_entity_id => rwanda.id ) - Timecop.return + travel_back end context "touching taxa" do diff --git a/spec/models/document_search_spec.rb b/spec/models/document_search_spec.rb index 4731ec947a..87ae859b43 100644 --- a/spec/models/document_search_spec.rb +++ b/spec/models/document_search_spec.rb @@ -291,7 +291,7 @@ describe :documents_need_refreshing? do before(:each) do @d = nil - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do @d = create(:proposal) DocumentSearch.refresh_citations_and_documents end @@ -301,7 +301,7 @@ end context "when document created in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do create(:proposal) end expect(DocumentSearch.documents_need_refreshing?).to be_truthy @@ -309,7 +309,7 @@ end context "when document destroyed in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @d.destroy end expect(DocumentSearch.documents_need_refreshing?).to be_truthy @@ -317,7 +317,7 @@ end context "when document updated in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @d.update_attributes(is_public: true) end expect(DocumentSearch.documents_need_refreshing?).to be_truthy @@ -328,7 +328,7 @@ describe :citations_need_refreshing? do before(:each) do @d = nil - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do @d = create(:proposal) @c = create(:document_citation, document: @d) @c_tc = create(:document_citation_taxon_concept, document_citation: @c) @@ -340,7 +340,7 @@ end context "when citation created in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do create(:document_citation_taxon_concept, document_citation: @c) end expect(DocumentSearch.citations_need_refreshing?).to be_truthy @@ -348,7 +348,7 @@ end context "when citation destroyed in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @c_tc.destroy end expect(DocumentSearch.citations_need_refreshing?).to be_truthy @@ -356,7 +356,7 @@ end context "when citation updated in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @c_tc.update_attributes(taxon_concept_id: create_cites_eu_species.id) end expect(DocumentSearch.citations_need_refreshing?).to be_truthy diff --git a/spec/models/trade/inclusion_validation_rule_spec.rb b/spec/models/trade/inclusion_validation_rule_spec.rb index b0a34dbca1..ff6f00ca80 100644 --- a/spec/models/trade/inclusion_validation_rule_spec.rb +++ b/spec/models/trade/inclusion_validation_rule_spec.rb @@ -110,22 +110,24 @@ context "when updates and error fixed for all records" do specify "error record is destroyed" do - Timecop.travel(Time.now + 1) - @shipment2.update_attributes(taxon_name: 'Canis lupus') - @shipment3.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { Trade::ValidationError.count }.by(-1) + travel_to(Time.now + 1) do + @shipment2.update_attributes(taxon_name: 'Canis lupus') + @shipment3.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { Trade::ValidationError.count }.by(-1) + end end end context "when updates and error fixed for some records" do specify "error record is updated to reflect new error_count" do - Timecop.travel(Time.now + 1) - @shipment2.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { @validation_error.reload.error_count }.by(-1) + travel_to(Time.now + 1) do + @shipment2.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { @validation_error.reload.error_count }.by(-1) + end end end diff --git a/spec/models/trade/validation_rule_spec.rb b/spec/models/trade/validation_rule_spec.rb index b7f88b79ff..3f8b4794f1 100644 --- a/spec/models/trade/validation_rule_spec.rb +++ b/spec/models/trade/validation_rule_spec.rb @@ -100,22 +100,24 @@ context "when updates and error fixed for all records" do specify "error record is destroyed" do - Timecop.travel(Time.now + 1) - @shipment2.update_attributes(taxon_name: 'Canis lupus') - @shipment3.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { Trade::ValidationError.count }.by(-1) + travel_to(Time.now + 1) do + @shipment2.update_attributes(taxon_name: 'Canis lupus') + @shipment3.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { Trade::ValidationError.count }.by(-1) + end end end context "when updates and error fixed for some records" do specify "error record is updated to reflect new error_count" do - Timecop.travel(Time.now + 1) - @shipment2.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { @validation_error.reload.error_count }.by(-1) + travel_to(Time.now + 1) do + @shipment2.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { @validation_error.reload.error_count }.by(-1) + end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 79a0693223..8baeb9fd4e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -47,6 +47,7 @@ config.infer_base_class_for_anonymous_controllers = true config.infer_spec_type_from_file_location! + config.include ActiveSupport::Testing::TimeHelpers config.include Devise::Test::ControllerHelpers, type: :controller config.extend ControllerMacros, :type => :controller From 55fcf9f88c9d0c97911e1e5be30fa86c4ab84920 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 22:47:35 +0000 Subject: [PATCH 032/334] upgrade rspec, to remove DEPRECATION warning --- Gemfile | 3 +-- Gemfile.lock | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index 357a9649a4..0b21a2f453 100644 --- a/Gemfile +++ b/Gemfile @@ -126,9 +126,8 @@ group :development do end group :test, :development do - gem "rspec-rails", '3.0.2' + gem "rspec-rails", '3.9.1' gem 'rspec-collection_matchers', '1.1.3' - gem "rspec-mocks", '3.0.4' gem "json_spec", '1.1.5' gem "database_cleaner", "1.2.0" # TODO, should remove after upgrade Rails. gem "launchy", '2.4.3' diff --git a/Gemfile.lock b/Gemfile.lock index 41e34c434f..fdcaadf313 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -437,28 +437,29 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rspec (3.0.0) - rspec-core (~> 3.0.0) - rspec-expectations (~> 3.0.0) - rspec-mocks (~> 3.0.0) + rspec (3.9.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) rspec-collection_matchers (1.1.3) rspec-expectations (>= 2.99.0.beta1) - rspec-core (3.0.4) - rspec-support (~> 3.0.0) - rspec-expectations (3.0.4) + rspec-core (3.9.3) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.4) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.0.0) - rspec-mocks (3.0.4) - rspec-support (~> 3.0.0) - rspec-rails (3.0.2) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.9.0) + rspec-rails (3.9.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.0.0) - rspec-expectations (~> 3.0.0) - rspec-mocks (~> 3.0.0) - rspec-support (~> 3.0.0) - rspec-support (3.0.4) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.4) rubocop (0.40.0) parser (>= 2.3.1.0, < 3.0) powerpack (~> 0.1) @@ -653,8 +654,7 @@ DEPENDENCIES responders (~> 2.0) rest-client (= 1.8.0) rspec-collection_matchers (= 1.1.3) - rspec-mocks (= 3.0.4) - rspec-rails (= 3.0.2) + rspec-rails (= 3.9.1) rubocop (= 0.40.0) rubyzip (= 1.1.7) sass-rails (= 5.0.7) From d5c7435cd0197d751a08e325ea6e0f51897d9533 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 23:29:21 +0000 Subject: [PATCH 033/334] update cancan to support rails 4.2 (no more warning message) --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 0b21a2f453..08129b7b17 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem 'traco', '2.0.0' # gem 'strong_parameters' gem 'protected_attributes', '1.1.4' # TODO: Only support Rails version < 5 (https://github.com/rails/protected_attributes) gem 'devise', '4.4.0' -gem 'cancan', '1.6.10' +gem 'cancancan', '1.17.0' # TODO, need upgrade to 2.0 for Rails 5 gem 'ahoy_matey', '1.6.1' # TODO: latest 5.0.2. Can't upgrade to 2.0 until upgrade to Rails 5 gem 'browser', '2.5.3' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 gem 'gon', '5.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index fdcaadf313..ebadd7b808 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -95,7 +95,7 @@ GEM browser (2.5.3) builder (3.2.4) byebug (11.1.3) - cancan (1.6.10) + cancancan (1.17.0) capistrano (3.11.0) airbrussh (>= 1.0.0) i18n @@ -585,7 +585,7 @@ DEPENDENCIES brightbox (= 2.3.9) browser (= 2.5.3) byebug - cancan (= 1.6.10) + cancancan (= 1.17.0) capistrano (= 3.11.0) capistrano-bundler (= 1.5.0) capistrano-local-precompile (= 1.2.0) From 4fc9892dbfa6392170c8ee05d7794fa1403be984 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 5 Jan 2024 23:49:45 +0000 Subject: [PATCH 034/334] https://stackoverflow.com/a/24595681/556780 --- .../admin/exports_controller_spec.rb | 12 +++++----- .../cites_trade/exports_controller_spec.rb | 6 ++--- .../species/exports_controller_spec.rb | 22 +++++++++---------- .../trade/exports_controller_spec.rb | 4 ++-- .../species/common_names_export_spec.rb | 3 +-- spec/models/species/documents_export_spec.rb | 3 +-- spec/models/species/listings_export_spec.rb | 3 +-- .../orphaned_taxon_concepts_export_spec.rb | 3 +-- .../species/species_reference_output_spec.rb | 3 +-- .../species/standard_reference_output_spec.rb | 3 +-- .../synonyms_and_trade_names_export_spec.rb | 3 +-- .../species/taxon_concepts_export_spec.rb | 3 +-- spec/workers/submission_worker_spec.rb | 4 ++-- 13 files changed, 32 insertions(+), 40 deletions(-) diff --git a/spec/controllers/admin/exports_controller_spec.rb b/spec/controllers/admin/exports_controller_spec.rb index 62ecc38bdf..1ce686f1a6 100644 --- a/spec/controllers/admin/exports_controller_spec.rb +++ b/spec/controllers/admin/exports_controller_spec.rb @@ -17,7 +17,7 @@ context "all" do it "returns taxon concepts names file" do create(:taxon_concept) - Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') + expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names" response.content_type.should eq("text/csv") response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") @@ -30,7 +30,7 @@ context "CITES_EU" do it "returns CITES_EU taxon concepts names file" do create_cites_eu_species - Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') + expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } response.content_type.should eq("text/csv") response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") @@ -43,7 +43,7 @@ context "CMS" do it "returns CMS taxon concepts names file" do create_cms_species - Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') + expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } response.content_type.should eq("text/csv") response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") @@ -62,7 +62,7 @@ it "returns taxon concepts distributions file" do tc = create(:taxon_concept) create(:distribution, :taxon_concept_id => tc.id) - Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') + expect_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions" response.content_type.should eq("text/csv") response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") @@ -76,7 +76,7 @@ it "returns CITES_EU taxon concepts distributions file" do tc = create_cites_eu_species create(:distribution, :taxon_concept_id => tc.id) - Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') + expect_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } response.content_type.should eq("text/csv") response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") @@ -90,7 +90,7 @@ it "returns CMS taxon concepts distributions file" do tc = create_cms_species create(:distribution, :taxon_concept_id => tc.id) - Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') + expect_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } response.content_type.should eq("text/csv") response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") diff --git a/spec/controllers/cites_trade/exports_controller_spec.rb b/spec/controllers/cites_trade/exports_controller_spec.rb index b82475bbd2..ff089067b0 100644 --- a/spec/controllers/cites_trade/exports_controller_spec.rb +++ b/spec/controllers/cites_trade/exports_controller_spec.rb @@ -13,7 +13,7 @@ context "comptab" do it "returns comptab shipments file" do create(:shipment) - Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') + expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") get :download, :filters => { :report_type => :comptab } @@ -22,7 +22,7 @@ end it "logs download information from public interface to the TradeDataDownload model" do create(:shipment) - Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') + expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") lambda do @@ -37,7 +37,7 @@ end context 'when shipments cannot be retrieved' do before(:each) do - Trade::ShipmentsExport.any_instance.stub(:export).and_return(false) + expect_any_instance_of(Trade::ShipmentsExport).to receive(:export).and_return(false) end it "redirects to home page" do get :download, :filters => { :report_type => :comptab } diff --git a/spec/controllers/species/exports_controller_spec.rb b/spec/controllers/species/exports_controller_spec.rb index edef05d280..0290ea1ff6 100644 --- a/spec/controllers/species/exports_controller_spec.rb +++ b/spec/controllers/species/exports_controller_spec.rb @@ -9,7 +9,7 @@ end context 'with ip address to csv separator conversion' do it 'sets separator to comma with local ip address' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("127.0.0.1") + expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("127.0.0.1") get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -20,8 +20,8 @@ end it 'sets separator to comma with UK ip address' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("194.59.188.126") - Sapi::GeoIP.any_instance.stub(:country_and_city).and_return({ :country => "GB", :city => "Cambridge" }) + expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("194.59.188.126") + expect_any_instance_of(Sapi::GeoIP).to receive(:country_and_city).and_return({ :country => "GB", :city => "Cambridge" }) get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -31,8 +31,8 @@ end it 'sets separator to semicolon with AF ip address' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("175.106.59.78") - Sapi::GeoIP.any_instance.stub(:country_and_city).and_return({ :country => "AF", :city => "Kabul" }) + expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("175.106.59.78") + expect_any_instance_of(Sapi::GeoIP).to receive(:country_and_city).and_return({ :country => "AF", :city => "Kabul" }) get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -42,7 +42,7 @@ end it 'sets separator back to comma when a user overrides the encoded default' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("175.106.59.78") + expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("175.106.59.78") get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => 'comma' } @@ -52,7 +52,7 @@ end it 'sets separator to comma when IP address is nil' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return(nil) + expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return(nil) get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -62,7 +62,7 @@ end it 'sets separator to comma when IP address is unknown' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return('unknown') + expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return('unknown') get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -86,7 +86,7 @@ # it "returns listed species file" do # create_cites_I_addition(:taxon_concept => create_cites_eu_species, :is_current => true) # Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings -# Species::ListingsExport.any_instance.stub(:public_file_name).and_return('cites_listings.csv') +# expect_any_instance_of(Species::ListingsExport).to receive(:public_file_name).and_return('cites_listings.csv') # get :download, :data_type => 'Listings', :filters => {:designation => 'CITES'} # response.content_type.should eq("text/csv") # response.headers["Content-Disposition"].should eq("attachment; filename=\"cites_listings.csv\"") @@ -107,7 +107,7 @@ # it "returns listed species file" do # create_eu_A_addition(:taxon_concept => create_cites_eu_species, :event =>reg2013, :effective_at => '2013-08-10', :is_current => true) # Sapi::StoredProcedures.rebuild_eu_taxonomy_and_listings -# Species::ListingsExport.any_instance.stub(:public_file_name).and_return('eu_listings.csv') +# expect_any_instance_of(Species::ListingsExport).to receive(:public_file_name).and_return('eu_listings.csv') # get :download, :data_type => 'Listings', :filters => {:designation => 'EU'} # response.content_type.should eq("text/csv") # response.headers["Content-Disposition"].should eq("attachment; filename=\"eu_listings.csv\"") @@ -128,7 +128,7 @@ # it "returns listed species file" do # create_cms_I_addition(:taxon_concept => create_cms_species, :is_current => true) # Sapi::StoredProcedures.rebuild_cms_taxonomy_and_listings -# Species::ListingsExport.any_instance.stub(:public_file_name).and_return('cms_listings.csv') +# expect_any_instance_of(Species::ListingsExport).to receive(:public_file_name).and_return('cms_listings.csv') # get :download, :data_type => 'Listings', :filters => {:designation => 'CMS'} # response.content_type.should eq("text/csv") # response.headers["Content-Disposition"].should eq("attachment; filename=\"cms_listings.csv\"") diff --git a/spec/controllers/trade/exports_controller_spec.rb b/spec/controllers/trade/exports_controller_spec.rb index 3c17a3ea42..82a133c616 100644 --- a/spec/controllers/trade/exports_controller_spec.rb +++ b/spec/controllers/trade/exports_controller_spec.rb @@ -12,7 +12,7 @@ end it "does not log download information from the admin interface" do create(:shipment) - Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') + expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') expect { get :download, :filters => { :report_type => :raw, @@ -25,7 +25,7 @@ end context 'when shipments cannot be retrieved' do before(:each) do - Trade::ShipmentsExport.any_instance.stub(:export).and_return(false) + expect_any_instance_of(Trade::ShipmentsExport).to receive(:export).and_return(false) end it "redirects to home page" do get :download, :filters => { :report_type => :comptab } diff --git a/spec/models/species/common_names_export_spec.rb b/spec/models/species/common_names_export_spec.rb index a6e54076d4..d9b4bf45fe 100644 --- a/spec/models/species/common_names_export_spec.rb +++ b/spec/models/species/common_names_export_spec.rb @@ -19,8 +19,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/common_names") ) - Species::CommonNamesExport.any_instance.stub(:path). - and_return("spec/public/downloads/common_names/") + expect_any_instance_of(Species::CommonNamesExport).to receive(:path).and_return("spec/public/downloads/common_names/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/common_names", true) diff --git a/spec/models/species/documents_export_spec.rb b/spec/models/species/documents_export_spec.rb index 83b62d67a4..e6fb2832c0 100644 --- a/spec/models/species/documents_export_spec.rb +++ b/spec/models/species/documents_export_spec.rb @@ -12,8 +12,7 @@ FileUtils.mkpath( File.expand_path("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}") ) - Species::DocumentsExport.any_instance.stub(:path). - and_return("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}/") + expect_any_instance_of(Species::DocumentsExport).to receive(:path).and_return("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}/") end after(:each) do FileUtils.remove_dir("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}", true) diff --git a/spec/models/species/listings_export_spec.rb b/spec/models/species/listings_export_spec.rb index d3ddcb42dc..6eb9c36866 100644 --- a/spec/models/species/listings_export_spec.rb +++ b/spec/models/species/listings_export_spec.rb @@ -25,8 +25,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/cites_listings") ) - Species::ListingsExport.any_instance.stub(:path). - and_return("spec/public/downloads/cites_listings/") + expect_any_instance_of(Species::ListingsExport).to receive(:path).and_return("spec/public/downloads/cites_listings/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/cites_listings", true) diff --git a/spec/models/species/orphaned_taxon_concepts_export_spec.rb b/spec/models/species/orphaned_taxon_concepts_export_spec.rb index 1856f791f8..37c4350518 100644 --- a/spec/models/species/orphaned_taxon_concepts_export_spec.rb +++ b/spec/models/species/orphaned_taxon_concepts_export_spec.rb @@ -20,8 +20,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/orphaned_taxon_concepts") ) - Species::OrphanedTaxonConceptsExport.any_instance.stub(:path). - and_return("spec/public/downloads/orphaned_taxon_concepts/") + expect_any_instance_of(Species::OrphanedTaxonConceptsExport).to receive(:path).and_return("spec/public/downloads/orphaned_taxon_concepts/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/orphaned_taxon_concepts", true) diff --git a/spec/models/species/species_reference_output_spec.rb b/spec/models/species/species_reference_output_spec.rb index 848e6ccc54..57b7dd3da3 100644 --- a/spec/models/species/species_reference_output_spec.rb +++ b/spec/models/species/species_reference_output_spec.rb @@ -19,8 +19,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/species_reference_output") ) - Species::SpeciesReferenceOutputExport.any_instance.stub(:path). - and_return("spec/public/downloads/species_reference_output/") + expect_any_instance_of(Species::SpeciesReferenceOutputExport).to receive(:path).and_return("spec/public/downloads/species_reference_output/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/species_reference_output", true) diff --git a/spec/models/species/standard_reference_output_spec.rb b/spec/models/species/standard_reference_output_spec.rb index 66c60c26a4..ee6eb97a40 100644 --- a/spec/models/species/standard_reference_output_spec.rb +++ b/spec/models/species/standard_reference_output_spec.rb @@ -19,8 +19,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/standard_reference_output") ) - Species::StandardReferenceOutputExport.any_instance.stub(:path). - and_return("spec/public/downloads/standard_reference_output/") + expect_any_instance_of(Species::StandardReferenceOutputExport).to receive(:path).and_return("spec/public/downloads/standard_reference_output/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/standard_reference_output", true) diff --git a/spec/models/species/synonyms_and_trade_names_export_spec.rb b/spec/models/species/synonyms_and_trade_names_export_spec.rb index b3af773884..bdf4e9d59e 100644 --- a/spec/models/species/synonyms_and_trade_names_export_spec.rb +++ b/spec/models/species/synonyms_and_trade_names_export_spec.rb @@ -25,8 +25,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/synonyms_and_trade_names") ) - Species::SynonymsAndTradeNamesExport.any_instance.stub(:path). - and_return("spec/public/downloads/synonyms_and_trade_names/") + expect_any_instance_of(Species::SynonymsAndTradeNamesExport).to receive(:path).and_return("spec/public/downloads/synonyms_and_trade_names/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/synonyms_and_trade_names", true) diff --git a/spec/models/species/taxon_concepts_export_spec.rb b/spec/models/species/taxon_concepts_export_spec.rb index 1020210648..08ec901a37 100644 --- a/spec/models/species/taxon_concepts_export_spec.rb +++ b/spec/models/species/taxon_concepts_export_spec.rb @@ -19,8 +19,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/taxon_concepts_names") ) - Species::TaxonConceptsNamesExport.any_instance.stub(:path). - and_return("spec/public/downloads/taxon_concepts_names/") + expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:path).and_return("spec/public/downloads/taxon_concepts_names/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/taxon_concepts_names", true) diff --git a/spec/workers/submission_worker_spec.rb b/spec/workers/submission_worker_spec.rb index 44ca697554..2717767070 100644 --- a/spec/workers/submission_worker_spec.rb +++ b/spec/workers/submission_worker_spec.rb @@ -33,8 +33,8 @@ def deliver ) @submitter = FactoryGirl.create(:user, role: User::MANAGER) Trade::ChangelogCsvGenerator.stub(:call).and_return(Tempfile.new('changelog.csv')) - SubmissionWorker.any_instance.stub(:upload_on_S3) - NotificationMailer.any_instance.stub(:mail).and_return(EmailMessageStub.new()) + expect_any_instance_of(SubmissionWorker).to receive(:upload_on_S3) + expect_any_instance_of(NotificationMailer).to receive(:mail).and_return(EmailMessageStub.new()) end context "when no primary errors" do pending(PENDING_REASON) if PENDING_REASON From b998bb1028348072abcf73154edf7a5cd9c449ec Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Mon, 8 Jan 2024 09:04:12 +0000 Subject: [PATCH 035/334] https://stackoverflow.com/a/52264547/556780 --- .../admin/taxon_relationships_controller_spec.rb | 2 +- spec/controllers/cites_trade/exports_controller_spec.rb | 8 ++++---- spec/models/checklist/pdf/history_annotations_key_spec.rb | 4 ++-- spec/models/checklist/pdf/index_annotations_key_spec.rb | 6 +++--- spec/models/sapi/geoip_spec.rb | 2 +- spec/workers/submission_worker_spec.rb | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spec/controllers/admin/taxon_relationships_controller_spec.rb b/spec/controllers/admin/taxon_relationships_controller_spec.rb index bb5f58b11f..df944b5cd3 100644 --- a/spec/controllers/admin/taxon_relationships_controller_spec.rb +++ b/spec/controllers/admin/taxon_relationships_controller_spec.rb @@ -27,7 +27,7 @@ describe "XHR POST create" do let(:taxon_relationship_attributes) { build_attributes(:taxon_relationship) } before do - TaxonRelationshipType.stub(:find).and_return(equal_relationship_type) + allow(TaxonRelationshipType).to receive(:find).and_return(equal_relationship_type) end it "renders create when successful" do xhr :post, :create, :taxon_relationship => taxon_relationship_attributes, diff --git a/spec/controllers/cites_trade/exports_controller_spec.rb b/spec/controllers/cites_trade/exports_controller_spec.rb index ff089067b0..ba47687043 100644 --- a/spec/controllers/cites_trade/exports_controller_spec.rb +++ b/spec/controllers/cites_trade/exports_controller_spec.rb @@ -14,8 +14,8 @@ it "returns comptab shipments file" do create(:shipment) expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') - Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) - Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") + allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) + allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") get :download, :filters => { :report_type => :comptab } response.content_type.should eq("text/csv") response.headers["Content-Disposition"].should eq("attachment; filename=\"shipments.csv\"") @@ -23,8 +23,8 @@ it "logs download information from public interface to the TradeDataDownload model" do create(:shipment) expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') - Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) - Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") + allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) + allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") lambda do get :download, :filters => { :report_type => 'comptab', diff --git a/spec/models/checklist/pdf/history_annotations_key_spec.rb b/spec/models/checklist/pdf/history_annotations_key_spec.rb index c7e017c25e..695760bc3a 100644 --- a/spec/models/checklist/pdf/history_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/history_annotations_key_spec.rb @@ -6,8 +6,8 @@ describe :annotations_key do subject { Checklist::Pdf::HistoryAnnotationsKey.new } specify { - subject.stub(:non_hash_annotations_key).and_return('x') - subject.stub(:hash_annotations_key).and_return('x') + allow(subject).to receive(:non_hash_annotations_key).and_return('x') + allow(subject).to receive(:hash_annotations_key).and_return('x') subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in" } end diff --git a/spec/models/checklist/pdf/index_annotations_key_spec.rb b/spec/models/checklist/pdf/index_annotations_key_spec.rb index 1b944817db..d1cbe83d79 100644 --- a/spec/models/checklist/pdf/index_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/index_annotations_key_spec.rb @@ -6,8 +6,8 @@ describe :annotations_key do subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - subject.stub(:non_hash_annotations_key).and_return('x') - subject.stub(:hash_annotations_key).and_return('x') + allow(subject).to receive(:non_hash_annotations_key).and_return('x') + allow(subject).to receive(:hash_annotations_key).and_return('x') subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in" } end @@ -100,7 +100,7 @@ end subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - LatexToPdf.stub(:html2latex).and_return('x') + allow(LatexToPdf).to receive(:html2latex).and_return('x') subject.non_hash_annotations_key.should == "\\section*{\\nonHashAnnotations}\n\\cfbox{orange}{\\superscript{1} \\textbf{\\textit{Foobarus bizarrus}}}\n\nx\n\n\\cfbox{green}{\\superscript{2} \\textbf{\\textit{Foobaria curiosa}}}\n\nx\n\n" } end diff --git a/spec/models/sapi/geoip_spec.rb b/spec/models/sapi/geoip_spec.rb index 2ac1e05243..eed8843eae 100644 --- a/spec/models/sapi/geoip_spec.rb +++ b/spec/models/sapi/geoip_spec.rb @@ -5,7 +5,7 @@ subject { Sapi::GeoIP.instance } before(:each) do bogota_latin1 = "Bogotá".encode('ISO-8859-1', 'UTF-8') - subject.stub(:country_and_city).and_return( + allow(subject).to receive(:country_and_city).and_return( { country: 'Colombia', city: bogota_latin1 diff --git a/spec/workers/submission_worker_spec.rb b/spec/workers/submission_worker_spec.rb index 2717767070..083aebefb8 100644 --- a/spec/workers/submission_worker_spec.rb +++ b/spec/workers/submission_worker_spec.rb @@ -32,7 +32,7 @@ def deliver :iso_code2 => 'PT' ) @submitter = FactoryGirl.create(:user, role: User::MANAGER) - Trade::ChangelogCsvGenerator.stub(:call).and_return(Tempfile.new('changelog.csv')) + allow(Trade::ChangelogCsvGenerator).to receive(:call).and_return(Tempfile.new('changelog.csv')) expect_any_instance_of(SubmissionWorker).to receive(:upload_on_S3) expect_any_instance_of(NotificationMailer).to receive(:mail).and_return(EmailMessageStub.new()) end From 9027f459a72fa7c5987993c55a8ec15bbd58f35d Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Mon, 8 Jan 2024 09:22:24 +0000 Subject: [PATCH 036/334] https://stackoverflow.com/questions/35379535/how-to-resolve-rspecs-deprecation-warning-about-the-new-expect-syntax --- .../controllers/admin/exports_controller_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/controllers/admin/exports_controller_spec.rb b/spec/controllers/admin/exports_controller_spec.rb index 1ce686f1a6..14d1f481d0 100644 --- a/spec/controllers/admin/exports_controller_spec.rb +++ b/spec/controllers/admin/exports_controller_spec.rb @@ -6,8 +6,8 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") - response.should render_template("layouts/admin") + expect(response).to render_template("index") + expect(response).to render_template("layouts/admin") end end describe "GET download with data_type=Names" do @@ -24,7 +24,7 @@ end it "redirects when no results" do get :download, :data_type => "Names" - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end context "CITES_EU" do @@ -37,7 +37,7 @@ end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end context "CMS" do @@ -50,7 +50,7 @@ end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end end @@ -69,7 +69,7 @@ end it "redirects when no results" do get :download, :data_type => "Distributions" - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end context "CITES_EU" do @@ -83,7 +83,7 @@ end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end context "CMS" do @@ -97,7 +97,7 @@ end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end end From db11a3b8dd127530972cccf80f330f63725c951b Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Mon, 8 Jan 2024 09:25:47 +0000 Subject: [PATCH 037/334] Use gem `transpec` to upgrade rspec syntax --- .../admin/change_types_controller_spec.rb | 14 +- .../admin/cites_acs_controller_spec.rb | 4 +- .../admin/cites_cops_controller_spec.rb | 4 +- ..._extraordinary_meetings_controller_spec.rb | 4 +- .../cites_hash_annotations_controller_spec.rb | 4 +- .../admin/cites_pcs_controller_spec.rb | 4 +- ...uspension_notifications_controller_spec.rb | 4 +- .../cites_suspensions_controller_spec.rb | 20 +-- .../admin/cites_tcs_controller_spec.rb | 4 +- .../admin/designations_controller_spec.rb | 18 +-- .../admin/distributions_controller_spec.rb | 26 ++-- .../admin/document_batches_controller_spec.rb | 12 +- .../admin/documents_controller_spec.rb | 66 ++++----- .../admin/ec_srgs_controller_spec.rb | 4 +- .../eu_council_regulations_controller_spec.rb | 4 +- .../eu_hash_annotations_controller_spec.rb | 4 +- ...mplementing_regulations_controller_spec.rb | 4 +- .../admin/eu_opinions_controller_spec.rb | 42 +++--- .../admin/eu_regulations_controller_spec.rb | 6 +- ..._suspension_regulations_controller_spec.rb | 6 +- .../admin/eu_suspensions_controller_spec.rb | 6 +- .../admin/events_controller_spec.rb | 22 +-- .../admin/exports_controller_spec.rb | 24 ++-- .../admin/geo_entities_controller_spec.rb | 14 +- .../hybrid_relationships_controller_spec.rb | 18 +-- .../admin/instruments_controller_spec.rb | 28 ++-- .../admin/languages_controller_spec.rb | 14 +- .../admin/listing_changes_controller_spec.rb | 10 +- .../lump_controller_spec.rb | 32 ++--- .../split_controller_spec.rb | 60 ++++---- .../status_swap_controller_spec.rb | 22 +-- .../status_to_accepted_controller_spec.rb | 16 +-- .../status_to_synonym_controller_spec.rb | 18 +-- .../nomenclature_changes_controller_spec.rb | 6 +- .../admin/ranks_controller_spec.rb | 14 +- .../admin/references_controller_spec.rb | 18 +-- .../admin/species_listings_controller_spec.rb | 14 +- .../admin/srg_histories_controller_spec.rb | 12 +- .../synonym_relationships_controller_spec.rb | 18 +-- .../controllers/admin/tags_controller_spec.rb | 14 +- ...taxon_cites_suspensions_controller_spec.rb | 26 ++-- .../admin/taxon_commons_controller_spec.rb | 36 ++--- .../taxon_concept_comments_controller_spec.rb | 10 +- ...axon_concept_references_controller_spec.rb | 18 +-- .../admin/taxon_concepts_controller_spec.rb | 42 +++--- .../taxon_eu_suspensions_controller_spec.rb | 36 ++--- .../taxon_listing_changes_controller_spec.rb | 40 +++--- .../admin/taxon_quotas_controller_spec.rb | 30 ++-- .../taxon_relationships_controller_spec.rb | 26 ++-- .../admin/taxonomies_controller_spec.rb | 24 ++-- ...ade_names_relationships_controller_spec.rb | 18 +-- .../admin/users_controller_spec.rb | 18 +-- ...complete_taxon_concepts_controller_spec.rb | 4 +- .../document_geo_entities_controller_spec.rb | 6 +- .../api/document_tags_controller.rb | 2 +- .../api/documents_controller_spec.rb | 20 +-- .../controllers/api/events_controller_spec.rb | 4 +- .../api/geo_entities_controller_spec.rb | 4 +- .../api/purposes_controller_spec.rb | 2 +- .../api/sources_controller_spec.rb | 2 +- spec/controllers/api/terms_controller_spec.rb | 2 +- spec/controllers/api/units_controller_spec.rb | 2 +- .../checklist/geo_entities_controller_spec.rb | 4 +- .../taxon_concepts_controller_spec.rb | 4 +- .../cites_trade/exports_controller_spec.rb | 10 +- .../cites_trade/shipments_controller_spec.rb | 16 +-- spec/controllers/pages_controller_spec.rb | 4 +- .../registrations_controller_spec.rb | 8 +- .../annual_report_uploads_controller_spec.rb | 10 +- .../trade/ember_controller_spec.rb | 2 +- .../trade/exports_controller_spec.rb | 2 +- .../sandbox_shipments_controller_spec.rb | 16 +-- .../trade/shipments_controller_spec.rb | 54 ++++---- .../validation_errors_controller_spec.rb | 2 +- .../trade/validation_rules_controller_spec.rb | 2 +- spec/helpers/admin_helper_spec.rb | 8 +- spec/helpers/listing_changes_helper_spec.rb | 16 ++- spec/models/annotation_spec.rb | 6 +- spec/models/change_type_spec.rb | 4 +- spec/models/checklist/annotations_spec.rb | 4 +- .../appendix_population_and_region_spec.rb | 14 +- .../checklist/appendix_population_spec.rb | 26 ++-- spec/models/checklist/appendix_spec.rb | 4 +- spec/models/checklist/checklist_spec.rb | 6 +- spec/models/checklist/common_names_spec.rb | 14 +- .../checklist/higher_taxa_injector_spec.rb | 39 +++--- .../models/checklist/higher_taxa_item_spec.rb | 4 +- spec/models/checklist/order_spec.rb | 25 ++-- .../pdf/history_annotations_key_spec.rb | 4 +- spec/models/checklist/pdf/history_spec.rb | 8 +- .../pdf/index_annotations_key_spec.rb | 6 +- .../checklist/pdf/index_fetcher_spec.rb | 4 +- spec/models/checklist/scientific_name_spec.rb | 8 +- spec/models/checklist/synonyms_spec.rb | 2 +- .../taxon_concept_prefix_matcher_spec.rb | 8 +- spec/models/checklist/timeline_spec.rb | 46 ++++--- .../timelines_for_taxon_concept_spec.rb | 20 +-- spec/models/cites_cop_spec.rb | 12 +- .../cites_suspension_notification_spec.rb | 18 +-- spec/models/cites_suspension_spec.rb | 14 +- spec/models/common_name_spec.rb | 6 +- spec/models/dashboard_stats_species_spec.rb | 6 +- spec/models/dashboard_stats_trade_spec.rb | 8 +- spec/models/designation_spec.rb | 28 ++-- spec/models/eu_decision_spec.rb | 12 +- spec/models/eu_opinion_spec.rb | 14 +- spec/models/eu_regulation_spec.rb | 22 +-- spec/models/eu_suspension_spec.rb | 36 ++--- spec/models/event_spec.rb | 16 +-- spec/models/geo_entity_spec.rb | 16 +-- spec/models/html_to_latex_spec.rb | 12 +- spec/models/hybrid_relationship_spec.rb | 6 +- spec/models/listing_change_spec.rb | 10 +- spec/models/nomenclature_change/lump_spec.rb | 2 +- .../models/nomenclature_change/output_spec.rb | 2 +- spec/models/nomenclature_change/split_spec.rb | 2 +- .../status_to_accepted_spec.rb | 4 +- .../status_to_synonym_spec.rb | 8 +- spec/models/preset_tag_spec.rb | 10 +- spec/models/purpose_spec.rb | 6 +- spec/models/quota_spec.rb | 18 +-- spec/models/rank_spec.rb | 18 +-- spec/models/sapi/geoip_spec.rb | 2 +- spec/models/source_spec.rb | 8 +- .../species/common_names_export_spec.rb | 8 +- spec/models/species/documents_export_spec.rb | 10 +- .../species/hybrid_prefix_matcher_spec.rb | 6 +- .../invisible_subspecies_search_spec.rb | 4 +- spec/models/species/listings_export_spec.rb | 26 ++-- .../orphaned_taxon_concepts_export_spec.rb | 8 +- spec/models/species/search_spec.rb | 8 +- .../species/species_reference_output_spec.rb | 8 +- .../species/standard_reference_output_spec.rb | 8 +- .../synonyms_and_trade_names_export_spec.rb | 8 +- .../taxon_concept_prefix_matcher_spec.rb | 30 ++-- .../species/taxon_concepts_export_spec.rb | 8 +- .../species/trade_name_prefix_matcher_spec.rb | 18 +-- .../species/visible_subspecies_search_spec.rb | 2 +- spec/models/synonym_relationship_spec.rb | 6 +- spec/models/taxon_common_spec.rb | 2 +- spec/models/taxon_concept/agalychnis_spec.rb | 24 ++-- spec/models/taxon_concept/agave_spec.rb | 24 ++-- spec/models/taxon_concept/ailuropoda_spec.rb | 16 +-- .../taxon_concept/arctocephalus_spec.rb | 18 +-- .../taxon_concept/boa_constrictor_spec.rb | 80 +++++------ .../taxon_concept/caiman_latirostris_spec.rb | 44 +++--- spec/models/taxon_concept/canis_lupus_spec.rb | 22 +-- .../taxon_concept/caretta_caretta_cms_spec.rb | 12 +- .../taxon_concept/cedrela_montana_spec.rb | 12 +- .../taxon_concept/cervus_elaphus_cms_spec.rb | 14 +- .../taxon_concept/cervus_elaphus_spec.rb | 62 ++++----- spec/models/taxon_concept/colophon_spec.rb | 24 ++-- spec/models/taxon_concept/dalbergia_spec.rb | 12 +- spec/models/taxon_concept/destroy_spec.rb | 26 ++-- spec/models/taxon_concept/diospyros_spec.rb | 24 ++-- .../taxon_concept/falconiformes_spec.rb | 68 +++++----- spec/models/taxon_concept/hybrids_spec.rb | 16 +-- .../loxodonta_africana_cms_spec.rb | 16 +-- .../taxon_concept/loxodonta_africana_spec.rb | 18 +-- .../taxon_concept/mellivora_capensis_spec.rb | 18 +-- spec/models/taxon_concept/moschus_spec.rb | 34 ++--- .../taxon_concept/natator_depressus_spec.rb | 4 +- .../taxon_concept/notomys_aquilo_spec.rb | 8 +- .../taxon_concept/panax_ginseng_spec.rb | 16 +-- spec/models/taxon_concept/pereskia_spec.rb | 24 ++-- .../platysternon_megacephalum_spec.rb | 16 +-- .../taxon_concept/pristis_microdon_spec.rb | 16 +-- .../taxon_concept/pseudomys_fieldi_spec.rb | 12 +- .../taxon_concept/psittaciformes_spec.rb | 72 +++++----- spec/models/taxon_concept/synonyms_spec.rb | 20 +-- spec/models/taxon_concept/tapiridae_spec.rb | 24 ++-- spec/models/taxon_concept/trade_names_spec.rb | 20 +-- spec/models/taxon_concept/uroplatus_spec.rb | 34 ++--- spec/models/taxon_concept/validation_spec.rb | 32 ++--- spec/models/taxon_concept/varanidae_spec.rb | 32 ++--- .../taxon_concept_prefix_matcher_spec.rb | 23 ++-- spec/models/taxon_relationship_spec.rb | 14 +- spec/models/taxonomy_spec.rb | 20 +-- spec/models/term_spec.rb | 8 +- .../models/trade/annual_report_upload_spec.rb | 14 +- .../distinct_values_validation_rule_spec.rb | 6 +- spec/models/trade/filter_spec.rb | 128 +++++++++--------- .../trade/inclusion_validation_rule_spec.rb | 14 +- spec/models/trade/permit_matcher_spec.rb | 10 +- .../pov_inclusion_validation_rule_spec.rb | 8 +- spec/models/trade/sandbox_spec.rb | 2 +- spec/models/trade/sandbox_template_spec.rb | 6 +- .../scoped_inclusion_validation_rule_spec.rb | 4 +- spec/models/trade/shipment_spec.rb | 62 ++++----- .../trade/shipments_comptab_export_spec.rb | 8 +- spec/models/trade/shipments_export_spec.rb | 8 +- .../shipments_gross_exports_export_spec.rb | 8 +- .../shipments_gross_imports_export_spec.rb | 8 +- .../shipments_net_exports_export_spec.rb | 8 +- .../shipments_net_imports_export_spec.rb | 8 +- ...cept_appendix_year_validation_rule_spec.rb | 18 +-- ...xon_concept_source_validation_rule_spec.rb | 6 +- spec/models/trade/validation_rule_spec.rb | 6 +- spec/models/trade_restriction_spec.rb | 16 +-- spec/models/unit_spec.rb | 6 +- spec/models/user_spec.rb | 26 ++-- .../eu_regulation_activation_worker_spec.rb | 8 +- .../event_listing_changes_copy_worker_spec.rb | 16 +-- spec/workers/quotas_copy_worker_spec.rb | 108 +++++++-------- 204 files changed, 1700 insertions(+), 1683 deletions(-) diff --git a/spec/controllers/admin/change_types_controller_spec.rb b/spec/controllers/admin/change_types_controller_spec.rb index 04bd95bc65..166354d29a 100644 --- a/spec/controllers/admin/change_types_controller_spec.rb +++ b/spec/controllers/admin/change_types_controller_spec.rb @@ -11,22 +11,22 @@ change_type2_2 = create(:change_type, :designation => designation2, :name => 'DEL') change_type1 = create(:change_type, :designation => designation1, :name => 'ADD') get :index - assigns(:change_types).should eq([change_type1, change_type2_1, change_type2_2]) + expect(assigns(:change_types)).to eq([change_type1, change_type2_1, change_type2_2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, change_type: build_attributes(:change_type) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, change_type: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -34,11 +34,11 @@ let(:change_type) { create(:change_type) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => change_type.id, :change_type => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => change_type.id, :change_type => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -46,7 +46,7 @@ let(:change_type) { create(:change_type) } it "redirects after delete" do delete :destroy, :id => change_type.id - response.should redirect_to(admin_change_types_url) + expect(response).to redirect_to(admin_change_types_url) end end diff --git a/spec/controllers/admin/cites_acs_controller_spec.rb b/spec/controllers/admin/cites_acs_controller_spec.rb index 084851a8a5..fc922035c7 100644 --- a/spec/controllers/admin/cites_acs_controller_spec.rb +++ b/spec/controllers/admin/cites_acs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_acs sorted by name" do get :index - assigns(:cites_acs).should eq([@cites_ac1, @cites_ac2]) + expect(assigns(:cites_acs)).to eq([@cites_ac1, @cites_ac2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_cops_controller_spec.rb b/spec/controllers/admin/cites_cops_controller_spec.rb index 523a9dd898..a42f74943d 100644 --- a/spec/controllers/admin/cites_cops_controller_spec.rb +++ b/spec/controllers/admin/cites_cops_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_cops sorted by name" do get :index - assigns(:cites_cops).should eq([@cites_cop2, @cites_cop1]) + expect(assigns(:cites_cops)).to eq([@cites_cop2, @cites_cop1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb b/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb index 6045ec8fce..00ff71be23 100644 --- a/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb +++ b/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_extraordinary_meetings sorted by name" do get :index - assigns(:cites_extraordinary_meetings).should eq([@cites_ex1, @cites_ex2]) + expect(assigns(:cites_extraordinary_meetings)).to eq([@cites_ex1, @cites_ex2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_hash_annotations_controller_spec.rb b/spec/controllers/admin/cites_hash_annotations_controller_spec.rb index 03813a42cd..8ab9bf1523 100644 --- a/spec/controllers/admin/cites_hash_annotations_controller_spec.rb +++ b/spec/controllers/admin/cites_hash_annotations_controller_spec.rb @@ -20,11 +20,11 @@ describe "GET index" do it "assigns @annotations sorted by parent_symbol and symbol" do get :index - assigns(:annotations).should eq([@annotation2, @annotation1]) + expect(assigns(:annotations)).to eq([@annotation2, @annotation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_pcs_controller_spec.rb b/spec/controllers/admin/cites_pcs_controller_spec.rb index 828cf1886f..8256cf5b21 100644 --- a/spec/controllers/admin/cites_pcs_controller_spec.rb +++ b/spec/controllers/admin/cites_pcs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_pcs sorted by name" do get :index - assigns(:cites_pcs).should eq([@cites_pc1, @cites_pc2]) + expect(assigns(:cites_pcs)).to eq([@cites_pc1, @cites_pc2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb b/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb index 3fcb985475..d658fd1419 100644 --- a/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb +++ b/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb @@ -12,13 +12,13 @@ describe "GET index" do it "assigns @cites_suspension_notifications sorted by name" do get :index - assigns(:cites_suspension_notifications).should eq([ + expect(assigns(:cites_suspension_notifications)).to eq([ @cites_suspension_notification2, @cites_suspension_notification1 ]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_suspensions_controller_spec.rb b/spec/controllers/admin/cites_suspensions_controller_spec.rb index e350f2e175..cfa6ce7e5d 100644 --- a/spec/controllers/admin/cites_suspensions_controller_spec.rb +++ b/spec/controllers/admin/cites_suspensions_controller_spec.rb @@ -10,7 +10,7 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end it "assigns @cites_suspensions" do get :index @@ -21,14 +21,14 @@ describe "GET new" do it "renders the new template" do get :new - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) country = create(:geo_entity) get :new - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -39,14 +39,14 @@ :cites_suspension => { :start_notification_id => create_cites_suspension_notification.id } - response.should redirect_to( + expect(response).to redirect_to( admin_cites_suspensions_url ) end end it "renders new when not successful" do post :create, :cites_suspension => {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -59,14 +59,14 @@ end it "renders the edit template" do get :edit, :id => @cites_suspension.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) country = create(:geo_entity) get :new, :id => @cites_suspension.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -85,7 +85,7 @@ :publication_date => 1.week.ago }, :id => @cites_suspension.id - response.should redirect_to( + expect(response).to redirect_to( admin_cites_suspensions_url ) end @@ -97,7 +97,7 @@ :start_notification_id => nil }, :id => @cites_suspension.id - response.should render_template('edit') + expect(response).to render_template('edit') end end @@ -110,7 +110,7 @@ end it "redirects after delete" do delete :destroy, :id => @cites_suspension.id - response.should redirect_to( + expect(response).to redirect_to( admin_cites_suspensions_url ) end diff --git a/spec/controllers/admin/cites_tcs_controller_spec.rb b/spec/controllers/admin/cites_tcs_controller_spec.rb index d084dc802c..8de97bc2c4 100644 --- a/spec/controllers/admin/cites_tcs_controller_spec.rb +++ b/spec/controllers/admin/cites_tcs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_tcs sorted by name" do get :index - assigns(:cites_tcs).should eq([@cites_tc1, @cites_tc2]) + expect(assigns(:cites_tcs)).to eq([@cites_tc1, @cites_tc2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/designations_controller_spec.rb b/spec/controllers/admin/designations_controller_spec.rb index 19add5d096..52c724438c 100644 --- a/spec/controllers/admin/designations_controller_spec.rb +++ b/spec/controllers/admin/designations_controller_spec.rb @@ -11,18 +11,18 @@ describe "GET index" do it "assigns @designations sorted by name" do get :index - assigns(:designations).should eq([@designation2, @designation1]) + expect(assigns(:designations)).to eq([@designation2, @designation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - response.body.should have_json_size(2) - parse_json(response.body, "0/text").should == 'AA' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/text")).to eq('AA') end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, designation: build_attributes(:designation) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, designation: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -43,11 +43,11 @@ let(:designation) { create(:designation) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => designation.id, :designation => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => designation.id, :designation => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -55,7 +55,7 @@ let(:designation) { create(:designation) } it "redirects after delete" do delete :destroy, :id => designation.id - response.should redirect_to(admin_designations_url) + expect(response).to redirect_to(admin_designations_url) end end diff --git a/spec/controllers/admin/distributions_controller_spec.rb b/spec/controllers/admin/distributions_controller_spec.rb index c8697e97db..08665f8e0c 100644 --- a/spec/controllers/admin/distributions_controller_spec.rb +++ b/spec/controllers/admin/distributions_controller_spec.rb @@ -9,21 +9,21 @@ describe "XHR GET 'new'" do it "returns http success and renders the new template" do xhr :get, :new, :taxon_concept_id => @taxon_concept.id - response.should be_success - response.should render_template('new') + expect(response).to be_success + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) country = create(:geo_entity) xhr :get, :new, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end it "assigns the distribution variable" do xhr :get, :new, :taxon_concept_id => @taxon_concept.id - assigns(:distribution).should_not be_nil - assigns(:tags).should_not be_nil - assigns(:geo_entities).should_not be_nil + expect(assigns(:distribution)).not_to be_nil + expect(assigns(:tags)).not_to be_nil + expect(assigns(:geo_entities)).not_to be_nil end end @@ -39,7 +39,7 @@ :reference => { :reference_id => reference.id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders create when successful and is creating a reference" do xhr :post, :create, @@ -52,7 +52,7 @@ :author => reference.author, :year => reference.year } - response.should render_template("create") + expect(response).to render_template("create") end end @@ -61,19 +61,19 @@ it "renders the new template" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the distribution variable" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - assigns(:distribution).should_not be_nil + expect(assigns(:distribution)).not_to be_nil end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -87,7 +87,7 @@ :distribution => { :geo_entity_id => geo_entity.id } - response.should be_success + expect(response).to be_success end end @@ -97,7 +97,7 @@ delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_distributions_url(distribution.taxon_concept) ) end diff --git a/spec/controllers/admin/document_batches_controller_spec.rb b/spec/controllers/admin/document_batches_controller_spec.rb index 4898efb69f..5fb0a73e71 100644 --- a/spec/controllers/admin/document_batches_controller_spec.rb +++ b/spec/controllers/admin/document_batches_controller_spec.rb @@ -10,14 +10,14 @@ let(:document) { create(:document) } it "renders the new template" do get :new - response.should render_template('new') + expect(response).to render_template('new') end end context "when event" do let(:document) { create(:document, event_id: event.id) } it "renders the new template" do get :new - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -45,7 +45,7 @@ post :create, document_batch: { date: Date.today, documents_attributes: { "0" => document_attrs }, files: files } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) end it "does not create a new Document" do @@ -60,7 +60,7 @@ post :create, document_batch: { date: nil, documents_attributes: { "0" => document_attrs }, files: files } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -71,14 +71,14 @@ post :create, event_id: event.id, document_batch: { date: Date.today, documents_attributes: { "0" => document_attrs }, files: files } - response.should redirect_to(admin_event_documents_url(event)) + expect(response).to redirect_to(admin_event_documents_url(event)) end it "renders new when not successful" do post :create, event_id: event.id, document_batch: { date: nil, documents_attributes: { "0" => document_attrs }, files: files } - response.should render_template('new') + expect(response).to render_template('new') end end end diff --git a/spec/controllers/admin/documents_controller_spec.rb b/spec/controllers/admin/documents_controller_spec.rb index 0d8c2388b7..2039145a4e 100644 --- a/spec/controllers/admin/documents_controller_spec.rb +++ b/spec/controllers/admin/documents_controller_spec.rb @@ -28,41 +28,41 @@ it "assigns @documents sorted by time of creation" do get :index - assigns(:documents).should eq([@document3, @public_document, @document2, @document1]) + expect(assigns(:documents)).to eq([@document3, @public_document, @document2, @document1]) end context "search" do it "runs a full text search on title" do get :index, 'title_query' => 'good' - assigns(:documents).should eq([@document2]) + expect(assigns(:documents)).to eq([@document2]) end it "retrieves documents inclusive of the given start date" do get :index, "document_date_start" => '25/12/2014' - assigns(:documents).should eq([@public_document, @document2, @document1]) + expect(assigns(:documents)).to eq([@public_document, @document2, @document1]) end it "retrieves documents inclusive of the given end date" do get :index, "document_date_end" => '01/01/2014' - assigns(:documents).should eq([@document3]) + expect(assigns(:documents)).to eq([@document3]) end it "retrieves documents after the given date" do get :index, "document_date_start" => '10/01/2014' - assigns(:documents).should eq([@public_document, @document2, @document1]) + expect(assigns(:documents)).to eq([@public_document, @document2, @document1]) end it "retrieves documents before the given date" do get :index, "document_date_end" => '10/01/2014' - assigns(:documents).should eq([@document3]) + expect(assigns(:documents)).to eq([@document3]) end it "ignores invalid dates" do get :index, "document_date_start" => '34/24/12', "document_date_end" => '34/24/12' - assigns(:documents).should eq([@document3, @public_document, @document2, @document1]) + expect(assigns(:documents)).to eq([@document3, @public_document, @document2, @document1]) end it "retrieves documents for taxon concept" do get :index, "taxon_concepts_ids" => taxon_concept.id - assigns(:documents).should eq([@public_document, @document1]) + expect(assigns(:documents)).to eq([@public_document, @document1]) end it "retrieves documents for geo entity" do get :index, "geo_entities_ids" => [geo_entity.id] - assigns(:documents).should eq([@document2]) + expect(assigns(:documents)).to eq([@document2]) end context 'by proposal outcome' do before(:each) do @@ -72,7 +72,7 @@ end it "retrieves documents for tag" do get :index, "document_tags_ids" => [proposal_outcome.id] - assigns(:documents).map(&:id).should eq([@document3].map(&:id)) + expect(assigns(:documents).map(&:id)).to eq([@document3].map(&:id)) end end context 'by document tags' do @@ -83,11 +83,11 @@ end it "retrieves documents for review_phase tag" do get :index, "document_tags_ids" => [review_phase.id] - assigns(:documents).map(&:id).should eq([@document3].map(&:id)) + expect(assigns(:documents).map(&:id)).to eq([@document3].map(&:id)) end it "retrieves documents for process_stage tag" do get :index, "document_tags_ids" => [process_stage.id] - assigns(:documents).map(&:id).should eq([@document3].map(&:id)) + expect(assigns(:documents).map(&:id)).to eq([@document3].map(&:id)) end end end @@ -95,27 +95,27 @@ context "when no event" do it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end context "when event" do it "renders the event/documents/index template" do get :index, events_ids: [event.id] - response.should render_template('admin/event_documents/index') + expect(response).to render_template('admin/event_documents/index') end it "assigns @documents for event, sorted by title" do @document3 = create(:document, title: 'CC hello world', event: event2) DocumentSearch.refresh_citations_and_documents get :index, events_ids: [event.id, event2.id] - assigns(:documents).should eq([@document3, @document2, @document1, @public_document]) + expect(assigns(:documents)).to eq([@document3, @document2, @document1, @public_document]) end end context "when secretariat is logged in" do login_secretariat_user it "returns only public documents" do get :index - assigns(:documents).should eq([@public_document]) + expect(assigns(:documents)).to eq([@public_document]) end end end @@ -128,7 +128,7 @@ it "renders the edit template" do get :edit, id: document.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -138,12 +138,12 @@ let(:document) { create(:document) } it "redirects to index when successful" do put :update, id: document.id, document: { date: Date.today } - response.should redirect_to(admin_documents_url) - flash[:notice].should_not be_nil + expect(response).to redirect_to(admin_documents_url) + expect(flash[:notice]).not_to be_nil end it "renders new when not successful" do put :update, id: document.id, document: { date: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -151,12 +151,12 @@ let(:document) { create(:document, event_id: event.id) } it "redirects to index when successful" do put :update, id: document.id, event_id: event.id, document: { date: Date.today } - response.should redirect_to(admin_event_documents_url(event)) - flash[:notice].should_not be_nil + expect(response).to redirect_to(admin_event_documents_url(event)) + expect(flash[:notice]).not_to be_nil end it "renders new when not successful" do put :update, id: document.id, event_id: event.id, document: { date: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -170,7 +170,7 @@ put :update, id: document.id, document: { date: Date.today, review_details_attributes: { review_phase_id: review_phase.id } } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) expect(document.reload.review_details.review_phase_id).to eq(review_phase.id) end @@ -179,7 +179,7 @@ put :update, id: document.id, document: { date: Date.today, review_details_attributes: { process_stage_id: process_stage.id } } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) expect(document.reload.review_details.process_stage_id).to eq(process_stage.id) end @@ -188,7 +188,7 @@ put :update, id: document.id, document: { date: Date.today, review_details_attributes: { recommended_category: recommended_category } } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) expect(document.reload.review_details.recommended_category).to eq(recommended_category) end @@ -202,7 +202,7 @@ put :update, id: document.id, document: { date: Date.today, proposal_details_attributes: { proposal_outcome_id: proposal_outcome.id } } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) expect(document.reload.proposal_details.proposal_outcome_id).to eq(proposal_outcome.id) end @@ -225,7 +225,7 @@ } it "redirects after delete" do delete :destroy, id: document.id - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) end end @@ -243,9 +243,9 @@ it "returns properly formatted json" do xhr :get, :autocomplete, :format => 'json', :title => 'tit' - response.body.should have_json_size(2) - parse_json(response.body, "0/title").should == 'Title' - parse_json(response.body, "1/title").should == 'Title2' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/title")).to eq('Title') + expect(parse_json(response.body, "1/title")).to eq('Title2') end end @@ -253,8 +253,8 @@ it "returns properly formatted json" do xhr :get, :autocomplete, :format => 'json', :title => 'tit', :event_id => event.id - response.body.should have_json_size(1) - parse_json(response.body, "0/title").should == 'Title' + expect(response.body).to have_json_size(1) + expect(parse_json(response.body, "0/title")).to eq('Title') end end end diff --git a/spec/controllers/admin/ec_srgs_controller_spec.rb b/spec/controllers/admin/ec_srgs_controller_spec.rb index 1c3309c1e5..719c08ef5f 100644 --- a/spec/controllers/admin/ec_srgs_controller_spec.rb +++ b/spec/controllers/admin/ec_srgs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @ec_srgs sorted by name" do get :index - assigns(:ec_srgs).sort.should eq([@cites_srg1, @cites_srg2].sort) + expect(assigns(:ec_srgs).sort).to eq([@cites_srg1, @cites_srg2].sort) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/eu_council_regulations_controller_spec.rb b/spec/controllers/admin/eu_council_regulations_controller_spec.rb index dc65da0f49..d69f1fff86 100644 --- a/spec/controllers/admin/eu_council_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_council_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_regulations sorted by effective_at" do get :index - assigns(:eu_council_regulations).should eq([@eu_regulation2, @eu_regulation1]) + expect(assigns(:eu_council_regulations)).to eq([@eu_regulation2, @eu_regulation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/eu_hash_annotations_controller_spec.rb b/spec/controllers/admin/eu_hash_annotations_controller_spec.rb index 58e892e822..f53a38cba9 100644 --- a/spec/controllers/admin/eu_hash_annotations_controller_spec.rb +++ b/spec/controllers/admin/eu_hash_annotations_controller_spec.rb @@ -20,11 +20,11 @@ describe "GET index" do it "assigns @annotations sorted by parent_symbol and symbol" do get :index - assigns(:annotations).should eq([@annotation2, @annotation1]) + expect(assigns(:annotations)).to eq([@annotation2, @annotation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb b/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb index 19914088ab..d3181c415a 100644 --- a/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_regulations sorted by effective_at" do get :index - assigns(:eu_implementing_regulations).should eq([@eu_regulation2, @eu_regulation1]) + expect(assigns(:eu_implementing_regulations)).to eq([@eu_regulation2, @eu_regulation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/eu_opinions_controller_spec.rb b/spec/controllers/admin/eu_opinions_controller_spec.rb index db3c8fc652..c54d779d05 100644 --- a/spec/controllers/admin/eu_opinions_controller_spec.rb +++ b/spec/controllers/admin/eu_opinions_controller_spec.rb @@ -11,24 +11,24 @@ describe "GET index" do it "renders the index template" do get :index, taxon_concept_id: @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, taxon_concept_id: @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do create(:geo_entity, :geo_entity_type_id => territory_geo_entity_type.id) create(:geo_entity) get :new, taxon_concept_id: @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -54,7 +54,7 @@ ) }, taxon_concept_id: @taxon_concept.id - response.should redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) + expect(response).to redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) end end context "when event is present" do @@ -70,7 +70,7 @@ ) }, taxon_concept_id: @taxon_concept.id - response.should redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) + expect(response).to redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) end end end @@ -79,7 +79,7 @@ it "renders new" do post :create, eu_opinion: {}, taxon_concept_id: @taxon_concept.id - response.should render_template("new") + expect(response).to render_template("new") end end end @@ -94,12 +94,12 @@ end it "renders the edit template" do get :edit, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id, start_event_id: @eu_regulation.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns @geo_entities" do territory = create(:geo_entity, geo_entity_type_id: territory_geo_entity_type.id) get :edit, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id, start_event_id: @eu_regulation.id - assigns(:geo_entities).should include(territory) + expect(assigns(:geo_entities)).to include(territory) end end @@ -125,7 +125,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -141,7 +141,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -156,7 +156,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -172,7 +172,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -190,7 +190,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -205,7 +205,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -220,7 +220,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -234,7 +234,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -249,7 +249,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -264,7 +264,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -279,7 +279,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -295,7 +295,7 @@ it "redirects after delete" do delete :destroy, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id, start_event_id: @eu_regulation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end diff --git a/spec/controllers/admin/eu_regulations_controller_spec.rb b/spec/controllers/admin/eu_regulations_controller_spec.rb index 263a953e3c..ad9d058301 100644 --- a/spec/controllers/admin/eu_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_regulations sorted by effective_at" do get :index - assigns(:eu_regulations).should eq([@eu_regulation2, @eu_regulation1]) + expect(assigns(:eu_regulations)).to eq([@eu_regulation2, @eu_regulation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -25,7 +25,7 @@ let(:eu_regulation) { create_eu_regulation } it "renders create when successful" do xhr :post, :activate, :format => 'js', :id => eu_regulation.id - response.should render_template("create") + expect(response).to render_template("create") end end diff --git a/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb b/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb index bcbf45e332..758d36195e 100644 --- a/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_suspension_regulations sorted by effective_at" do get :index - assigns(:eu_suspension_regulations).should eq([@eu_suspension_regulation2, @eu_suspension_regulation1]) + expect(assigns(:eu_suspension_regulations)).to eq([@eu_suspension_regulation2, @eu_suspension_regulation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -25,7 +25,7 @@ let(:eu_suspension_regulation) { create_eu_suspension_regulation(:is_current => true) } it "renders create when successful" do xhr :post, :activate, :format => 'js', :id => eu_suspension_regulation.id - response.should render_template("create") + expect(response).to render_template("create") end end diff --git a/spec/controllers/admin/eu_suspensions_controller_spec.rb b/spec/controllers/admin/eu_suspensions_controller_spec.rb index 97275959ec..08b9bc48b3 100644 --- a/spec/controllers/admin/eu_suspensions_controller_spec.rb +++ b/spec/controllers/admin/eu_suspensions_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "renders the index template" do get :index, :eu_suspension_regulation_id => @eu_suspension_regulation - response.should render_template("index") + expect(response).to render_template("index") end it "renders the admin layout" do get :index, :eu_suspension_regulation_id => @eu_suspension_regulation - response.should render_template('layouts/admin') + expect(response).to render_template('layouts/admin') end end @@ -31,7 +31,7 @@ it "redirects after delete" do delete :destroy, :id => @eu_suspension.id, :eu_suspension_regulation_id => @eu_suspension_regulation.id - response.should redirect_to( + expect(response).to redirect_to( admin_eu_suspension_regulation_eu_suspensions_url(@eu_suspension_regulation) ) end diff --git a/spec/controllers/admin/events_controller_spec.rb b/spec/controllers/admin/events_controller_spec.rb index 6a4d00d483..ac8b1ccb12 100644 --- a/spec/controllers/admin/events_controller_spec.rb +++ b/spec/controllers/admin/events_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @events sorted by name" do get :index - assigns(:events).should eq([@event2, @event1]) + expect(assigns(:events)).to eq([@event2, @event1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -24,22 +24,22 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the event variable" do xhr :get, :new - assigns(:event).should_not be_nil + expect(assigns(:event)).not_to be_nil end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, event: FactoryGirl.attributes_for(:event) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, event: { :name => nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -47,11 +47,11 @@ let(:event) { create(:event) } it "renders the edit template" do xhr :get, :edit, :id => event.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :edit, :id => event.id - assigns(:event).should_not be_nil + expect(assigns(:event)).not_to be_nil end end @@ -59,11 +59,11 @@ let(:event) { create(:event) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => event.id, :event => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => event.id, :event => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -71,7 +71,7 @@ let(:event) { create(:event) } it "redirects after delete" do delete :destroy, :id => event.id - response.should redirect_to(admin_events_url) + expect(response).to redirect_to(admin_events_url) end end diff --git a/spec/controllers/admin/exports_controller_spec.rb b/spec/controllers/admin/exports_controller_spec.rb index 14d1f481d0..5db3a6f2e9 100644 --- a/spec/controllers/admin/exports_controller_spec.rb +++ b/spec/controllers/admin/exports_controller_spec.rb @@ -19,8 +19,8 @@ create(:taxon_concept) expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names" - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") end it "redirects when no results" do get :download, :data_type => "Names" @@ -32,8 +32,8 @@ create_cites_eu_species expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } @@ -45,8 +45,8 @@ create_cms_species expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } @@ -64,8 +64,8 @@ create(:distribution, :taxon_concept_id => tc.id) expect_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions" - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") end it "redirects when no results" do get :download, :data_type => "Distributions" @@ -78,8 +78,8 @@ create(:distribution, :taxon_concept_id => tc.id) expect_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } @@ -92,8 +92,8 @@ create(:distribution, :taxon_concept_id => tc.id) expect_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } diff --git a/spec/controllers/admin/geo_entities_controller_spec.rb b/spec/controllers/admin/geo_entities_controller_spec.rb index dcbd651c30..12e244d200 100644 --- a/spec/controllers/admin/geo_entities_controller_spec.rb +++ b/spec/controllers/admin/geo_entities_controller_spec.rb @@ -22,11 +22,11 @@ describe "GET index" do it "assigns @geo_entities sorted by name" do get :index - assigns(:geo_entities).should eq([@geo_entity2, @geo_entity1]) + expect(assigns(:geo_entities)).to eq([@geo_entity2, @geo_entity1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -38,14 +38,14 @@ name_en: 'CC', iso_code2: 'CC' } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, geo_entity: { geo_entity_type_id: country_geo_entity_type.id, iso_code2: nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -53,11 +53,11 @@ let(:geo_entity) { create(:geo_entity, geo_entity_type: country_geo_entity_type) } it "responds with 200 when successful" do xhr :put, :update, format: 'json', id: geo_entity.id, geo_entity: { iso_code2: 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, format: 'json', id: geo_entity.id, geo_entity: { iso_code2: nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -65,7 +65,7 @@ let(:geo_entity) { create(:geo_entity) } it "redirects after delete" do delete :destroy, id: geo_entity.id - response.should redirect_to(admin_geo_entities_url) + expect(response).to redirect_to(admin_geo_entities_url) end end diff --git a/spec/controllers/admin/hybrid_relationships_controller_spec.rb b/spec/controllers/admin/hybrid_relationships_controller_spec.rb index bb76659b5a..3b6e0337b4 100644 --- a/spec/controllers/admin/hybrid_relationships_controller_spec.rb +++ b/spec/controllers/admin/hybrid_relationships_controller_spec.rb @@ -16,11 +16,11 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - assigns(:hybrid_relationship).should_not be_nil + expect(assigns(:hybrid_relationship)).not_to be_nil end end @@ -31,7 +31,7 @@ :taxon_relationship => { other_taxon_concept_id: hybrid.id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -39,7 +39,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -47,12 +47,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => hybrid_relationship.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => hybrid_relationship.id - assigns(:hybrid_relationship).should_not be_nil + expect(assigns(:hybrid_relationship)).not_to be_nil end end @@ -64,7 +64,7 @@ :taxon_relationship => { other_taxon_concept_id: hybrid.id } - response.should render_template("create") + expect(response).to render_template("create") end it "responds with json when not successful" do xhr :put, :update, :format => 'js', @@ -73,7 +73,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -82,7 +82,7 @@ delete :destroy, :taxon_concept_id => taxon_concept.id, :id => hybrid_relationship.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(hybrid_relationship.taxon_concept) ) end diff --git a/spec/controllers/admin/instruments_controller_spec.rb b/spec/controllers/admin/instruments_controller_spec.rb index 6014dcecab..335f3cb4c3 100644 --- a/spec/controllers/admin/instruments_controller_spec.rb +++ b/spec/controllers/admin/instruments_controller_spec.rb @@ -11,18 +11,18 @@ describe "GET index" do it "assigns @instruments sorted by name" do get :index - assigns(:instruments).should eq([@instrument2, @instrument1]) + expect(assigns(:instruments)).to eq([@instrument2, @instrument1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - response.body.should have_json_size(2) - parse_json(response.body, "0/text").should == 'AA' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/text")).to eq('AA') end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, instrument: build_attributes(:instrument) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, instrument: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -43,11 +43,11 @@ let(:instrument) { create(:instrument) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => instrument.id, :instrument => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => instrument.id, :instrument => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -55,17 +55,17 @@ let(:instrument) { create(:instrument) } it "redirects after delete" do delete :destroy, :id => instrument.id - flash[:notice].should_not be_nil - flash[:alert].should be_nil - response.should redirect_to(admin_instruments_url) + expect(flash[:notice]).not_to be_nil + expect(flash[:alert]).to be_nil + expect(response).to redirect_to(admin_instruments_url) end let(:instrument2) { create(:instrument) } let!(:taxon_instrument) { create(:taxon_instrument, :instrument_id => instrument2.id) } it "fails to delete instrument because there are dependent objects" do delete :destroy, :id => instrument2.id - flash[:notice].should be_nil - flash[:alert].should_not be_nil - instrument2.reload.should_not be_nil + expect(flash[:notice]).to be_nil + expect(flash[:alert]).not_to be_nil + expect(instrument2.reload).not_to be_nil end end diff --git a/spec/controllers/admin/languages_controller_spec.rb b/spec/controllers/admin/languages_controller_spec.rb index 5634b95779..6eab1781cb 100644 --- a/spec/controllers/admin/languages_controller_spec.rb +++ b/spec/controllers/admin/languages_controller_spec.rb @@ -8,22 +8,22 @@ language1 = create(:language, :iso_code1 => 'BB', :iso_code3 => 'BBB') language2 = create(:language, :iso_code1 => 'AA', :iso_code3 => 'AAA') get :index - assigns(:languages).should eq([language2, language1]) + expect(assigns(:languages)).to eq([language2, language1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, language: FactoryGirl.attributes_for(:language) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, language: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -31,11 +31,11 @@ let(:language) { create(:language) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => language.id, :language => { :iso_code1 => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => language.id, :language => { :iso_code1 => 'zzz' } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -43,7 +43,7 @@ let(:language) { create(:language) } it "redirects after delete" do delete :destroy, :id => language.id - response.should redirect_to(admin_languages_url) + expect(response).to redirect_to(admin_languages_url) end end diff --git a/spec/controllers/admin/listing_changes_controller_spec.rb b/spec/controllers/admin/listing_changes_controller_spec.rb index 73f4d73c8b..bbcc93854c 100644 --- a/spec/controllers/admin/listing_changes_controller_spec.rb +++ b/spec/controllers/admin/listing_changes_controller_spec.rb @@ -43,16 +43,16 @@ :effective_at => 1.week.ago ) get :index, :eu_regulation_id => @eu_regulation.id - assigns(:listing_changes).should eq([listing_change2, listing_change1]) - assigns(:eu_regulation).should eq @eu_regulation + expect(assigns(:listing_changes)).to eq([listing_change2, listing_change1]) + expect(assigns(:eu_regulation)).to eq @eu_regulation end it "renders the index template" do get :index, :eu_regulation_id => @eu_regulation.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the admin layout" do get :index, :eu_regulation_id => @eu_regulation.id - response.should render_template('layouts/admin') + expect(response).to render_template('layouts/admin') end end @@ -70,7 +70,7 @@ it "redirects after delete" do delete :destroy, :id => @listing_change.id, :eu_regulation_id => @eu_regulation.id - response.should redirect_to( + expect(response).to redirect_to( admin_eu_regulation_listing_changes_url(@eu_regulation) ) end diff --git a/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb index 8d6a10a7e7..9d47f43bec 100644 --- a/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb @@ -10,7 +10,7 @@ end it 'renders the inputs template' do get :show, id: :inputs, nomenclature_change_id: @lump.id - response.should render_template('inputs') + expect(response).to render_template('inputs') end end context 'outputs' do @@ -20,7 +20,7 @@ end it 'renders the outputs template' do get :show, id: :outputs, nomenclature_change_id: @lump.id - response.should render_template('outputs') + expect(response).to render_template('outputs') end end context 'reassignments' do @@ -32,7 +32,7 @@ end it 'renders the notes template' do get :show, id: :notes, nomenclature_change_id: @lump.id - response.should render_template('notes') + expect(response).to render_template('notes') end context "when legislation present" do before(:each) do @@ -40,13 +40,13 @@ end it 'renders the legislation template' do get :show, id: :legislation, nomenclature_change_id: @lump.id - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context "when no legislation" do it 'redirects to next step' do get :show, id: :legislation, nomenclature_change_id: @lump.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_lump_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -55,7 +55,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @lump.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -63,7 +63,7 @@ describe 'POST create' do it 'redirects to lump wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_lump_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'inputs' ) @@ -83,7 +83,7 @@ 1 => { taxon_concept_id: create_cites_eu_species.id } } }, nomenclature_change_id: @lump.id, id: 'inputs' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_lump_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'outputs' ) @@ -98,7 +98,7 @@ 0 => { taxon_concept_id: nil } } }, nomenclature_change_id: @lump.id, id: 'inputs' - response.should render_template('inputs') + expect(response).to render_template('inputs') end end context 'when last step' do @@ -106,15 +106,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @lump.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @lump.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end @@ -130,7 +130,7 @@ context 'when step is legislation' do it 'renders notes step' do get :show, id: :notes, nomenclature_change_id: @lump.id, back: true - response.should render_template('notes') + expect(response).to render_template('notes') end end context 'when step is summary' do @@ -140,15 +140,15 @@ end it 'renders legislation step' do get :show, id: :legislation, nomenclature_change_id: @lump.id, back: true - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context 'when no legislation' do it 'redirects to notes step' do get :show, id: :legislation, nomenclature_change_id: @lump.id, back: true - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes get :show, id: :notes, nomenclature_change_id: @lump.id - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes end end end diff --git a/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb index 61cedb41fa..f2bc0f7507 100644 --- a/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb @@ -11,7 +11,7 @@ end it 'renders the inputs template' do get :show, id: :inputs, nomenclature_change_id: @split.id - response.should render_template('inputs') + expect(response).to render_template('inputs') end end context 'outputs' do @@ -20,7 +20,7 @@ end it 'renders the outputs template' do get :show, id: :outputs, nomenclature_change_id: @split.id - response.should render_template('outputs') + expect(response).to render_template('outputs') end end context 'reassignments' do @@ -29,7 +29,7 @@ end it 'renders the notes template' do get :show, id: :notes, nomenclature_change_id: @split.id - response.should render_template('notes') + expect(response).to render_template('notes') end context "when children present" do before(:each) do @@ -37,13 +37,13 @@ end it 'renders the children template' do get :show, id: :children, nomenclature_change_id: @split.id - response.should render_template('children') + expect(response).to render_template('children') end end context "when no children" do it 'redirects to next step' do get :show, id: :children, nomenclature_change_id: @split.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'names' ) @@ -60,13 +60,13 @@ end it 'renders the names template' do get :show, id: :names, nomenclature_change_id: @split.id - response.should render_template('names') + expect(response).to render_template('names') end end context "when no names" do it 'redirects to next step' do get :show, id: :names, nomenclature_change_id: @split.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'distribution' ) @@ -79,13 +79,13 @@ end it 'renders the distribution template' do get :show, id: :distribution, nomenclature_change_id: @split.id - response.should render_template('distribution') + expect(response).to render_template('distribution') end end context "when no distribution" do it 'redirects to next step' do get :show, id: :distribution, nomenclature_change_id: @split.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'legislation' ) @@ -98,13 +98,13 @@ end it 'renders the legislation template' do get :show, id: :legislation, nomenclature_change_id: @split.id - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context "when no legislation" do it 'redirects to next step' do get :show, id: :legislation, nomenclature_change_id: @split.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -113,7 +113,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @split.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -121,7 +121,7 @@ describe 'POST create' do it 'redirects to split wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'inputs' ) @@ -138,7 +138,7 @@ put :update, nomenclature_change_split: { input_attributes: { taxon_concept_id: create_cites_eu_species.id } }, nomenclature_change_id: @split.id, id: 'inputs' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'outputs' ) @@ -151,7 +151,7 @@ nomenclature_change_split: { input_attributes: { taxon_concept_id: nil } }, nomenclature_change_id: @split.id, id: 'inputs' - response.should render_template('inputs') + expect(response).to render_template('inputs') end end context 'when last step' do @@ -159,15 +159,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @split.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @split.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end @@ -184,15 +184,15 @@ end it 'renders children template' do get :show, id: :children, nomenclature_change_id: @split.id, back: true - response.should render_template('children') + expect(response).to render_template('children') end end context 'when no children' do it 'redirects to notes step' do get :show, id: :children, nomenclature_change_id: @split.id, back: true - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes get :show, id: :notes, nomenclature_change_id: @split.id - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes end end end @@ -207,15 +207,15 @@ end it 'renders names template' do get :show, id: :names, nomenclature_change_id: @split.id, back: :true - response.should render_template('names') + expect(response).to render_template('names') end end context 'when no names and no children' do it 'redirects to notes step' do get :show, id: :names, nomenclature_change_id: @split.id, back: true - response.should redirect_to action: :show, id: :children + expect(response).to redirect_to action: :show, id: :children get :show, id: :children, nomenclature_change_id: @split.id - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes end end end @@ -226,15 +226,15 @@ end it 'renders distribution template' do get :show, id: :distribution, nomenclature_change_id: @split.id, back: true - response.should render_template('distribution') + expect(response).to render_template('distribution') end end context 'when no distribution and no names' do it 'redirects to children step' do get :show, id: :distribution, nomenclature_change_id: @split.id, back: true - response.should redirect_to action: :show, id: :names + expect(response).to redirect_to action: :show, id: :names get :show, id: :names, nomenclature_change_id: @split.id - response.should redirect_to action: :show, id: :children + expect(response).to redirect_to action: :show, id: :children end end end @@ -245,15 +245,15 @@ end it 'renders legislation template' do get :show, id: :legislation, nomenclature_change_id: @split.id, back: true - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context 'when no legislation and no distribution' do it 'redirects to names step' do get :show, id: :legislation, nomenclature_change_id: @split.id, back: true - response.should redirect_to action: :show, id: :distribution + expect(response).to redirect_to action: :show, id: :distribution get :show, id: :distribution, nomenclature_change_id: @split.id - response.should redirect_to action: :show, id: :names + expect(response).to redirect_to action: :show, id: :names end end end diff --git a/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb index bb42fdd211..2f124144d0 100644 --- a/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb @@ -11,7 +11,7 @@ end it 'renders the primary_output template' do get :show, id: :primary_output, nomenclature_change_id: @status_change.id - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'swap' do @@ -20,7 +20,7 @@ end it 'renders the swap template' do get :show, id: :secondary_output, nomenclature_change_id: @status_change.id - response.should render_template('secondary_output') + expect(response).to render_template('secondary_output') end end context 'reassignments' do @@ -33,13 +33,13 @@ end it 'renders the legislation template' do get :show, id: :legislation, nomenclature_change_id: @status_change.id - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context "when no legislation" do it 'redirects to next step' do get :show, id: :legislation, nomenclature_change_id: @status_change.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_swap_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -53,7 +53,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @status_change.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -61,7 +61,7 @@ describe 'POST create' do it 'redirects to status_change wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_swap_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'primary_output' ) @@ -81,7 +81,7 @@ new_name_status: 'S' } }, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_swap_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'secondary_output' ) @@ -92,7 +92,7 @@ it 're-renders step' do put :update, nomenclature_change_status_swap: {}, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'when last step' do @@ -100,15 +100,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end diff --git a/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb index a04996557d..1ad1a65cea 100644 --- a/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb @@ -11,7 +11,7 @@ end it 'renders the primary_output template' do get :show, id: :primary_output, nomenclature_change_id: @status_change.id - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'summary' do @@ -20,7 +20,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @status_change.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -28,7 +28,7 @@ describe 'POST create' do it 'redirects to status_change wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_to_accepted_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'primary_output' ) @@ -54,7 +54,7 @@ new_name_status: 'A' } }, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_to_accepted_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -65,7 +65,7 @@ it 're-renders step' do put :update, nomenclature_change_status_to_accepted: {}, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'when last step' do @@ -73,15 +73,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end diff --git a/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb index 95aa5eeba7..f750f8e7d1 100644 --- a/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb @@ -12,7 +12,7 @@ end it 'renders the primary_output template' do get :show, id: :primary_output, nomenclature_change_id: @status_change.id - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'relay' do @@ -21,7 +21,7 @@ end it 'renders the relay template' do get :show, id: :relay, nomenclature_change_id: @status_change.id - response.should render_template('relay') + expect(response).to render_template('relay') end end @@ -31,7 +31,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @status_change.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -39,7 +39,7 @@ describe 'POST create' do it 'redirects to status_change wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_to_synonym_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'primary_output' ) @@ -59,7 +59,7 @@ new_name_status: 'S' } }, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_to_synonym_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'relay' ) @@ -70,7 +70,7 @@ it 're-renders step' do put :update, nomenclature_change_status_to_synonym: {}, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'when last step' do @@ -78,15 +78,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end diff --git a/spec/controllers/admin/nomenclature_changes_controller_spec.rb b/spec/controllers/admin/nomenclature_changes_controller_spec.rb index 959ec64f88..672f29be57 100644 --- a/spec/controllers/admin/nomenclature_changes_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes_controller_spec.rb @@ -8,11 +8,11 @@ nomenclature_change1 = create(:nomenclature_change) nomenclature_change2 = create(:nomenclature_change) get :index - assigns(:collection).should eq([nomenclature_change2, nomenclature_change1]) + expect(assigns(:collection)).to eq([nomenclature_change2, nomenclature_change1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end @@ -20,7 +20,7 @@ let(:nomenclature_change) { create(:nomenclature_change) } it "redirects after delete" do delete :destroy, :id => nomenclature_change.id - response.should redirect_to(admin_nomenclature_changes_url) + expect(response).to redirect_to(admin_nomenclature_changes_url) end end diff --git a/spec/controllers/admin/ranks_controller_spec.rb b/spec/controllers/admin/ranks_controller_spec.rb index 93961b14c3..dbe03df3f3 100644 --- a/spec/controllers/admin/ranks_controller_spec.rb +++ b/spec/controllers/admin/ranks_controller_spec.rb @@ -8,22 +8,22 @@ rank2 = create(:rank, name: Rank::PHYLUM, taxonomic_position: '2') rank1 = create(:rank, name: Rank::KINGDOM, taxonomic_position: '1') get :index - assigns(:ranks).should eq([rank1, rank2]) + expect(assigns(:ranks)).to eq([rank1, rank2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, rank: build_attributes(:rank) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, rank: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -31,11 +31,11 @@ let(:rank) { create(:rank) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => rank.id, :rank => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => rank.id, :rank => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -43,7 +43,7 @@ let(:rank) { create(:rank) } it "redirects after delete" do delete :destroy, :id => rank.id - response.should redirect_to(admin_ranks_url) + expect(response).to redirect_to(admin_ranks_url) end end diff --git a/spec/controllers/admin/references_controller_spec.rb b/spec/controllers/admin/references_controller_spec.rb index ee0207cbc5..c1bd708f6c 100644 --- a/spec/controllers/admin/references_controller_spec.rb +++ b/spec/controllers/admin/references_controller_spec.rb @@ -12,18 +12,18 @@ describe "GET index" do it "assigns @references sorted by citation" do get :index - assigns(:references).should eq([@reference2, @reference1]) + expect(assigns(:references)).to eq([@reference2, @reference1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - response.body.should have_json_size(2) - parse_json(response.body, "0/text").should == 'AA' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/text")).to eq('AA') end end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, reference: FactoryGirl.attributes_for(:reference) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, reference: { :citation => nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -43,11 +43,11 @@ let(:reference) { create(:reference) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => reference.id, :reference => { :citation => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => reference.id, :reference => { :citation => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -55,7 +55,7 @@ let(:reference) { create(:reference) } it "redirects after delete" do delete :destroy, :id => reference.id - response.should redirect_to(admin_references_url) + expect(response).to redirect_to(admin_references_url) end end diff --git a/spec/controllers/admin/species_listings_controller_spec.rb b/spec/controllers/admin/species_listings_controller_spec.rb index e9196e7ca9..bb8c91a415 100644 --- a/spec/controllers/admin/species_listings_controller_spec.rb +++ b/spec/controllers/admin/species_listings_controller_spec.rb @@ -11,22 +11,22 @@ species_listing2_2 = create(:species_listing, :designation => designation2, :name => 'II') species_listing1 = create(:species_listing, :designation => designation1, :name => 'I') get :index - assigns(:species_listings).should eq([species_listing1, species_listing2_1, species_listing2_2]) + expect(assigns(:species_listings)).to eq([species_listing1, species_listing2_1, species_listing2_2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, species_listing: build_attributes(:species_listing) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, species_listing: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -34,11 +34,11 @@ let(:species_listing) { create(:species_listing) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => species_listing.id, :species_listing => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => species_listing.id, :species_listing => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -46,7 +46,7 @@ let(:species_listing) { create(:species_listing) } it "redirects after delete" do delete :destroy, :id => species_listing.id - response.should redirect_to(admin_species_listings_url) + expect(response).to redirect_to(admin_species_listings_url) end end diff --git a/spec/controllers/admin/srg_histories_controller_spec.rb b/spec/controllers/admin/srg_histories_controller_spec.rb index 187f9afea4..2667db0ae8 100644 --- a/spec/controllers/admin/srg_histories_controller_spec.rb +++ b/spec/controllers/admin/srg_histories_controller_spec.rb @@ -6,7 +6,7 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end @@ -19,7 +19,7 @@ it "renders the create js template" do post :create, srg_history: { name: 'test' }, format: :js - response.should render_template("create") + expect(response).to render_template("create") end end @@ -27,7 +27,7 @@ it "renders new" do post :create, srg_history: {}, format: :js - response.should render_template("new") + expect(response).to render_template("new") end end end @@ -41,7 +41,7 @@ it "renders the create js template" do put :update, id: @srg_history.id, format: :js - response.should render_template("create") + expect(response).to render_template("create") end end @@ -52,7 +52,7 @@ id: @srg_history.id, format: :js - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -65,7 +65,7 @@ it "redirects after delete" do delete :destroy, id: @srg_history.id - response.should redirect_to(admin_srg_histories_url) + expect(response).to redirect_to(admin_srg_histories_url) end end end diff --git a/spec/controllers/admin/synonym_relationships_controller_spec.rb b/spec/controllers/admin/synonym_relationships_controller_spec.rb index b6cb176324..1a1f7982e9 100644 --- a/spec/controllers/admin/synonym_relationships_controller_spec.rb +++ b/spec/controllers/admin/synonym_relationships_controller_spec.rb @@ -16,11 +16,11 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the synonym_relationship variable" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - assigns(:synonym_relationship).should_not be_nil + expect(assigns(:synonym_relationship)).not_to be_nil end end @@ -31,7 +31,7 @@ :taxon_relationship => { other_taxon_concept_id: synonym.id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -39,7 +39,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -47,12 +47,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => synonym_relationship.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the synonym_relationship variable" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => synonym_relationship.id - assigns(:synonym_relationship).should_not be_nil + expect(assigns(:synonym_relationship)).not_to be_nil end end @@ -64,7 +64,7 @@ :taxon_relationship => { other_taxon_concept_id: synonym.id } - response.should render_template('create') + expect(response).to render_template('create') end it "responds with json when not successful" do xhr :put, :update, :format => 'js', @@ -73,7 +73,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -82,7 +82,7 @@ delete :destroy, :taxon_concept_id => taxon_concept.id, :id => synonym_relationship.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(synonym_relationship.taxon_concept) ) end diff --git a/spec/controllers/admin/tags_controller_spec.rb b/spec/controllers/admin/tags_controller_spec.rb index fbe3c6173c..3f4bb6d265 100644 --- a/spec/controllers/admin/tags_controller_spec.rb +++ b/spec/controllers/admin/tags_controller_spec.rb @@ -6,8 +6,8 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") - response.should render_template("layouts/admin") + expect(response).to render_template("index") + expect(response).to render_template("layouts/admin") end end @@ -15,11 +15,11 @@ it "renders create when successful" do xhr :post, :create, preset_tag: { name: "Test Tag", model: "TaxonConcept" } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, preset_tag: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -29,12 +29,12 @@ it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => preset_tag.id, :preset_tag => {} - response.should be_success + expect(response).to be_success end it "responds with json error when not successful" do xhr :put, :update, :format => 'json', :id => preset_tag.id, :preset_tag => { :model => 'FakeCategory' } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end end @@ -43,7 +43,7 @@ let(:preset_tag) { create(:preset_tag) } it "redirects after delete" do delete :destroy, :id => preset_tag.id - response.should redirect_to(admin_tags_url) + expect(response).to redirect_to(admin_tags_url) end end end diff --git a/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb b/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb index 05d4151a5b..ed01e82bd4 100644 --- a/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb +++ b/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb @@ -15,18 +15,18 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -38,7 +38,7 @@ :start_notification_id => create_cites_suspension_notification.id }, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) end @@ -46,14 +46,14 @@ it "renders new when not successful" do post :create, :cites_suspension => {}, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end describe "GET edit" do it "renders the edit template" do get :edit, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('edit') + expect(response).to render_template('edit') end end @@ -66,7 +66,7 @@ }, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) end @@ -79,7 +79,7 @@ }, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('edit') + expect(response).to render_template('edit') end end @@ -87,7 +87,7 @@ it "redirects after delete" do delete :destroy, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) end @@ -99,11 +99,11 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -111,10 +111,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_cites_suspensions_url(@taxon_concept) delete :destroy, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) - CitesSuspension.find(@cites_suspension.id).should_not be_nil + expect(CitesSuspension.find(@cites_suspension.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_commons_controller_spec.rb b/spec/controllers/admin/taxon_commons_controller_spec.rb index 61fe953185..4682c712a7 100644 --- a/spec/controllers/admin/taxon_commons_controller_spec.rb +++ b/spec/controllers/admin/taxon_commons_controller_spec.rb @@ -11,8 +11,8 @@ describe "XHR GET 'new'" do it "returns http success and renders the new template" do xhr :get, :new, { :taxon_concept_id => @taxon_concept.id, :format => 'js' } - response.should be_success - response.should render_template('new') + expect(response).to be_success + expect(response).to render_template('new') end end @@ -24,14 +24,14 @@ :name => @common_name.name, :language_id => @common_name.language_id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, :taxon_concept_id => @taxon_concept.id, :taxon_common => { } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -46,12 +46,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_common.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the taxon common variable" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_common.id - assigns(:taxon_common).should_not be_nil + expect(assigns(:taxon_common)).not_to be_nil end end @@ -71,7 +71,7 @@ :name => @common_name.name, :language_id => @common_name.language_id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :put, :update, :format => 'js', @@ -80,7 +80,7 @@ :taxon_common => { :common_name_id => nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -96,7 +96,7 @@ delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => taxon_common.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(@taxon_concept) ) end @@ -116,11 +116,11 @@ it "updates associated @taxon_concept's dependents_updated_at when taxon common is updated" do - @taxon_concept.dependents_updated_at.should be_nil + expect(@taxon_concept.dependents_updated_at).to be_nil # it gets updated by the creation of the taxon_common # but object needs to be reloaded - @taxon_concept.reload.dependents_updated_at.should_not be_nil + expect(@taxon_concept.reload.dependents_updated_at).not_to be_nil old_date = @taxon_concept.dependents_updated_at xhr :put, :update, :format => 'js', @@ -131,25 +131,25 @@ :language_id => @common_name.language_id } - @taxon_concept.reload.dependents_updated_at.should_not == old_date + expect(@taxon_concept.reload.dependents_updated_at).not_to eq(old_date) end it "updates associated @taxon_concept's dependents_updated_at when taxon common is deleted" do - @taxon_concept.dependents_updated_at.should be_nil + expect(@taxon_concept.dependents_updated_at).to be_nil # it gets updated by the creation of the taxon_common # but object needs to be reloaded - @taxon_concept.reload.dependents_updated_at.should_not be_nil + expect(@taxon_concept.reload.dependents_updated_at).not_to be_nil old_date = @taxon_concept.dependents_updated_at delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => @taxon_common.id - @taxon_concept.reload.dependents_updated_at.should_not == old_date - TaxonCommon.where(:id => @taxon_common.id).size.should == 0 + expect(@taxon_concept.reload.dependents_updated_at).not_to eq(old_date) + expect(TaxonCommon.where(:id => @taxon_common.id).size).to eq(0) end end @@ -167,10 +167,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_names_url(@taxon_concept) delete :destroy, :id => taxon_common.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(@taxon_concept) ) - TaxonCommon.find(taxon_common.id).should_not be_nil + expect(TaxonCommon.find(taxon_common.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_concept_comments_controller_spec.rb b/spec/controllers/admin/taxon_concept_comments_controller_spec.rb index 2a248ec3c5..4e08a8634e 100644 --- a/spec/controllers/admin/taxon_concept_comments_controller_spec.rb +++ b/spec/controllers/admin/taxon_concept_comments_controller_spec.rb @@ -10,7 +10,7 @@ describe 'GET index' do it 'renders the index template' do get :index, taxon_concept_id: @taxon_concept.id - response.should render_template('index') + expect(response).to render_template('index') end end @@ -19,10 +19,10 @@ post :create, taxon_concept_id: @taxon_concept.id, comment: { note: 'blah' } - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_comments_url(@taxon_concept) ) - flash[:notice].should_not be_nil + expect(flash[:notice]).not_to be_nil end end @@ -33,10 +33,10 @@ id: comment.id, taxon_concept_id: @taxon_concept.id, comment: { note: 'blah' } - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_comments_url(@taxon_concept) ) - flash[:notice].should_not be_nil + expect(flash[:notice]).not_to be_nil end end diff --git a/spec/controllers/admin/taxon_concept_references_controller_spec.rb b/spec/controllers/admin/taxon_concept_references_controller_spec.rb index a63aa8d539..b6808948e2 100644 --- a/spec/controllers/admin/taxon_concept_references_controller_spec.rb +++ b/spec/controllers/admin/taxon_concept_references_controller_spec.rb @@ -16,7 +16,7 @@ :reference_attributes => { :citation => "My nice literature" } } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -24,7 +24,7 @@ :taxon_concept_reference => { :reference_attributes => {} } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -39,12 +39,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_concept_reference.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the taxon concept reference variable" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_concept_reference.id - assigns(:taxon_concept_reference).should_not be_nil + expect(assigns(:taxon_concept_reference)).not_to be_nil end end @@ -64,7 +64,7 @@ :reference_attributes => { :citation => "My nice literature" } } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :put, :update, :format => 'js', @@ -73,15 +73,15 @@ :taxon_concept_reference => { :reference_attributes => {} } - response.should render_template('new') + expect(response).to render_template('new') end end describe "XHR GET 'new'" do it "returns http success and renders the new template" do xhr :get, :new, { :taxon_concept_id => @taxon_concept.id, :format => 'js' } - response.should be_success - response.should render_template('new') + expect(response).to be_success + expect(response).to render_template('new') end end @@ -91,7 +91,7 @@ delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => taxon_concept_reference.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_taxon_concept_references_url(taxon_concept_reference.taxon_concept) ) end diff --git a/spec/controllers/admin/taxon_concepts_controller_spec.rb b/spec/controllers/admin/taxon_concepts_controller_spec.rb index f6bbb2eb9f..dde27ef34f 100644 --- a/spec/controllers/admin/taxon_concepts_controller_spec.rb +++ b/spec/controllers/admin/taxon_concepts_controller_spec.rb @@ -16,20 +16,20 @@ end it "renders the index template" do get :index - response.should render_template("index") - response.should render_template("layouts/admin") + expect(response).to render_template("index") + expect(response).to render_template("layouts/admin") end it "redirects if 1 result" do get :index, search_params: { taxonomy: { id: cites_eu.id }, scientific_name: 'Foobarus i' } - response.should redirect_to(admin_taxon_concept_names_path(@taxon)) + expect(response).to redirect_to(admin_taxon_concept_names_path(@taxon)) end it "assigns taxa in taxonomic order" do get :index, search_params: { taxonomy: { id: cites_eu.id }, scientific_name: 'Foobarus' } - assigns(:taxon_concepts).should eq([@taxon.parent, @taxon]) + expect(assigns(:taxon_concepts)).to eq([@taxon.parent, @taxon]) end end @@ -43,23 +43,23 @@ scientific_name: 'Canis', parent_id: create_cites_eu_family } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, taxon_concept: {} - response.should render_template("new") + expect(response).to render_template("new") end it "renders new_synonym when not successful S" do xhr :post, :create, taxon_concept: { name_status: 'S' } - response.should render_template("new_synonym") + expect(response).to render_template("new_synonym") end it "renders new_hybrid when not successful H" do xhr :post, :create, taxon_concept: { name_status: 'H' } - response.should render_template("new_hybrid") + expect(response).to render_template("new_hybrid") end it "renders new_synonym when not successful N" do xhr :post, :create, taxon_concept: { name_status: 'N' } - response.should render_template("new_n_name") + expect(response).to render_template("new_n_name") end end @@ -69,24 +69,24 @@ it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => taxon_concept.id, :taxon_concept => {} - response.should be_success + expect(response).to be_success end it "responds with json error when not successful" do xhr :put, :update, :format => 'json', :id => taxon_concept.id, :taxon_concept => { :taxonomy_id => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end context "when HTML" do it "redirects to edit when successful" do put :update, :id => taxon_concept.id, :taxon_commons_attributes => FactoryGirl.attributes_for(:common_name) - response.should redirect_to(edit_admin_taxon_concept_url(taxon_concept)) + expect(response).to redirect_to(edit_admin_taxon_concept_url(taxon_concept)) end it "renders edit when not successful" do put :update, :id => taxon_concept.id, :taxon_concept => { :taxonomy_id => nil } - response.should render_template("edit") + expect(response).to render_template("edit") end end end @@ -95,7 +95,7 @@ let(:taxon_concept) { create(:taxon_concept) } it "redirects after delete" do delete :destroy, :id => taxon_concept.id - response.should redirect_to(admin_taxon_concepts_url) + expect(response).to redirect_to(admin_taxon_concepts_url) end end @@ -105,8 +105,8 @@ it "redirects to admin root path and doesn't delete" do delete :destroy, :id => taxon_concept.id - response.should redirect_to(admin_root_path) - TaxonConcept.where(:id => taxon_concept.id).size.should == 1 + expect(response).to redirect_to(admin_root_path) + expect(TaxonConcept.where(:id => taxon_concept.id).size).to eq(1) end end @@ -116,13 +116,13 @@ it "redirects to root path" do get :index - response.should redirect_to(root_path) + expect(response).to redirect_to(root_path) end it "redirects to root path and doesn't delete" do delete :destroy, :id => taxon_concept.id - response.should redirect_to(root_path) - TaxonConcept.where(:id => taxon_concept.id).size.should == 1 + expect(response).to redirect_to(root_path) + expect(TaxonConcept.where(:id => taxon_concept.id).size).to eq(1) end end @@ -135,8 +135,8 @@ it "returns properly formatted json" do xhr :get, :autocomplete, :format => 'json', :search_params => { :scientific_name => 'AAA' } - response.body.should have_json_size(1) - parse_json(response.body, "0/full_name").should == 'Aaa' + expect(response.body).to have_json_size(1) + expect(parse_json(response.body, "0/full_name")).to eq('Aaa') end end diff --git a/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb b/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb index f43ded20cf..f3ddd6a42d 100644 --- a/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb +++ b/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb @@ -10,24 +10,24 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do territory = create(:geo_entity, :geo_entity_type_id => territory_geo_entity_type.id) country = create(:geo_entity) get :new, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -46,7 +46,7 @@ ) }, :taxon_concept_id => @taxon_concept.id - response.should redirect_to(admin_taxon_concept_eu_suspensions_url(@taxon_concept.id)) + expect(response).to redirect_to(admin_taxon_concept_eu_suspensions_url(@taxon_concept.id)) end end @@ -54,7 +54,7 @@ it "renders new" do post :create, :eu_suspension => {}, :taxon_concept_id => @taxon_concept.id - response.should render_template("new") + expect(response).to render_template("new") end end end @@ -68,12 +68,12 @@ end it "renders the edit template" do get :edit, :id => @eu_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns @geo_entities" do territory = create(:geo_entity, :geo_entity_type_id => territory_geo_entity_type.id) get :edit, :id => @eu_suspension.id, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).should include(territory) + expect(assigns(:geo_entities)).to include(territory) end end @@ -98,7 +98,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) end @@ -115,7 +115,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) end @@ -132,7 +132,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end context "when eu_decision_type is not present" do @@ -145,7 +145,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -160,7 +160,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -175,7 +175,7 @@ it "redirects after delete" do delete :destroy, :id => @eu_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) end @@ -192,11 +192,11 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -204,10 +204,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_eu_suspensions_url(@taxon_concept) delete :destroy, :id => eu_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) - EuSuspension.find(eu_suspension.id).should_not be_nil + expect(EuSuspension.find(eu_suspension.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_listing_changes_controller_spec.rb b/spec/controllers/admin/taxon_listing_changes_controller_spec.rb index 4a44ef28a5..190acd9c39 100644 --- a/spec/controllers/admin/taxon_listing_changes_controller_spec.rb +++ b/spec/controllers/admin/taxon_listing_changes_controller_spec.rb @@ -41,18 +41,18 @@ ) get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - assigns(:listing_changes).should eq([listing_change2, listing_change1]) - assigns(:taxon_concept).should eq @taxon_concept + expect(assigns(:listing_changes)).to eq([listing_change2, listing_change1]) + expect(assigns(:taxon_concept)).to eq @taxon_concept end it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end @@ -60,12 +60,12 @@ it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @listing_change" do get :new, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - assigns(:listing_change).should_not be_nil + expect(assigns(:listing_change)).not_to be_nil end end @@ -80,7 +80,7 @@ }, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) end @@ -90,7 +90,7 @@ post :create, :listing_change => {}, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template("new") + expect(response).to render_template("new") end end @@ -108,13 +108,13 @@ get :edit, :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns the listing_change variable" do get :edit, :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - assigns(:listing_change).should_not be_nil + expect(assigns(:listing_change)).not_to be_nil end end @@ -141,7 +141,7 @@ :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) end @@ -179,7 +179,7 @@ :taxon_concept_id => taxon_concept.id, :designation_id => eu_designation.id, :redirect_to_eu_reg => "1" - response.should redirect_to( + expect(response).to redirect_to( admin_eu_regulation_listing_changes_url(eu_regulation) ) end @@ -189,7 +189,7 @@ :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "redirects to index page and removes annotation when fields cleared" do @@ -205,11 +205,11 @@ "id" => @annotation.id } } - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url( @taxon_concept, @designation) ) - @listing_change.reload.annotation.should be_nil + expect(@listing_change.reload.annotation).to be_nil end end @@ -227,7 +227,7 @@ delete :destroy, :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) end @@ -247,12 +247,12 @@ it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -261,10 +261,10 @@ delete :destroy, :id => listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) - ListingChange.find(listing_change.id).should_not be_nil + expect(ListingChange.find(listing_change.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_quotas_controller_spec.rb b/spec/controllers/admin/taxon_quotas_controller_spec.rb index 54e28bfb92..368d807315 100644 --- a/spec/controllers/admin/taxon_quotas_controller_spec.rb +++ b/spec/controllers/admin/taxon_quotas_controller_spec.rb @@ -12,24 +12,24 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) get :new, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -44,7 +44,7 @@ :geo_entity_id => @geo_entity.id }, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) end @@ -52,7 +52,7 @@ it "renders new when not successful" do post :create, :quota => {}, :taxon_concept_id => @taxon_concept.id - response.should render_template("new") + expect(response).to render_template("new") end end @@ -67,13 +67,13 @@ end it "renders the edit template" do get :edit, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) get :edit, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -95,7 +95,7 @@ }, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) end @@ -108,7 +108,7 @@ }, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -124,7 +124,7 @@ it "redirects after delete" do delete :destroy, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) end @@ -143,11 +143,11 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -155,10 +155,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_quotas_url(@taxon_concept) delete :destroy, :id => quota.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) - Quota.find(quota.id).should_not be_nil + expect(Quota.find(quota.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_relationships_controller_spec.rb b/spec/controllers/admin/taxon_relationships_controller_spec.rb index df944b5cd3..131f7d7255 100644 --- a/spec/controllers/admin/taxon_relationships_controller_spec.rb +++ b/spec/controllers/admin/taxon_relationships_controller_spec.rb @@ -11,16 +11,16 @@ } it "assigns @taxon_relationships" do get :index, :taxon_concept_id => taxon_concept.id, :type => taxon_relationship.taxon_relationship_type.name - assigns(:taxon_relationships).should eq([taxon_relationship]) + expect(assigns(:taxon_relationships)).to eq([taxon_relationship]) assigns(:taxon_concept) end it "renders the index template" do get :index, :taxon_concept_id => taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end @@ -32,13 +32,13 @@ it "renders create when successful" do xhr :post, :create, :taxon_relationship => taxon_relationship_attributes, :taxon_concept_id => taxon_concept.id - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do taxon_relationship = create(:taxon_relationship, taxon_relationship_attributes) xhr :post, :create, taxon_relationship: taxon_relationship_attributes, :taxon_concept_id => taxon_relationship.taxon_concept_id - response.should render_template("new") + expect(response).to render_template("new") end end @@ -59,16 +59,16 @@ } context "destroys relationship for taxon concept" do specify { - lambda do + expect do delete :destroy, taxon_concept_id: taxon_concept.id, id: rel.id - end.should change(TaxonRelationship, :count).by(-2) + end.to change(TaxonRelationship, :count).by(-2) } end context "destroys relationship for other taxon concept" do specify { - lambda do + expect do delete :destroy, taxon_concept_id: other_taxon_concept.id, id: rel.id - end.should change(TaxonRelationship, :count).by(-2) + end.to change(TaxonRelationship, :count).by(-2) } end end @@ -88,16 +88,16 @@ } context "destroys relationship for taxon concept" do specify { - lambda do + expect do delete :destroy, taxon_concept_id: taxon_concept.id, id: rel.id - end.should change(TaxonRelationship, :count).by(-1) + end.to change(TaxonRelationship, :count).by(-1) } end context "destroys relationship for other taxon concept" do specify { - lambda do + expect do delete :destroy, taxon_concept_id: other_taxon_concept.id, id: rel.id - end.should change(TaxonRelationship, :count).by(-1) + end.to change(TaxonRelationship, :count).by(-1) } end end diff --git a/spec/controllers/admin/taxonomies_controller_spec.rb b/spec/controllers/admin/taxonomies_controller_spec.rb index bf2983da47..d6386851d2 100644 --- a/spec/controllers/admin/taxonomies_controller_spec.rb +++ b/spec/controllers/admin/taxonomies_controller_spec.rb @@ -12,18 +12,18 @@ describe "GET index" do it "assigns @taxonomies sorted by name" do get :index - assigns(:taxonomies).should eq([@taxonomy2, @taxonomy1]) + expect(assigns(:taxonomies)).to eq([@taxonomy2, @taxonomy1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - response.body.should have_json_size(2) - parse_json(response.body, "0/text").should == 'AA' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/text")).to eq('AA') end end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, taxonomy: FactoryGirl.attributes_for(:taxonomy) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, taxonomy: { :name => nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -43,11 +43,11 @@ let(:taxonomy) { create(:taxonomy) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => taxonomy.id, :taxonomy => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => taxonomy.id, :taxonomy => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -55,7 +55,7 @@ let(:taxonomy) { create(:taxonomy) } it "redirects after delete" do delete :destroy, :id => taxonomy.id - response.should redirect_to(admin_taxonomies_url) + expect(response).to redirect_to(admin_taxonomies_url) end end @@ -64,15 +64,15 @@ describe "GET index" do it "redirects to admin root" do get :index - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end describe "DELETE destroy" do let(:taxonomy) { create(:taxonomy) } it "fails to delete and redirects to admin_root_path" do delete :destroy, :id => taxonomy.id - response.should redirect_to(admin_root_path) - Taxonomy.find(taxonomy.id).should_not be_nil + expect(response).to redirect_to(admin_root_path) + expect(Taxonomy.find(taxonomy.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/trade_names_relationships_controller_spec.rb b/spec/controllers/admin/trade_names_relationships_controller_spec.rb index 8f7e1ca18a..c5aace6928 100644 --- a/spec/controllers/admin/trade_names_relationships_controller_spec.rb +++ b/spec/controllers/admin/trade_names_relationships_controller_spec.rb @@ -16,11 +16,11 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the trade_name_relationship variable" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - assigns(:trade_name_relationship).should_not be_nil + expect(assigns(:trade_name_relationship)).not_to be_nil end end @@ -31,7 +31,7 @@ :taxon_relationship => { other_taxon_concept_id: trade_name.id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -39,7 +39,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -47,12 +47,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => trade_name_relationship.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the trade_name_relationship variable" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => trade_name_relationship.id - assigns(:trade_name_relationship).should_not be_nil + expect(assigns(:trade_name_relationship)).not_to be_nil end end @@ -64,7 +64,7 @@ :taxon_relationship => { other_taxon_concept_id: trade_name.id } - response.should render_template("create") + expect(response).to render_template("create") end it "responds with json when not successful" do xhr :put, :update, :format => 'js', @@ -73,7 +73,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -82,7 +82,7 @@ delete :destroy, :taxon_concept_id => taxon_concept.id, :id => trade_name_relationship.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(trade_name_relationship.taxon_concept) ) end diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index 968a5412bd..bb66421e3c 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -7,7 +7,7 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -15,11 +15,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, user: FactoryGirl.attributes_for(:user) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, user: { :name => nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -27,11 +27,11 @@ let(:user) { create(:user) } it "renders the edit template" do xhr :get, :edit, :id => user.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :edit, :id => user.id - assigns(:user).should_not be_nil + expect(assigns(:user)).not_to be_nil end end @@ -39,12 +39,12 @@ let(:user) { create(:user) } it "responds with 200 when successful" do xhr :put, :update, :format => 'js', :id => user.id, :user => { :name => 'ZZ' } - response.should be_success - response.should render_template('create') + expect(response).to be_success + expect(response).to render_template('create') end it "responds with template new when not successful" do xhr :put, :update, :format => 'js', :id => user.id, :user => { :name => nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -52,7 +52,7 @@ let(:user) { create(:user) } it "redirects after delete" do delete :destroy, :id => user.id - response.should redirect_to(admin_users_url) + expect(response).to redirect_to(admin_users_url) end end diff --git a/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb b/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb index f2038e207f..8cb20f57b5 100644 --- a/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb +++ b/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb @@ -8,13 +8,13 @@ get :index, :taxonomy => "CITES", :taxon_concept_query => "Boa", :ranks => ["SPECIES"], :visibility => "trade" - response.body.should have_json_size(1). + expect(response.body).to have_json_size(1). at_path("auto_complete_taxon_concepts") end it "returns 3 results when searching for species name and not filtering by rank" do get :index, :taxonomy => "CITES", :taxon_concept_query => "Boa" - response.body.should have_json_size(3). + expect(response.body).to have_json_size(3). at_path("auto_complete_taxon_concepts") end end diff --git a/spec/controllers/api/document_geo_entities_controller_spec.rb b/spec/controllers/api/document_geo_entities_controller_spec.rb index 1645e074f7..4a8abd36a9 100644 --- a/spec/controllers/api/document_geo_entities_controller_spec.rb +++ b/spec/controllers/api/document_geo_entities_controller_spec.rb @@ -25,17 +25,17 @@ it "returns Poland when searching by wolf" do get :index, taxon_concept_query: 'Canis lu' - response.body.should have_json_size(1).at_path('document_geo_entities') + expect(response.body).to have_json_size(1).at_path('document_geo_entities') end it "returns 0 geo entities when no match for taxon name" do get :index, taxon_concept_query: 'Lynx' - response.body.should have_json_size(0).at_path('document_geo_entities') + expect(response.body).to have_json_size(0).at_path('document_geo_entities') end it "returns all geo entities when no taxon name given" do get :index - response.body.should have_json_size(7).at_path('document_geo_entities') + expect(response.body).to have_json_size(7).at_path('document_geo_entities') end end diff --git a/spec/controllers/api/document_tags_controller.rb b/spec/controllers/api/document_tags_controller.rb index 4c6498fcd1..3d1399fdfd 100644 --- a/spec/controllers/api/document_tags_controller.rb +++ b/spec/controllers/api/document_tags_controller.rb @@ -7,7 +7,7 @@ end it "returns document tags" do get :index - response.body.should have_json_size(1).at_path('document_tags') + expect(response.body).to have_json_size(1).at_path('document_tags') end end end diff --git a/spec/controllers/api/documents_controller_spec.rb b/spec/controllers/api/documents_controller_spec.rb index 10ee72fc8b..268ed686a7 100644 --- a/spec/controllers/api/documents_controller_spec.rb +++ b/spec/controllers/api/documents_controller_spec.rb @@ -28,7 +28,7 @@ context "GET index returns all documents" do def get_all_documents get :index, taxon_concept_id: @taxon_concept.id - response.body.should have_json_size(4).at_path('documents') + expect(response.body).to have_json_size(4).at_path('documents') end context "GET index contributor" do login_contributor @@ -50,7 +50,7 @@ def get_all_documents context "GET index returns only public documents" do def get_public_documents get :index, taxon_concept_id: @taxon_concept.id - response.body.should have_json_size(3).at_path('documents') + expect(response.body).to have_json_size(3).at_path('documents') end context "GET index api user " do login_api_user @@ -69,7 +69,7 @@ def get_public_documents context "GET index returns only public documents for secretariat role" do def get_public_documents get :index, taxon_concept_id: @taxon_concept.id - response.body.should have_json_size(3).at_path('documents') + expect(response.body).to have_json_size(3).at_path('documents') end context "GET index api user " do login_secretariat_user @@ -83,7 +83,7 @@ def get_public_documents context "show action fails" do login_api_user it "should return 403 status when permission denied" do - controller.should_receive(:render_403) { controller.render nothing: true } + expect(controller).to receive(:render_403) { controller.render nothing: true } get :show, id: @document2.id end end @@ -91,7 +91,7 @@ def get_public_documents context "GET should retrieve documents with no event_type" do it "returns documents with no event_type" do get :index, event_type: "Other" - response.body.should have_json_size(1).at_path('documents') + expect(response.body).to have_json_size(1).at_path('documents') end end @@ -99,35 +99,35 @@ def get_public_documents context "single document selected" do it "should return 404 if file is missing" do expect(File).to receive(:exists?).and_return(false) - controller.should_receive(:render_404) { controller.render nothing: true } + expect(controller).to receive(:render_404) { controller.render nothing: true } get :download_zip, ids: @document2.id end it "should return zip file if file is found" do allow(controller).to receive(:render) expect(File).to receive(:exists?).and_return(true) get :download_zip, ids: @document2.id - response.headers['Content-Type'].should eq 'application/zip' + expect(response.headers['Content-Type']).to eq 'application/zip' end end context "multiple documents selected" do it "should return 404 if all files are missing" do expect(File).to receive(:exists?).and_return(false, false) - controller.should_receive(:render_404) { controller.render nothing: true } + expect(controller).to receive(:render_404) { controller.render nothing: true } get :download_zip, ids: "#{@document.id},#{@document2.id}" end it "should return zip file if at least a file is found" do expect(File).to receive(:exists?).and_return(false, true) get :download_zip, ids: "#{@document.id},#{@document2.id}" - response.headers['Content-Type'].should eq 'application/zip' + expect(response.headers['Content-Type']).to eq 'application/zip' end end context "cascading documents logic" do it "should get subspecies documents" do get :index, taxon_concepts_ids: [@taxon_concept.id] - response.body.should have_json_size(3).at_path('documents') + expect(response.body).to have_json_size(3).at_path('documents') end end end diff --git a/spec/controllers/api/events_controller_spec.rb b/spec/controllers/api/events_controller_spec.rb index 31db57c674..9c2374b196 100644 --- a/spec/controllers/api/events_controller_spec.rb +++ b/spec/controllers/api/events_controller_spec.rb @@ -9,8 +9,8 @@ end it "returns only E-library events most recent first" do get :index - response.body.should have_json_size(2).at_path('events') - response.body.should be_json_eql( + expect(response.body).to have_json_size(2).at_path('events') + expect(response.body).to be_json_eql( Species::EventSerializer.new(@copY).attributes.to_json ).at_path('events/0') end diff --git a/spec/controllers/api/geo_entities_controller_spec.rb b/spec/controllers/api/geo_entities_controller_spec.rb index 8b94051373..2ef04d6da8 100644 --- a/spec/controllers/api/geo_entities_controller_spec.rb +++ b/spec/controllers/api/geo_entities_controller_spec.rb @@ -37,11 +37,11 @@ describe "GET index" do it "returns regions" do get :index, :geo_entity_types_set => "1" - response.body.should have_json_size(1).at_path('geo_entities') + expect(response.body).to have_json_size(1).at_path('geo_entities') end it "returns countries & territories" do get :index, :geo_entity_types_set => "2" - response.body.should have_json_size(3).at_path('geo_entities') + expect(response.body).to have_json_size(3).at_path('geo_entities') end end end diff --git a/spec/controllers/api/purposes_controller_spec.rb b/spec/controllers/api/purposes_controller_spec.rb index ff87f5dbab..f3b582ef34 100644 --- a/spec/controllers/api/purposes_controller_spec.rb +++ b/spec/controllers/api/purposes_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns purposes" do get :index - response.body.should have_json_size(1).at_path('purposes') + expect(response.body).to have_json_size(1).at_path('purposes') end end end diff --git a/spec/controllers/api/sources_controller_spec.rb b/spec/controllers/api/sources_controller_spec.rb index 86d4c623dd..b46a484f7a 100644 --- a/spec/controllers/api/sources_controller_spec.rb +++ b/spec/controllers/api/sources_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns sources" do get :index - response.body.should have_json_size(1).at_path('sources') + expect(response.body).to have_json_size(1).at_path('sources') end end end diff --git a/spec/controllers/api/terms_controller_spec.rb b/spec/controllers/api/terms_controller_spec.rb index f6293eb5e8..e4e8feaab0 100644 --- a/spec/controllers/api/terms_controller_spec.rb +++ b/spec/controllers/api/terms_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns terms" do get :index - response.body.should have_json_size(1).at_path('terms') + expect(response.body).to have_json_size(1).at_path('terms') end end end diff --git a/spec/controllers/api/units_controller_spec.rb b/spec/controllers/api/units_controller_spec.rb index 6621b231fe..f582cb87f8 100644 --- a/spec/controllers/api/units_controller_spec.rb +++ b/spec/controllers/api/units_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns units" do get :index - response.body.should have_json_size(1).at_path('units') + expect(response.body).to have_json_size(1).at_path('units') end end end diff --git a/spec/controllers/checklist/geo_entities_controller_spec.rb b/spec/controllers/checklist/geo_entities_controller_spec.rb index 78f42f0582..847c612080 100644 --- a/spec/controllers/checklist/geo_entities_controller_spec.rb +++ b/spec/controllers/checklist/geo_entities_controller_spec.rb @@ -37,11 +37,11 @@ describe "GET index" do it "returns regions" do get :index, :geo_entity_types_set => "1" - response.body.should have_json_size(1) + expect(response.body).to have_json_size(1) end it "returns countries & territories" do get :index, :geo_entity_types_set => "2" - response.body.should have_json_size(3) + expect(response.body).to have_json_size(3) end end end diff --git a/spec/controllers/checklist/taxon_concepts_controller_spec.rb b/spec/controllers/checklist/taxon_concepts_controller_spec.rb index 39b7046e2e..0321ee49a4 100644 --- a/spec/controllers/checklist/taxon_concepts_controller_spec.rb +++ b/spec/controllers/checklist/taxon_concepts_controller_spec.rb @@ -6,13 +6,13 @@ it "returns 1 result" do xhr :get, :autocomplete, :format => 'json', :scientific_name => 'Arctocephalus townsendi' - response.body.should have_json_size(1) + expect(response.body).to have_json_size(1) end end context "when query blank" do it "returns 0 results" do xhr :get, :autocomplete, :format => 'json' - response.body.should have_json_size(0) + expect(response.body).to have_json_size(0) end end end diff --git a/spec/controllers/cites_trade/exports_controller_spec.rb b/spec/controllers/cites_trade/exports_controller_spec.rb index ba47687043..4058e10aa9 100644 --- a/spec/controllers/cites_trade/exports_controller_spec.rb +++ b/spec/controllers/cites_trade/exports_controller_spec.rb @@ -7,7 +7,7 @@ it "returns count of shipments" do create(:shipment) get :download, :filters => { :report_type => 'raw' }, :format => :json - parse_json(response.body)['total'].should == 1 + expect(parse_json(response.body)['total']).to eq(1) end end context "comptab" do @@ -17,22 +17,22 @@ allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") get :download, :filters => { :report_type => :comptab } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"shipments.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"shipments.csv\"") end it "logs download information from public interface to the TradeDataDownload model" do create(:shipment) expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") - lambda do + expect do get :download, :filters => { :report_type => 'comptab', :exporters_ids => ['40'], :time_range_start => '1975', :time_range_end => '2000' } - end.should change(Trade::TradeDataDownload, :count).by(1) + end.to change(Trade::TradeDataDownload, :count).by(1) end end context 'when shipments cannot be retrieved' do diff --git a/spec/controllers/cites_trade/shipments_controller_spec.rb b/spec/controllers/cites_trade/shipments_controller_spec.rb index 6a8c17e38e..b90e7e730c 100644 --- a/spec/controllers/cites_trade/shipments_controller_spec.rb +++ b/spec/controllers/cites_trade/shipments_controller_spec.rb @@ -10,24 +10,24 @@ get :index, filters: { report_type: 'raw' }, format: :json - response.body.should have_json_path('shipment_comptab_export') + expect(response.body).to have_json_path('shipment_comptab_export') end it "should return comptab export when report_type = comptab" do get :index, filters: { report_type: 'comptab' }, format: :json - response.body.should have_json_path('shipment_comptab_export') + expect(response.body).to have_json_path('shipment_comptab_export') end it "should return gross net export when report_type = gross_exports" do get :index, filters: { report_type: 'gross_exports' }, format: :json - response.body.should have_json_path('shipment_gross_net_export') + expect(response.body).to have_json_path('shipment_gross_net_export') end end it "should return all comptab shipments" do get :index, format: :json - response.body.should have_json_size(7).at_path('shipment_comptab_export/rows') + expect(response.body).to have_json_size(7).at_path('shipment_comptab_export/rows') end it "should return all gross_exports shipments" do get :index, filters: { @@ -35,28 +35,28 @@ time_range_start: 2012, time_range_end: 2014 }, format: :json - response.body.should have_json_size(5).at_path('shipment_gross_net_export/rows') + expect(response.body).to have_json_size(5).at_path('shipment_gross_net_export/rows') end it "should return genus & species shipments when searching by genus" do get :index, filters: { taxon_concepts_ids: [@animal_genus.id], selection_taxon: 'taxonomic_cascade' }, format: :json - response.body.should have_json_size(2).at_path('shipment_comptab_export/rows') + expect(response.body).to have_json_size(2).at_path('shipment_comptab_export/rows') end it "should return family, genus & species shipments when searching by family" do get :index, filters: { taxon_concepts_ids: [@animal_family.id], selection_taxon: 'taxonomic_cascade' }, format: :json - response.body.should have_json_size(3).at_path('shipment_comptab_export/rows') + expect(response.body).to have_json_size(3).at_path('shipment_comptab_export/rows') end it "should return genus shipments when searching by taxon" do get :index, filters: { taxon_concepts_ids: [@animal_genus.id], selection_taxon: 'taxon' }, format: :json - response.body.should have_json_size(0).at_path('shipment_comptab_export/rows') + expect(response.body).to have_json_size(0).at_path('shipment_comptab_export/rows') end end diff --git a/spec/controllers/pages_controller_spec.rb b/spec/controllers/pages_controller_spec.rb index 2730f23e40..b59be98034 100644 --- a/spec/controllers/pages_controller_spec.rb +++ b/spec/controllers/pages_controller_spec.rb @@ -9,11 +9,11 @@ end it "assigns annex regulations sorted by effective_at" do get :eu_legislation - assigns(:eu_annex_regulations).should eq([@ar2, @ar1]) + expect(assigns(:eu_annex_regulations)).to eq([@ar2, @ar1]) end it "assigns suspension regulations" do get :eu_legislation - assigns(:eu_suspension_regulations).should_not be_nil + expect(assigns(:eu_suspension_regulations)).not_to be_nil end end end diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index f2231c25b2..e28bd4ab92 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -15,7 +15,7 @@ put :update, :id => @u1.id, :user => { :email => @u1.email, :name => 'ZZ' } - response.should redirect_to(admin_root_url) + expect(response).to redirect_to(admin_root_url) end it "should update password" do sign_in(@u1) @@ -24,14 +24,14 @@ :password => '22222222', :password_confirmation => '22222222', :current_password => '11111111' } - response.should redirect_to(admin_root_url) + expect(response).to redirect_to(admin_root_url) end it "should not update that account if not valid" do sign_in(@u1) put :update, :id => @u1.id, :user => { :email => @u1.email, :name => nil } - response.should render_template("edit") + expect(response).to render_template("edit") end end @@ -41,7 +41,7 @@ put :update, :id => @u2.id, :user => { :email => @u1.email, :name => 'ZZ' } - @u2.reload.name.should_not == 'ZZ' + expect(@u2.reload.name).not_to eq('ZZ') end end diff --git a/spec/controllers/trade/annual_report_uploads_controller_spec.rb b/spec/controllers/trade/annual_report_uploads_controller_spec.rb index 96a69f6721..2572de7de2 100644 --- a/spec/controllers/trade/annual_report_uploads_controller_spec.rb +++ b/spec/controllers/trade/annual_report_uploads_controller_spec.rb @@ -34,18 +34,18 @@ def exporter_csv end it "should return all annual report uploads" do get :index, format: :json - response.body.should have_json_size(2).at_path('annual_report_uploads') + expect(response.body).to have_json_size(2).at_path('annual_report_uploads') end it "should return annual report uploads in progress" do get :index, is_done: 0, format: :json - response.body.should have_json_size(1).at_path('annual_report_uploads') + expect(response.body).to have_json_size(1).at_path('annual_report_uploads') end end describe "GET show" do it "should return success" do get :show, id: annual_report_upload.id, format: :json - response.body.should have_json_path('annual_report_upload') + expect(response.body).to have_json_path('annual_report_upload') end end @@ -56,7 +56,7 @@ def exporter_csv :point_of_view => 'E', :trading_country_id => france.id, :csv_source_file => exporter_csv }, :format => 'json' - parse_json(response.body, "files/0")['id'].should_not be_blank + expect(parse_json(response.body, "files/0")['id']).not_to be_blank end it "should return error in jQuery File Upload way" do xhr :post, :create, @@ -64,7 +64,7 @@ def exporter_csv :point_of_view => 'I', :trading_country_id => france.id, :csv_source_file => exporter_csv }, :format => 'json' - parse_json(response.body, "files/0")['id'].should be_blank + expect(parse_json(response.body, "files/0")['id']).to be_blank end end diff --git a/spec/controllers/trade/ember_controller_spec.rb b/spec/controllers/trade/ember_controller_spec.rb index 04ac14a661..3e5b55b4bd 100644 --- a/spec/controllers/trade/ember_controller_spec.rb +++ b/spec/controllers/trade/ember_controller_spec.rb @@ -6,7 +6,7 @@ describe "GET 'start'" do it "returns http success" do get 'start' - response.should be_success + expect(response).to be_success end end diff --git a/spec/controllers/trade/exports_controller_spec.rb b/spec/controllers/trade/exports_controller_spec.rb index 82a133c616..a2d5069909 100644 --- a/spec/controllers/trade/exports_controller_spec.rb +++ b/spec/controllers/trade/exports_controller_spec.rb @@ -8,7 +8,7 @@ it "returns count of shipments" do create(:shipment) get :download, :filters => { :report_type => 'raw' }, :format => :json - parse_json(response.body)['total'].should == 1 + expect(parse_json(response.body)['total']).to eq(1) end it "does not log download information from the admin interface" do create(:shipment) diff --git a/spec/controllers/trade/sandbox_shipments_controller_spec.rb b/spec/controllers/trade/sandbox_shipments_controller_spec.rb index 69d9b46e46..50522a9230 100644 --- a/spec/controllers/trade/sandbox_shipments_controller_spec.rb +++ b/spec/controllers/trade/sandbox_shipments_controller_spec.rb @@ -37,14 +37,14 @@ :id => @shipment.id, :sandbox_shipment => { :taxon_name => nil, :accepted_taxon_name => nil }, :format => :json - response.body.should be_blank + expect(response.body).to be_blank end it "should return success when taxon_name does not exist" do put :update, :annual_report_upload_id => annual_report_upload.id, :id => @shipment.id, :sandbox_shipment => { :taxon_name => 'Acipenser foobarus' }, :format => :json - response.body.should be_blank + expect(response.body).to be_blank end end @@ -53,7 +53,7 @@ delete :destroy, :annual_report_upload_id => annual_report_upload.id, :id => @shipment.id, :format => :json - response.body.should be_blank + expect(response.body).to be_blank end end @@ -64,9 +64,9 @@ validation_error_id: @validation_error.id, updates: { appendix: 'II' }, format: :json - response.body.should be_blank - sandbox_klass.where(taxon_name: @species.full_name, appendix: 'I').count(true).should == 0 - sandbox_klass.where(taxon_name: @species.full_name, appendix: 'II').count(true).should == 1 + expect(response.body).to be_blank + expect(sandbox_klass.where(taxon_name: @species.full_name, appendix: 'I').count(true)).to eq(0) + expect(sandbox_klass.where(taxon_name: @species.full_name, appendix: 'II').count(true)).to eq(1) end end @@ -76,8 +76,8 @@ annual_report_upload_id: annual_report_upload.id, validation_error_id: @validation_error.id, format: :json - response.body.should be_blank - sandbox_klass.where(taxon_concept_id: @species.id).count(true).should == 0 + expect(response.body).to be_blank + expect(sandbox_klass.where(taxon_concept_id: @species.id).count(true)).to eq(0) end end diff --git a/spec/controllers/trade/shipments_controller_spec.rb b/spec/controllers/trade/shipments_controller_spec.rb index 507c41a5af..dc4ac30809 100644 --- a/spec/controllers/trade/shipments_controller_spec.rb +++ b/spec/controllers/trade/shipments_controller_spec.rb @@ -9,17 +9,17 @@ before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } it "should return all shipments" do get :index, format: :json - response.body.should have_json_size(7).at_path('shipments') + expect(response.body).to have_json_size(7).at_path('shipments') end it "should return genus & species shipments when searching by genus" do get :index, taxon_concepts_ids: [@animal_genus.id], format: :json - response.body.should have_json_size(2).at_path('shipments') + expect(response.body).to have_json_size(2).at_path('shipments') end it "should return 1 shipment when searching for reporter_type I" do get :index, time_range_start: @shipment1.year, time_range_end: @shipment2.year, reporter_type: "E", exporters_ids: [@portugal.id.to_s], format: :json - response.body.should have_json_size(1).at_path('shipments') + expect(response.body).to have_json_size(1).at_path('shipments') end end @@ -30,7 +30,7 @@ shipment: { reported_taxon_concept_id: @synonym_subspecies.id } - @shipment1.reload.taxon_concept_id.should == @plant_species.id + expect(@shipment1.reload.taxon_concept_id).to eq(@plant_species.id) end it "should not auto resolve accepted taxon when given" do put :update, id: @shipment1.id, @@ -38,14 +38,14 @@ reported_taxon_concept_id: @synonym_subspecies.id, taxon_concept_id: @animal_species.id } - @shipment1.reload.taxon_concept_id.should == @animal_species.id + expect(@shipment1.reload.taxon_concept_id).to eq(@animal_species.id) end it "should delete orphaned permits" do put :update, id: @shipment1.id, shipment: { import_permit_number: 'YYY' } - Trade::Permit.find_by_id(@import_permit.id).should be_nil + expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil end end @@ -99,8 +99,8 @@ year: 2014 } } - Trade::Shipment.where(year: 2013).count.should == 0 - Trade::Shipment.where(year: 2014).count.should > 0 + expect(Trade::Shipment.where(year: 2013).count).to eq(0) + expect(Trade::Shipment.where(year: 2014).count).to be > 0 end it "should auto resolve accepted taxon when blank" do @@ -116,7 +116,7 @@ reported_taxon_concept_id: @synonym_subspecies.id } } - @shipment1.reload.taxon_concept_id.should == @plant_species.id + expect(@shipment1.reload.taxon_concept_id).to eq(@plant_species.id) end it "should not auto resolve accepted taxon when given" do @@ -133,7 +133,7 @@ taxon_concept_id: @animal_species.id } } - @shipment1.reload.taxon_concept_id.should == @animal_species.id + expect(@shipment1.reload.taxon_concept_id).to eq(@animal_species.id) end it "should set permit number to blank and delete orphaned permits" do @@ -149,9 +149,9 @@ import_permit_number: nil } } - @shipment1.reload.import_permits_ids.should be_blank - @shipment1.import_permit_number.should be_nil - Trade::Permit.find_by_id(@import_permit.id).should be_nil + expect(@shipment1.reload.import_permits_ids).to be_blank + expect(@shipment1.import_permit_number).to be_nil + expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil end end @@ -167,7 +167,7 @@ importers_ids: [@portugal.id.to_s, @argentina.id.to_s], taxon_concepts_ids: [@animal_species.id] } - Trade::Shipment.count.should == 6 + expect(Trade::Shipment.count).to eq(6) end it "should delete 5 shipment" do post :destroy_batch, { @@ -177,49 +177,49 @@ exporters_ids: [@portugal.id.to_s, @argentina.id.to_s], importers_ids: [@portugal.id.to_s, @argentina.id.to_s] } - Trade::Shipment.count.should == 2 + expect(Trade::Shipment.count).to eq(2) end it "should delete 2 shipments" do post :destroy_batch, importers_ids: [@argentina.id.to_s] - Trade::Shipment.count.should == 5 + expect(Trade::Shipment.count).to eq(5) end it "should delete 1 shipments" do post :destroy_batch, exporters_ids: [@portugal.id.to_s] - Trade::Shipment.count.should == 5 + expect(Trade::Shipment.count).to eq(5) end it "should delete all shipments" do post :destroy_batch, purposes_ids: [@purpose.id.to_s] - Trade::Shipment.count.should == 0 + expect(Trade::Shipment.count).to eq(0) end it "shouldn't delete any shipments" do post :destroy_batch, purpose_blank: "true" - Trade::Shipment.count.should == 7 + expect(Trade::Shipment.count).to eq(7) end it "should delete 1 shipment" do post :destroy_batch, sources_ids: [@source.id.to_s] - Trade::Shipment.count.should == 5 + expect(Trade::Shipment.count).to eq(5) end it "should delete 3 shipment" do post :destroy_batch, sources_ids: [@source_wild.id.to_s] - Trade::Shipment.count.should == 4 + expect(Trade::Shipment.count).to eq(4) end it "should delete 0 shipments" do post :destroy_batch, sources_ids: [@source_wild.id.to_s], reporter_type: 'E' - Trade::Shipment.count.should == 7 + expect(Trade::Shipment.count).to eq(7) end it "should delete 4 shipments" do post :destroy_batch, sources_ids: [@source_wild.id.to_s], reporter_type: 'I', source_blank: "true" - Trade::Shipment.count.should == 3 + expect(Trade::Shipment.count).to eq(3) end it "should delete orphaned permits" do @@ -231,8 +231,8 @@ exporters_ids: [@portugal.id.to_s, @argentina.id.to_s], importers_ids: [@portugal.id.to_s, @argentina.id.to_s] } - Trade::Shipment.find_by_id(@shipment1.id).should be_nil - Trade::Permit.find_by_id(@import_permit.id).should be_nil + expect(Trade::Shipment.find_by_id(@shipment1.id)).to be_nil + expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil end end @@ -240,11 +240,11 @@ before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } it "should delete 1 shipment" do delete :destroy, id: @shipment1.id - Trade::Shipment.where(id: @shipment1.id).should be_empty + expect(Trade::Shipment.where(id: @shipment1.id)).to be_empty end it "should delete orphaned permits" do delete :destroy, id: @shipment1.id - Trade::Permit.find_by_id(@import_permit.id).should be_nil + expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil end end end diff --git a/spec/controllers/trade/validation_errors_controller_spec.rb b/spec/controllers/trade/validation_errors_controller_spec.rb index c21c92b1c8..67446caeb9 100644 --- a/spec/controllers/trade/validation_errors_controller_spec.rb +++ b/spec/controllers/trade/validation_errors_controller_spec.rb @@ -44,7 +44,7 @@ describe "GET show" do it "should return success" do get :show, id: validation_error.id, format: :json - response.body.should have_json_path('validation_error') + expect(response.body).to have_json_path('validation_error') end end diff --git a/spec/controllers/trade/validation_rules_controller_spec.rb b/spec/controllers/trade/validation_rules_controller_spec.rb index c64b68de97..8e3bbb719b 100644 --- a/spec/controllers/trade/validation_rules_controller_spec.rb +++ b/spec/controllers/trade/validation_rules_controller_spec.rb @@ -6,7 +6,7 @@ describe "GET index" do it "should return success" do get :index, format: :json - response.should be_success + expect(response).to be_success end end end diff --git a/spec/helpers/admin_helper_spec.rb b/spec/helpers/admin_helper_spec.rb index e9fdbd7be1..50df2edcaf 100644 --- a/spec/helpers/admin_helper_spec.rb +++ b/spec/helpers/admin_helper_spec.rb @@ -13,20 +13,20 @@ describe AdminHelper, type: :helper do describe 'edit_icon' do it "ouputs pencil icon for edit" do - helper.edit_icon.should == '' + expect(helper.edit_icon).to eq('') end end describe 'delete_icon' do it "ouputs bin icon for delete" do - helper.delete_icon.should == '' + expect(helper.delete_icon).to eq('') end end describe 'true_false_icon' do it "outputs tick icon for true" do - helper.true_false_icon(true).should == '' + expect(helper.true_false_icon(true)).to eq('') end it "outputs blank for false" do - helper.true_false_icon(false).should be_blank + expect(helper.true_false_icon(false)).to be_blank end end diff --git a/spec/helpers/listing_changes_helper_spec.rb b/spec/helpers/listing_changes_helper_spec.rb index c2a8330a8b..81750c65f3 100644 --- a/spec/helpers/listing_changes_helper_spec.rb +++ b/spec/helpers/listing_changes_helper_spec.rb @@ -52,25 +52,27 @@ ) } it "outputs all geo entities comma separated" do - helper.geo_entities_tooltip(listing_change).should == 'Poland' + expect(helper.geo_entities_tooltip(listing_change)).to eq('Poland') end end describe 'annotation_tooltip' do it "outputs the regular annotation in both short and long English form" do - helper.annotation_tooltip(listing_change).should == + expect(helper.annotation_tooltip(listing_change)).to eq( "Only population of PL (Only population of Poland)" + ) end end describe 'hash_annotation_tooltip' do it "outputs the hash annotation in long English form" do - helper.hash_annotation_tooltip(listing_change).should == + expect(helper.hash_annotation_tooltip(listing_change)).to eq( "Only seeds and roots." + ) end end describe 'excluded_geo_entities_tooltip' do context "no exclusions" do it "should output blank exception" do - helper.excluded_geo_entities_tooltip(listing_change).should be_blank + expect(helper.excluded_geo_entities_tooltip(listing_change)).to be_blank end end @@ -90,7 +92,7 @@ ) } it "should list geographic exception" do - helper.excluded_geo_entities_tooltip(listing_change).should == 'Poland' + expect(helper.excluded_geo_entities_tooltip(listing_change)).to eq('Poland') end end end @@ -103,7 +105,7 @@ } context "no exclusions" do it "should output blank exception" do - helper.excluded_taxon_concepts_tooltip(listing_change).should be_blank + expect(helper.excluded_taxon_concepts_tooltip(listing_change)).to be_blank end end @@ -115,7 +117,7 @@ ) } it "should list taxonomic exception" do - helper.excluded_taxon_concepts_tooltip(listing_change).should == 'Foobarus cracovianus' + expect(helper.excluded_taxon_concepts_tooltip(listing_change)).to eq('Foobarus cracovianus') end end diff --git a/spec/models/annotation_spec.rb b/spec/models/annotation_spec.rb index c2d2ac1e76..2c4ec0feae 100644 --- a/spec/models/annotation_spec.rb +++ b/spec/models/annotation_spec.rb @@ -43,16 +43,16 @@ describe :destroy do let(:annotation) { create(:annotation) } context "when no dependent objects attached" do - specify { annotation.destroy.should be_truthy } + specify { expect(annotation.destroy).to be_truthy } end context "when dependent objects attached" do context "when listing changes" do let!(:listing_change) { create_cites_I_addition(:annotation_id => annotation.id) } - specify { annotation.destroy.should be_falsey } + specify { expect(annotation.destroy).to be_falsey } end context "when hashed listing changes" do let!(:listing_change) { create_cites_I_addition(:hash_annotation_id => annotation.id) } - specify { annotation.destroy.should be_falsey } + specify { expect(annotation.destroy).to be_falsey } end end end diff --git a/spec/models/change_type_spec.rb b/spec/models/change_type_spec.rb index 49ff5097ad..6a26bd0725 100644 --- a/spec/models/change_type_spec.rb +++ b/spec/models/change_type_spec.rb @@ -18,12 +18,12 @@ describe :abbreviation do context 'change type with single word name' do let(:change_type) { create(:change_type, :name => "Word") } - specify { change_type.abbreviation.should == 'Wor' } + specify { expect(change_type.abbreviation).to eq('Wor') } end context 'change type with two words name' do let(:change_type) { create(:change_type, :name => "Word_Word") } - specify { change_type.abbreviation.should == 'Wor-Wor' } + specify { expect(change_type.abbreviation).to eq('Wor-Wor') } end end end diff --git a/spec/models/checklist/annotations_spec.rb b/spec/models/checklist/annotations_spec.rb index 30150de68d..3cf373f4b5 100644 --- a/spec/models/checklist/annotations_spec.rb +++ b/spec/models/checklist/annotations_spec.rb @@ -13,11 +13,11 @@ end context 'for species Caiman latirostris' do subject { @taxon_concepts.select { |e| e.full_name == 'Caiman latirostris' }.first } - specify { subject.ann_symbol.should == '1' } + specify { expect(subject.ann_symbol).to eq('1') } end context 'for species Panax ginseng' do subject { @taxon_concepts.select { |e| e.full_name == 'Panax ginseng' }.first } - specify { subject.ann_symbol.should == '2' } + specify { expect(subject.ann_symbol).to eq('2') } end end end diff --git a/spec/models/checklist/appendix_population_and_region_spec.rb b/spec/models/checklist/appendix_population_and_region_spec.rb index 13346aca3d..480bfe10ef 100644 --- a/spec/models/checklist/appendix_population_and_region_spec.rb +++ b/spec/models/checklist/appendix_population_and_region_spec.rb @@ -12,7 +12,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when Mexico" do @@ -23,7 +23,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when Canada" do @@ -34,7 +34,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when Argentina" do @@ -45,7 +45,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when South America" do @@ -56,7 +56,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when North America" do @@ -67,7 +67,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when North America and Argentina" do @@ -79,7 +79,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end diff --git a/spec/models/checklist/appendix_population_spec.rb b/spec/models/checklist/appendix_population_spec.rb index d33e062f06..26297fbf60 100644 --- a/spec/models/checklist/appendix_population_spec.rb +++ b/spec/models/checklist/appendix_population_spec.rb @@ -13,7 +13,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when Poland" do @@ -24,7 +24,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end @@ -38,7 +38,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when App II" do @@ -49,7 +49,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when App III" do @@ -60,7 +60,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end end @@ -76,7 +76,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when App II" do @@ -88,7 +88,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end end @@ -102,7 +102,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when App II" do @@ -114,7 +114,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end @@ -128,7 +128,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when App II" do @@ -140,7 +140,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end @@ -154,7 +154,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when Nepal" do @@ -166,7 +166,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end diff --git a/spec/models/checklist/appendix_spec.rb b/spec/models/checklist/appendix_spec.rb index 2a7329bec2..2e8321fba0 100644 --- a/spec/models/checklist/appendix_spec.rb +++ b/spec/models/checklist/appendix_spec.rb @@ -12,11 +12,11 @@ @taxon_concepts = @checklist.results end it "should return Cacatua goffiniana" do - @taxon_concepts.select { |e| e.full_name == @species1_2_1.full_name }.first.should_not be_nil + expect(@taxon_concepts.select { |e| e.full_name == @species1_2_1.full_name }.first).not_to be_nil end it "should not return Agapornis roseicollis" do - @taxon_concepts.select { |e| e.full_name == @species2_1.full_name }.first.should be_nil + expect(@taxon_concepts.select { |e| e.full_name == @species2_1.full_name }.first).to be_nil end end diff --git a/spec/models/checklist/checklist_spec.rb b/spec/models/checklist/checklist_spec.rb index 0600d26a88..b3b9ff362e 100644 --- a/spec/models/checklist/checklist_spec.rb +++ b/spec/models/checklist/checklist_spec.rb @@ -8,7 +8,7 @@ Checklist::Checklist.summarise_filters({}) } specify { - summary.should == "All results" + expect(summary).to eq("All results") } end end @@ -23,7 +23,7 @@ Checklist::Checklist.summarise_filters({ :cites_region_ids => [region.id] }) } specify { - summary.should == "Results from 1 region" + expect(summary).to eq("Results from 1 region") } end context "when > 1 region" do @@ -40,7 +40,7 @@ Checklist::Checklist.summarise_filters({ :cites_region_ids => regions }) } specify { - summary.should == "Results from 2 regions" + expect(summary).to eq("Results from 2 regions") } end end diff --git a/spec/models/checklist/common_names_spec.rb b/spec/models/checklist/common_names_spec.rb index a5f7709b07..1755f70944 100644 --- a/spec/models/checklist/common_names_spec.rb +++ b/spec/models/checklist/common_names_spec.rb @@ -17,32 +17,32 @@ end it "should return all English names for Arctocephalus australis: 'South American Fur Seal, Southern Fur Seal'" do - @australis.english_names.should == ['South American Fur Seal', 'Southern Fur Seal'] + expect(@australis.english_names).to eq(['South American Fur Seal', 'Southern Fur Seal']) end it "should return all Spanish names for Arctocephalus australis: 'Lobo fino sudamericano, Oso marino austral'" do - @australis.spanish_names.should == ['Lobo fino sudamericano', 'Oso marino austral'] + expect(@australis.spanish_names).to eq(['Lobo fino sudamericano', 'Oso marino austral']) end it "should return all French names for Arctocephalus australis: 'Otarie à fourrure australe'" do - @australis.french_names.should == ['Otarie à fourrure australe'] + expect(@australis.french_names).to eq(['Otarie à fourrure australe']) end it "should return all English names for Arctocephalus spp.: 'Fur seals, Southern fur seals'" do - @arctocephalus.english_names.should == ['Fur seals 1', 'Southern fur seals'] + expect(@arctocephalus.english_names).to eq(['Fur seals 1', 'Southern fur seals']) end it "should return all Spanish names for Arctocephalus spp.: 'Osos marinos'" do - @arctocephalus.spanish_names.should == ['Osos marinos'] + expect(@arctocephalus.spanish_names).to eq(['Osos marinos']) end it "should return all French names for Arctocephalus spp.: 'Arctocéphales du sud, Otaries à fourrure, Otaries à fourrure du sud'" do - @arctocephalus.french_names.should == ['Arctocéphales du sud', 'Otaries à fourrure', 'Otaries à fourrure du sud'] + expect(@arctocephalus.french_names).to eq(['Arctocéphales du sud', 'Otaries à fourrure', 'Otaries à fourrure du sud']) end it "should include a species without any common names defined" do @pusillus = @taxon_concepts.select { |e| e.full_name == @species3.full_name }.first - @pusillus.should_not be_nil + expect(@pusillus).not_to be_nil end end diff --git a/spec/models/checklist/higher_taxa_injector_spec.rb b/spec/models/checklist/higher_taxa_injector_spec.rb index 7de45271f7..22c277a4ee 100644 --- a/spec/models/checklist/higher_taxa_injector_spec.rb +++ b/spec/models/checklist/higher_taxa_injector_spec.rb @@ -124,7 +124,7 @@ @species1_1_1, @species2_1_1_1_1 ) - headers.map(&:full_name).should == ['Memaridae'] + expect(headers.map(&:full_name)).to eq(['Memaridae']) } end context "when two species from different classes and expand_headers set" do @@ -141,7 +141,7 @@ @species1_1_1, @species2_1_1_1_1 ) - headers.map(&:full_name).should == ['Memaria', 'Memariformes', 'Memaridae'] + expect(headers.map(&:full_name)).to eq(['Memaria', 'Memariformes', 'Memaridae']) } end end @@ -156,7 +156,7 @@ ) } specify { - hti_different_family.run.size.should == 4 + expect(hti_different_family.run.size).to eq(4) } end context "when two species from different families and skip family set" do @@ -169,7 +169,7 @@ ) } specify { - hti_different_family.run.size.should == 3 + expect(hti_different_family.run.size).to eq(3) } end end @@ -187,7 +187,7 @@ } specify { headers = hti_one_species.higher_taxa_headers(nil, @species1_1_1) - headers.map(&:full_name).should == ['Lolcatidae'] + expect(headers.map(&:full_name)).to eq(['Lolcatidae']) } end context "when one species and skip family set" do @@ -199,7 +199,7 @@ ) } specify { - hti_one_species_skip_family.higher_taxa_headers(nil, @species1_1_1).should be_empty + expect(hti_one_species_skip_family.higher_taxa_headers(nil, @species1_1_1)).to be_empty } end context "when one species and expand headers set" do @@ -212,8 +212,9 @@ } specify { headers = hti_one_species_expand_headers.higher_taxa_headers(nil, @species1_1_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ["Rotflata", "Forfiteria", "Lolcatiformes", "Lolcatidae"] + ) } end context "when two species" do @@ -226,7 +227,7 @@ ) } specify { - hti_same_genus.higher_taxa_headers(@species1_1_1, @species1_1_2).should be_empty + expect(hti_same_genus.higher_taxa_headers(@species1_1_1, @species1_1_2)).to be_empty } end context "when species and subspecies" do @@ -239,7 +240,7 @@ ) } specify { - hti_species_subspecies.higher_taxa_headers(@species1_1_2, @subspecies1_1_1_1).should be_empty + expect(hti_species_subspecies.higher_taxa_headers(@species1_1_2, @subspecies1_1_1_1)).to be_empty } end end @@ -254,7 +255,7 @@ ) } specify { - hti_same_family.higher_taxa_headers(@species1_1_1, @species1_2_1).should be_empty + expect(hti_same_family.higher_taxa_headers(@species1_1_1, @species1_2_1)).to be_empty } end end @@ -270,8 +271,9 @@ } specify { headers = hti_different_family.higher_taxa_headers(@species1_1_1, @species2_1_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end context "when two species from different families and expand headers set" do @@ -285,8 +287,9 @@ } specify { headers = hti_different_family.higher_taxa_headers(@species1_1_1, @species2_1_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end context "when genus and different family" do @@ -300,8 +303,9 @@ } specify { headers = hti_genus_family.higher_taxa_headers(@genus1_1, @family2) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end context "when family and genus in different family" do @@ -315,8 +319,9 @@ } specify { headers = hti_family_genus.higher_taxa_headers(@family1, @genus2_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end end @@ -332,8 +337,9 @@ } specify { headers = hti_different_orders.higher_taxa_headers(@order2, @genus2_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end context "when order and genus from different order and expand headers set" do @@ -347,8 +353,9 @@ } specify { headers = hti_different_orders_expand.higher_taxa_headers(@order2, @genus2_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Lolcatiformes', 'Foobaridae'] + ) } end end diff --git a/spec/models/checklist/higher_taxa_item_spec.rb b/spec/models/checklist/higher_taxa_item_spec.rb index e9a434f426..e7abf7cab0 100644 --- a/spec/models/checklist/higher_taxa_item_spec.rb +++ b/spec/models/checklist/higher_taxa_item_spec.rb @@ -15,7 +15,7 @@ ) } subject { Checklist::HigherTaxaItem.new(taxon_concept) } - specify { subject.ancestors_path.should == 'Chordata,Reptilia,Crocodylia,Alligatoridae' } + specify { expect(subject.ancestors_path).to eq('Chordata,Reptilia,Crocodylia,Alligatoridae') } end context "when plant" do let(:taxon_concept) { @@ -29,7 +29,7 @@ ) } subject { Checklist::HigherTaxaItem.new(taxon_concept) } - specify { subject.ancestors_path.should == 'Agavaceae' } + specify { expect(subject.ancestors_path).to eq('Agavaceae') } end end diff --git a/spec/models/checklist/order_spec.rb b/spec/models/checklist/order_spec.rb index 7af3af8b27..1603962b78 100644 --- a/spec/models/checklist/order_spec.rb +++ b/spec/models/checklist/order_spec.rb @@ -15,7 +15,7 @@ @taxon_concepts = @checklist.plantae end it "should include Agave (Agavaceae) before Panax (Araliaceae)" do - @taxon_concepts.index { |tc| tc.full_name == 'Agave parviflora' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Agave parviflora' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Panax ginseng' } end end @@ -26,30 +26,31 @@ @taxon_concepts = @checklist.animalia end it "should include birds after last mammal" do - @taxon_concepts.index { |tc| tc.full_name == 'Tapirus terrestris' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Tapirus terrestris' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Gymnogyps californianus' } end it "should include Falconiformes (Aves) before Psittaciformes (Aves)" do - @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Psittaciformes' } end it "should include Cathartidae within Falconiformes" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should > + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be > @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' } - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Psittaciformes' } end it "should include Cathartidae (Falconiformes) before Falconidae (Falconiformes)" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Falconidae' } end it "should include Cathartidae (Falconiformes) before Cacatuidae (Psittaciformes)" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Cacatuidae' } end it "should include Hirudo medicinalis at the very end (after all Chordata)" do - @taxon_concepts.index { |tc| tc.full_name == 'Hirudo medicinalis' }.should == + expect(@taxon_concepts.index { |tc| tc.full_name == 'Hirudo medicinalis' }).to eq( @taxon_concepts.length - 1 + ) end end end @@ -59,19 +60,19 @@ @taxon_concepts = @checklist.results end it "should include Falconiformes (Aves) before Psittaciformes (Aves)" do - @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Psittaciformes' } end it "should include Cathartidae before Falconiformes" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' } end it "should include Cathartidae (Falconiformes) before Falconidae (Falconiformes)" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Falconidae' } end it "should include Cathartidae (Falconiformes) after Cacatuidae (Psittaciformes)" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should > + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be > @taxon_concepts.index { |tc| tc.full_name == 'Cacatuidae' } end end diff --git a/spec/models/checklist/pdf/history_annotations_key_spec.rb b/spec/models/checklist/pdf/history_annotations_key_spec.rb index 695760bc3a..15d0d94d51 100644 --- a/spec/models/checklist/pdf/history_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/history_annotations_key_spec.rb @@ -8,7 +8,7 @@ specify { allow(subject).to receive(:non_hash_annotations_key).and_return('x') allow(subject).to receive(:hash_annotations_key).and_return('x') - subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in" + expect(subject.annotations_key).to eq("\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in") } end @@ -57,7 +57,7 @@ end subject { Checklist::Pdf::HistoryAnnotationsKey.new } specify { - subject.hash_annotations_key.should == "\\hashAnnotationsHistoryInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP1 & \\validFrom \\hspace{2 pt} 01/07/2012\\\\\n\\#1 & Only trunks \\\\\n\n}\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n" + expect(subject.hash_annotations_key).to eq("\\hashAnnotationsHistoryInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP1 & \\validFrom \\hspace{2 pt} 01/07/2012\\\\\n\\#1 & Only trunks \\\\\n\n}\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n") } end diff --git a/spec/models/checklist/pdf/history_spec.rb b/spec/models/checklist/pdf/history_spec.rb index 722dbc4f56..f01709fc80 100644 --- a/spec/models/checklist/pdf/history_spec.rb +++ b/spec/models/checklist/pdf/history_spec.rb @@ -36,7 +36,7 @@ } subject { Checklist::Pdf::History.new(:scientific_name => tc.full_name, :show_english => true) } specify { - subject.higher_taxon_name(tc.reload).should == "\\subsection*{FOOBARIDAE (E) Foobars }\n" + expect(subject.higher_taxon_name(tc.reload)).to eq("\\subsection*{FOOBARIDAE (E) Foobars }\n") } end end @@ -54,7 +54,7 @@ } subject { Checklist::Pdf::History.new(:scientific_name => tc.full_name) } specify { - subject.listed_taxon_name(tc).should == 'FOOBARIDAE spp.' + expect(subject.listed_taxon_name(tc)).to eq('FOOBARIDAE spp.') } end context "when genus" do @@ -69,7 +69,7 @@ } subject { Checklist::Pdf::History.new(:scientific_name => tc.full_name) } specify { - subject.listed_taxon_name(tc).should == '\emph{Foobarus} spp.' + expect(subject.listed_taxon_name(tc)).to eq('\emph{Foobarus} spp.') } end end @@ -97,7 +97,7 @@ } subject { Checklist::Pdf::History.new({}) } specify { - subject.annotation_for_language(lc, 'en').should == "Except \\textit{Foobarus cracoviensis}\n\nPreviously listed as \\textit{Foobarus polonicus}.\\footnote{...}" + expect(subject.annotation_for_language(lc, 'en')).to eq("Except \\textit{Foobarus cracoviensis}\n\nPreviously listed as \\textit{Foobarus polonicus}.\\footnote{...}") } end end diff --git a/spec/models/checklist/pdf/index_annotations_key_spec.rb b/spec/models/checklist/pdf/index_annotations_key_spec.rb index d1cbe83d79..c91a65e21e 100644 --- a/spec/models/checklist/pdf/index_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/index_annotations_key_spec.rb @@ -8,7 +8,7 @@ specify { allow(subject).to receive(:non_hash_annotations_key).and_return('x') allow(subject).to receive(:hash_annotations_key).and_return('x') - subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in" + expect(subject.annotations_key).to eq("\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in") } end @@ -44,7 +44,7 @@ end subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - subject.hash_annotations_key.should == "\\newpage\n\\section*{\\hashAnnotations}\n\\hashAnnotationsIndexInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n" + expect(subject.hash_annotations_key).to eq("\\newpage\n\\section*{\\hashAnnotations}\n\\hashAnnotationsIndexInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n") } end @@ -101,7 +101,7 @@ subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { allow(LatexToPdf).to receive(:html2latex).and_return('x') - subject.non_hash_annotations_key.should == "\\section*{\\nonHashAnnotations}\n\\cfbox{orange}{\\superscript{1} \\textbf{\\textit{Foobarus bizarrus}}}\n\nx\n\n\\cfbox{green}{\\superscript{2} \\textbf{\\textit{Foobaria curiosa}}}\n\nx\n\n" + expect(subject.non_hash_annotations_key).to eq("\\section*{\\nonHashAnnotations}\n\\cfbox{orange}{\\superscript{1} \\textbf{\\textit{Foobarus bizarrus}}}\n\nx\n\n\\cfbox{green}{\\superscript{2} \\textbf{\\textit{Foobaria curiosa}}}\n\nx\n\n") } end diff --git a/spec/models/checklist/pdf/index_fetcher_spec.rb b/spec/models/checklist/pdf/index_fetcher_spec.rb index df4833250c..d6258bf718 100644 --- a/spec/models/checklist/pdf/index_fetcher_spec.rb +++ b/spec/models/checklist/pdf/index_fetcher_spec.rb @@ -46,7 +46,7 @@ ) } subject { Checklist::Pdf::IndexFetcher.new(query) } - specify { subject.next.first.sort_name.should == 'lolcat, Domestic' } + specify { expect(subject.next.first.sort_name).to eq('lolcat, Domestic') } end context "with synonyms and authors" do let!(:synonym) { @@ -74,6 +74,6 @@ ) } subject { Checklist::Pdf::IndexFetcher.new(query) } - specify { subject.next.first.sort_name.should == 'Catus fluffianus' } + specify { expect(subject.next.first.sort_name).to eq('Catus fluffianus') } end end diff --git a/spec/models/checklist/scientific_name_spec.rb b/spec/models/checklist/scientific_name_spec.rb index 74f9fdb851..bfa453bbe9 100644 --- a/spec/models/checklist/scientific_name_spec.rb +++ b/spec/models/checklist/scientific_name_spec.rb @@ -13,8 +13,8 @@ checklist.results } specify { - subject.first.full_name.should == @species2.full_name - subject.size.should == 1 + expect(subject.first.full_name).to eq(@species2.full_name) + expect(subject.size).to eq(1) } end context "by common name" do @@ -26,8 +26,8 @@ checklist.results } specify { - subject.first.full_name.should == @species2.full_name - subject.size.should == 1 + expect(subject.first.full_name).to eq(@species2.full_name) + expect(subject.size).to eq(1) } end end diff --git a/spec/models/checklist/synonyms_spec.rb b/spec/models/checklist/synonyms_spec.rb index ab166566db..efb2eb3642 100644 --- a/spec/models/checklist/synonyms_spec.rb +++ b/spec/models/checklist/synonyms_spec.rb @@ -14,7 +14,7 @@ it "should return Alligator cynocephalus as synonym for Caiman latirostris" do @caiman_latirostris = @taxon_concepts.select { |e| e.full_name == @species.full_name }.first - @caiman_latirostris.synonyms.should == ['Alligator cynocephalus'] + expect(@caiman_latirostris.synonyms).to eq(['Alligator cynocephalus']) end end diff --git a/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb b/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb index 5c0a26aa08..21bb9ee482 100644 --- a/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb +++ b/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb @@ -10,7 +10,7 @@ :ranks => [] }) } - specify { subject.results.size.should == 3 } + specify { expect(subject.results.size).to eq(3) } end context "when match on accepted name" do subject { @@ -19,7 +19,7 @@ :ranks => [] }) } - specify { subject.results.size.should == 3 } + specify { expect(subject.results.size).to eq(3) } end context "when match on synonym" do subject { @@ -28,7 +28,7 @@ :ranks => [] }) } - specify { subject.results.size.should == 2 } + specify { expect(subject.results.size).to eq(2) } end context "when match on common name" do subject { @@ -37,7 +37,7 @@ :ranks => [] }) } - specify { subject.results.size.should == 1 } + specify { expect(subject.results.size).to eq(1) } end end end diff --git a/spec/models/checklist/timeline_spec.rb b/spec/models/checklist/timeline_spec.rb index 8e2d1e1af0..29fce8fd95 100644 --- a/spec/models/checklist/timeline_spec.rb +++ b/spec/models/checklist/timeline_spec.rb @@ -20,9 +20,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.first } - specify { subject.timeline_intervals.count.should == 1 } - specify { subject.timeline_intervals.last.end_pos.should < 1 } - specify { subject.timeline_events.count.should == 2 } + specify { expect(subject.timeline_intervals.count).to eq(1) } + specify { expect(subject.timeline_intervals.last.end_pos).to be < 1 } + specify { expect(subject.timeline_events.count).to eq(2) } end context "when deleted from III multiple times" do @@ -80,9 +80,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.last } - specify { subject.timeline_intervals.count.should == 3 } - specify { subject.timeline_intervals.last.end_pos.should < 1 } - specify { subject.timeline_events.count.should == 4 } + specify { expect(subject.timeline_intervals.count).to eq(3) } + specify { expect(subject.timeline_intervals.last.end_pos).to be < 1 } + specify { expect(subject.timeline_events.count).to eq(4) } end context "when deleted and then readded" do @@ -109,9 +109,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.first } - specify { subject.timeline_intervals.count.should == 2 } - specify { subject.timeline_events.count.should == 3 } - specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_intervals[1].start_pos } + specify { expect(subject.timeline_intervals.count).to eq(2) } + specify { expect(subject.timeline_events.count).to eq(3) } + specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_intervals[1].start_pos) } end context "when reservation withdrawn" do @@ -151,9 +151,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.first.timelines.first } - specify { subject.timeline_intervals.count.should == 1 } - specify { subject.timeline_events.count.should == 2 } - specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_events[1].pos } + specify { expect(subject.timeline_intervals.count).to eq(1) } + specify { expect(subject.timeline_events.count).to eq(2) } + specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_events[1].pos) } end context "when reservation withdrawn and then readded" do @@ -199,10 +199,10 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.last.timelines.first } - specify { subject.timeline_intervals.count.should == 2 } - specify { subject.timeline_events.count.should == 3 } - specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_events[1].pos } - specify { subject.timeline_intervals[1].end_pos.should == 1 } + specify { expect(subject.timeline_intervals.count).to eq(2) } + specify { expect(subject.timeline_events.count).to eq(3) } + specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_events[1].pos) } + specify { expect(subject.timeline_intervals[1].end_pos).to eq(1) } end context "when added multiple times" do @@ -225,11 +225,12 @@ let(:subject) { ttc.timelines.first } specify { - subject.timeline_events.map(&:change_type_name).should == + expect(subject.timeline_events.map(&:change_type_name)).to eq( ['ADDITION', 'AMENDMENT'] + ) } - specify { subject.timeline_intervals.count.should == 2 } - specify { subject.timeline_intervals[1].end_pos.should == 1 } + specify { expect(subject.timeline_intervals.count).to eq(2) } + specify { expect(subject.timeline_intervals[1].end_pos).to eq(1) } end context "when automatic deletion from ancestor listing" do @@ -254,11 +255,12 @@ let(:subject) { ttc.timelines.first } specify { - subject.timeline_events.map(&:change_type_name).should == + expect(subject.timeline_events.map(&:change_type_name)).to eq( ['ADDITION', 'DELETION'] + ) } - specify { subject.timeline_intervals.count.should == 1 } - specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_events[1].pos } + specify { expect(subject.timeline_intervals.count).to eq(1) } + specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_events[1].pos) } end end diff --git a/spec/models/checklist/timelines_for_taxon_concept_spec.rb b/spec/models/checklist/timelines_for_taxon_concept_spec.rb index dee5ddb570..1234af3c6e 100644 --- a/spec/models/checklist/timelines_for_taxon_concept_spec.rb +++ b/spec/models/checklist/timelines_for_taxon_concept_spec.rb @@ -22,8 +22,8 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc) } - specify { subject.raw_timelines['I'].timeline_events.should_not be_empty } - specify { subject.raw_timelines['II'].timeline_events.should be_empty } + specify { expect(subject.raw_timelines['I'].timeline_events).not_to be_empty } + specify { expect(subject.raw_timelines['II'].timeline_events).to be_empty } end context "when Appendix III" do let(:tc) { @@ -43,8 +43,8 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc) } - specify { subject.raw_timelines['III'].timeline_events.should_not be_empty } - specify { subject.raw_timelines['I'].timeline_events.should be_empty } + specify { expect(subject.raw_timelines['III'].timeline_events).not_to be_empty } + specify { expect(subject.raw_timelines['I'].timeline_events).to be_empty } end context "when Appendix III reservation" do let(:tc) { @@ -64,9 +64,9 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc) } - specify { subject.raw_timelines['III'].timeline_events.should be_empty } - specify { subject.raw_timelines['III'].timelines.first.timeline_events.should_not be_empty } - specify { subject.raw_timelines['I'].timeline_events.should be_empty } + specify { expect(subject.raw_timelines['III'].timeline_events).to be_empty } + specify { expect(subject.raw_timelines['III'].timelines.first.timeline_events).not_to be_empty } + specify { expect(subject.raw_timelines['I'].timeline_events).to be_empty } end end @@ -78,9 +78,9 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc).timeline_years } - specify { subject.size.should == 5 } - specify { subject.first.year.should == 1975 } - specify { subject.last.year.should == 1995 } + specify { expect(subject.size).to eq(5) } + specify { expect(subject.first.year).to eq(1975) } + specify { expect(subject.last.year).to eq(1995) } end end diff --git a/spec/models/cites_cop_spec.rb b/spec/models/cites_cop_spec.rb index f0c10f5a36..268330a4ec 100644 --- a/spec/models/cites_cop_spec.rb +++ b/spec/models/cites_cop_spec.rb @@ -34,8 +34,8 @@ :designation => eu ) } - specify { cites_cop.should be_invalid } - specify { cites_cop.should have(1).error_on(:designation_id) } + specify { expect(cites_cop).to be_invalid } + specify { expect(cites_cop).to have(1).error_on(:designation_id) } end context "when effective_at is blank" do let(:cites_cop) { @@ -44,20 +44,20 @@ :effective_at => nil ) } - specify { cites_cop.should be_invalid } - specify { cites_cop.should have(1).error_on(:effective_at) } + specify { expect(cites_cop).to be_invalid } + specify { expect(cites_cop).to have(1).error_on(:effective_at) } end end describe :destroy do let(:cites_cop) { create_cites_cop } context "when no dependent objects attached" do - specify { cites_cop.destroy.should be_truthy } + specify { expect(cites_cop.destroy).to be_truthy } end context "when dependent objects attached" do context "when listing changes" do let!(:listing_change) { create_cites_I_addition(:event => cites_cop) } - specify { cites_cop.destroy.should be_falsey } + specify { expect(cites_cop.destroy).to be_falsey } end end end diff --git a/spec/models/cites_suspension_notification_spec.rb b/spec/models/cites_suspension_notification_spec.rb index 6b39650c88..ad0720ead7 100644 --- a/spec/models/cites_suspension_notification_spec.rb +++ b/spec/models/cites_suspension_notification_spec.rb @@ -34,8 +34,8 @@ :designation => eu ) } - specify { cites_suspension_notification.should be_invalid } - specify { cites_suspension_notification.should have(1).error_on(:designation_id) } + specify { expect(cites_suspension_notification).to be_invalid } + specify { expect(cites_suspension_notification).to have(1).error_on(:designation_id) } end context "when effective_at is blank" do let(:cites_suspension_notification) { @@ -44,15 +44,15 @@ :effective_at => nil ) } - specify { cites_suspension_notification.should be_invalid } - specify { cites_suspension_notification.should have(1).error_on(:effective_at) } + specify { expect(cites_suspension_notification).to be_invalid } + specify { expect(cites_suspension_notification).to have(1).error_on(:effective_at) } end end describe :destroy do let(:cites_suspension_notification) { create_cites_suspension_notification } context "when no dependent objects attached" do - specify { cites_suspension_notification.destroy.should be_truthy } + specify { expect(cites_suspension_notification.destroy).to be_truthy } end context "when dependent objects attached" do context "when start notification" do @@ -61,7 +61,7 @@ :cites_suspension, :start_notification => cites_suspension_notification ) } - specify { cites_suspension_notification.destroy.should be_falsey } + specify { expect(cites_suspension_notification.destroy).to be_falsey } end context "when end notification" do let!(:cites_suspension) { @@ -71,7 +71,7 @@ :end_notification => cites_suspension_notification ) } - specify { cites_suspension_notification.destroy.should be_falsey } + specify { expect(cites_suspension_notification.destroy).to be_falsey } end context "when confirmation notification, make sure it gets destroyed" do let!(:cites_suspension) { @@ -95,7 +95,7 @@ subject { cites_suspension_notification.cites_suspension_confirmations } specify { cites_suspension_notification.destroy - subject.reload.should be_empty + expect(subject.reload).to be_empty } end end @@ -103,7 +103,7 @@ describe :end_date_formatted do let(:cites_suspension_notification) { create_cites_suspension_notification(:end_date => '2012-05-10') } - specify { cites_suspension_notification.end_date_formatted.should == '10/05/2012' } + specify { expect(cites_suspension_notification.end_date_formatted).to eq('10/05/2012') } end describe :bases_for_suspension do diff --git a/spec/models/cites_suspension_spec.rb b/spec/models/cites_suspension_spec.rb index 1708bef946..15c877da2c 100644 --- a/spec/models/cites_suspension_spec.rb +++ b/spec/models/cites_suspension_spec.rb @@ -207,8 +207,8 @@ ) } - specify { cites_suspension.should be_invalid } - specify { cites_suspension.should have(1).error_on(:start_notification_id) } + specify { expect(cites_suspension).to be_invalid } + specify { expect(cites_suspension.error_on(:start_notification_id).size).to eq(1) } end context "when start date greater than end date" do @@ -221,8 +221,8 @@ ) } - specify { cites_suspension.should be_invalid } - specify { cites_suspension.should have(1).error_on(:start_date) } + specify { expect(cites_suspension).to be_invalid } + specify { expect(cites_suspension.error_on(:start_date).size).to eq(1) } end context "when valid" do @@ -234,7 +234,7 @@ ) } - specify { cites_suspension.should be_valid } + specify { expect(cites_suspension).to be_valid } end end end @@ -252,7 +252,7 @@ CitesSuspension.export('set' => 'current') end subject { Dir["#{DownloadsCache.cites_suspensions_path}/*"] } - specify { subject.should_not be_empty } + specify { expect(subject).not_to be_empty } end end @@ -271,7 +271,7 @@ CitesSuspension.export('set' => 'current') end subject { Dir["#{DownloadsCache.cites_suspensions_path}/*"] } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end end diff --git a/spec/models/common_name_spec.rb b/spec/models/common_name_spec.rb index 90d06c118d..ad5e3d6835 100644 --- a/spec/models/common_name_spec.rb +++ b/spec/models/common_name_spec.rb @@ -17,13 +17,13 @@ context "Generating PDF" do describe :english_to_pdf do it "should print last word before the first word, separated by comma" do - CommonName.english_to_pdf("Grey Wolf").should == "Wolf, Grey" + expect(CommonName.english_to_pdf("Grey Wolf")).to eq("Wolf, Grey") end it "should print the last word before the other words, separated by comma" do - CommonName.english_to_pdf("Northern Rock Mountain Wolf").should == "Wolf, Northern Rock Mountain" + expect(CommonName.english_to_pdf("Northern Rock Mountain Wolf")).to eq("Wolf, Northern Rock Mountain") end it "should print the single word, if the common name is composed of only one word" do - CommonName.english_to_pdf("Wolf").should == "Wolf" + expect(CommonName.english_to_pdf("Wolf")).to eq("Wolf") end end end diff --git a/spec/models/dashboard_stats_species_spec.rb b/spec/models/dashboard_stats_species_spec.rb index a9f839d3dd..d6f3efea87 100644 --- a/spec/models/dashboard_stats_species_spec.rb +++ b/spec/models/dashboard_stats_species_spec.rb @@ -26,17 +26,17 @@ describe "#new" do it "takes three parameters and returns a DashboardStats object" do - ds_ar.should be_an_instance_of DashboardStats + expect(ds_ar).to be_an_instance_of DashboardStats end end describe "#species" do include_context "Caiman latirostris" it "has one results for argentina" do - ds_ar.species[:cites_eu][0][:count].should eq 1 + expect(ds_ar.species[:cites_eu][0][:count]).to eq 1 end it "has no results for ghana" do - ds_gh.species[:cites_eu][0][:count].should eq 0 + expect(ds_gh.species[:cites_eu][0][:count]).to eq 0 end end diff --git a/spec/models/dashboard_stats_trade_spec.rb b/spec/models/dashboard_stats_trade_spec.rb index 7deec6b0a4..71e25e1eff 100644 --- a/spec/models/dashboard_stats_trade_spec.rb +++ b/spec/models/dashboard_stats_trade_spec.rb @@ -44,9 +44,9 @@ }).trade } it "argentina should have 40 exported animals and no imports" do - subject[:exports][:top_traded].length.should == 1 - subject[:exports][:top_traded][0][:count].should eq 40 - subject[:imports][:top_traded].length.should eq 0 + expect(subject[:exports][:top_traded].length).to eq(1) + expect(subject[:exports][:top_traded][0][:count]).to eq 40 + expect(subject[:imports][:top_traded].length).to eq 0 end end context "when time range specified" do @@ -58,7 +58,7 @@ }).trade } it "argentina should have no exports in 2012-2012" do - subject[:exports][:top_traded].length.should == 0 + expect(subject[:exports][:top_traded].length).to eq(0) end end end diff --git a/spec/models/designation_spec.rb b/spec/models/designation_spec.rb index c487750f2e..2c881229e7 100644 --- a/spec/models/designation_spec.rb +++ b/spec/models/designation_spec.rb @@ -15,60 +15,60 @@ describe :create do context "when valid" do let(:designation) { build(:designation, :name => 'GALACTIC REGULATIONS') } - specify { designation.should be_valid } + specify { expect(designation).to be_valid } end context "when name missing" do let(:designation) { build(:designation, :name => nil) } - specify { designation.should be_invalid } - specify { designation.should have(1).error_on(:name) } + specify { expect(designation).to be_invalid } + specify { expect(designation).to have(1).error_on(:name) } end context "when name duplicated" do let!(:designation1) { create(:designation) } let(:designation2) { build(:designation, :name => designation1.name) } - specify { designation2.should be_invalid } - specify { designation2.should have(1).error_on(:name) } + specify { expect(designation2).to be_invalid } + specify { expect(designation2).to have(1).error_on(:name) } end end describe :update do context "when updating a non-protected name" do let(:designation) { create(:designation) } specify { - designation.update_attributes( + expect(designation.update_attributes( { :name => 'RULES OF INTERGALACTIC TRADE' } - ).should be_truthy + )).to be_truthy } end context "when updating a protected name" do specify { - cites.update_attributes( + expect(cites.update_attributes( { :name => 'RULES OF INTERGALACTIC TRADE' } - ).should be_falsey + )).to be_falsey } end context "when updating taxonomy with no dependent objects attached" do let(:designation) { create(:designation) } let(:taxonomy) { create(:taxonomy) } - specify { designation.update_attributes(:taxonomy_id => taxonomy.id).should be_truthy } + specify { expect(designation.update_attributes(:taxonomy_id => taxonomy.id)).to be_truthy } end context "when updating taxonomy with dependent objects attached" do let(:designation) { create(:designation) } let!(:change_type) { create(:change_type, :designation => designation) } let(:taxonomy) { create(:taxonomy) } - specify { designation.update_attributes(:taxonomy_id => taxonomy.id).should be_falsey } + specify { expect(designation.update_attributes(:taxonomy_id => taxonomy.id)).to be_falsey } end end describe :destroy do context "when no dependent objects attached" do let(:designation) { create(:designation, :name => 'GALACTIC REGULATIONS') } - specify { designation.destroy.should be_truthy } + specify { expect(designation.destroy).to be_truthy } end context "when dependent objects attached" do let(:designation) { create(:designation, :name => 'GALACTIC REGULATIONS') } let!(:change_type) { create(:change_type, :designation => designation) } - specify { designation.destroy.should be_falsey } + specify { expect(designation.destroy).to be_falsey } end context "when protected name" do - specify { cites.destroy.should be_falsey } + specify { expect(cites.destroy).to be_falsey } end end end diff --git a/spec/models/eu_decision_spec.rb b/spec/models/eu_decision_spec.rb index 3d8e7f4f0a..c4e642d55b 100644 --- a/spec/models/eu_decision_spec.rb +++ b/spec/models/eu_decision_spec.rb @@ -65,7 +65,7 @@ Species::EuDecisionsExport.new(set: 'current', decision_types: {}).export end subject { Dir["#{DownloadsCache.eu_decisions_path}/*"] } - specify { subject.should_not be_empty } + specify { expect(subject).not_to be_empty } end end @@ -74,7 +74,7 @@ let(:eu_decision) { build(:eu_decision, srg_history_id: nil, eu_decision_type_id: nil) } subject { eu_decision.save } - specify { subject.should be_falsey } + specify { expect(subject).to be_falsey } it 'should have an error message' do subject @@ -85,19 +85,19 @@ context 'Eu decision creates correctly if only Eu decision type is populated' do let(:eu_decision) { build(:eu_decision) } - specify { subject.should be_truthy } + specify { expect(subject).to be_truthy } end context 'Eu decision creates correctly if only SRG history is populated' do let(:eu_decision) { build(:eu_decision, eu_decision_type: nil, srg_history: create(:srg_history)) } - specify { subject.should be_truthy } + specify { expect(subject).to be_truthy } end context 'Eu decision creates correctly if both Eu decision type and SRG history are populated' do let(:eu_decision) { build(:eu_decision, srg_history: create(:srg_history)) } - specify { subject.should be_truthy } + specify { expect(subject).to be_truthy } end end @@ -111,7 +111,7 @@ Species::EuDecisionsExport.new(set: 'current', decision_types: {}).export end subject { Dir["#{DownloadsCache.eu_decisions_path}/*"] } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end end diff --git a/spec/models/eu_opinion_spec.rb b/spec/models/eu_opinion_spec.rb index 0252f1cbbb..52d277bf76 100644 --- a/spec/models/eu_opinion_spec.rb +++ b/spec/models/eu_opinion_spec.rb @@ -38,8 +38,8 @@ ) } - specify { eu_opinion.should be_invalid } - specify { eu_opinion.should have(1).error_on(:taxon_concept) } + specify { expect(eu_opinion).to be_invalid } + specify { expect(eu_opinion).to have(1).error_on(:taxon_concept) } end context "when geo_entity missing" do @@ -49,8 +49,8 @@ ) } - specify { eu_opinion.should be_invalid } - specify { eu_opinion.should have(1).error_on(:geo_entity) } + specify { expect(eu_opinion).to be_invalid } + specify { expect(eu_opinion.error_on(:geo_entity).size).to eq(1) } end context "when start_date missing" do @@ -58,8 +58,8 @@ build(:eu_opinion, start_date: nil) } - specify { eu_opinion.should be_invalid } - specify { eu_opinion.should have(1).error_on(:start_date) } + specify { expect(eu_opinion).to be_invalid } + specify { expect(eu_opinion.error_on(:start_date).size).to eq(1) } end context "when valid" do @@ -68,7 +68,7 @@ end let(:eu_opinion) { build(:eu_opinion, start_event: @eu_regulation) } - specify { eu_opinion.should be_valid } + specify { expect(eu_opinion).to be_valid } end end diff --git a/spec/models/eu_regulation_spec.rb b/spec/models/eu_regulation_spec.rb index 2089a212b8..c2333a351a 100644 --- a/spec/models/eu_regulation_spec.rb +++ b/spec/models/eu_regulation_spec.rb @@ -33,7 +33,7 @@ EventListingChangesCopyWorker.jobs.clear create_eu_regulation(:listing_changes_event_id => eu_regulation1.id) end - specify { EventListingChangesCopyWorker.jobs.size.should == 1 } + specify { expect(EventListingChangesCopyWorker.jobs.size).to eq(1) } end context "when designation invalid" do let(:eu_regulation) { @@ -42,8 +42,8 @@ :designation => cites ) } - specify { eu_regulation.should be_invalid } - specify { eu_regulation.should have(1).error_on(:designation_id) } + specify { expect(eu_regulation).to be_invalid } + specify { expect(eu_regulation).to have(1).error_on(:designation_id) } end context "when effective_at is blank" do let(:eu_regulation) { @@ -52,8 +52,8 @@ :effective_at => nil ) } - specify { eu_regulation.should be_invalid } - specify { eu_regulation.should have(1).error_on(:effective_at) } + specify { expect(eu_regulation).to be_invalid } + specify { expect(eu_regulation).to have(1).error_on(:effective_at) } end end describe :activate do @@ -62,8 +62,8 @@ EuRegulationActivationWorker.jobs.clear eu_regulation.activate! end - specify { eu_regulation.is_current.should be_truthy } - specify { EuRegulationActivationWorker.jobs.size.should == 1 } + specify { expect(eu_regulation.is_current).to be_truthy } + specify { expect(EuRegulationActivationWorker.jobs.size).to eq(1) } end describe :deactivate do @@ -72,19 +72,19 @@ EuRegulationActivationWorker.jobs.clear eu_regulation.deactivate! end - specify { eu_regulation.is_current.should be_falsey } - specify { EuRegulationActivationWorker.jobs.size.should == 1 } + specify { expect(eu_regulation.is_current).to be_falsey } + specify { expect(EuRegulationActivationWorker.jobs.size).to eq(1) } end describe :destroy do let(:eu_regulation) { create_eu_regulation } context "when no dependent objects attached" do - specify { eu_regulation.destroy.should be_truthy } + specify { expect(eu_regulation.destroy).to be_truthy } end context "when dependent objects attached" do context "when listing changes" do let!(:listing_change) { create_eu_A_addition(:event => eu_regulation) } - specify { eu_regulation.destroy.should be_truthy } + specify { expect(eu_regulation.destroy).to be_truthy } end end end diff --git a/spec/models/eu_suspension_spec.rb b/spec/models/eu_suspension_spec.rb index 16efb64833..cf276679cc 100644 --- a/spec/models/eu_suspension_spec.rb +++ b/spec/models/eu_suspension_spec.rb @@ -38,8 +38,8 @@ ) } - specify { eu_suspension.should be_invalid } - specify { eu_suspension.should have(1).error_on(:taxon_concept) } + specify { expect(eu_suspension).to be_invalid } + specify { expect(eu_suspension).to have(1).error_on(:taxon_concept) } end context "when geo_entity missing" do @@ -50,14 +50,14 @@ ) } - specify { eu_suspension.should be_invalid } - specify { eu_suspension.should have(1).error_on(:geo_entity) } + specify { expect(eu_suspension).to be_invalid } + specify { expect(eu_suspension.error_on(:geo_entity).size).to eq(1) } end context "when valid" do let(:eu_suspension) { build(:eu_suspension) } - specify { eu_suspension.should be_valid } + specify { expect(eu_suspension).to be_valid } end end @@ -67,7 +67,7 @@ create(:eu_suspension, start_event: nil, end_event: nil) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when start_event is set but date is in the future" do @@ -78,7 +78,7 @@ create(:eu_suspension, start_event: start_event, end_event: nil) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when start_event is set but is not current" do @@ -89,7 +89,7 @@ create(:eu_suspension, start_event: start_event, end_event: nil) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when start_event is set but date is in past or present" do @@ -107,8 +107,8 @@ create(:eu_suspension, start_event: start_event2, end_event: nil) } - specify { eu_suspension.is_current.should be_truthy } - specify { eu_suspension2.is_current.should be_truthy } + specify { expect(eu_suspension.is_current).to be_truthy } + specify { expect(eu_suspension2.is_current).to be_truthy } end context "when end_event is set, but no start_event is set" do @@ -119,7 +119,7 @@ create(:eu_suspension, start_event: nil, end_event: end_event) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when end_event is set, and start_event is set with date in future" do @@ -133,7 +133,7 @@ create(:eu_suspension, start_event: start_event, end_event: end_event) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when start_event is set, and end_event is set with date in the future" do @@ -147,7 +147,7 @@ create(:eu_suspension, start_event: start_event, end_event: end_event) } - specify { eu_suspension.is_current.should be_truthy } + specify { expect(eu_suspension.is_current).to be_truthy } end context "when start_event is set, and end_event is set with date in the past" do @@ -161,7 +161,7 @@ create(:eu_suspension, start_event: start_event, end_event: end_event) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end end @@ -170,7 +170,7 @@ let(:eu_suspension) { create(:eu_suspension, start_event: nil) } - specify { eu_suspension.start_date_formatted.should be_empty } + specify { expect(eu_suspension.start_date_formatted).to be_empty } end context "when there's start_event" do @@ -180,7 +180,7 @@ let(:start_event) { create(:event, effective_at: 2.day.ago) } - specify { eu_suspension.start_date_formatted.should == 2.day.ago.strftime("%d/%m/%Y") } + specify { expect(eu_suspension.start_date_formatted).to eq(2.day.ago.strftime("%d/%m/%Y")) } end end @@ -189,7 +189,7 @@ let(:eu_suspension) { create(:eu_suspension, end_event: nil) } - specify { eu_suspension.end_date_formatted.should be_empty } + specify { expect(eu_suspension.end_date_formatted).to be_empty } end context "when there's end_event" do @@ -199,7 +199,7 @@ let(:end_event) { create(:event, effective_at: 2.day.ago) } - specify { eu_suspension.end_date_formatted.should == 2.day.ago.strftime("%d/%m/%Y") } + specify { expect(eu_suspension.end_date_formatted).to eq(2.day.ago.strftime("%d/%m/%Y")) } end end end diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 38cb35a8a8..56b51ee31d 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -29,28 +29,28 @@ describe :create do context "when valid" do let(:event) { build(:event, :name => 'CoPX') } - specify { event.should be_valid } + specify { expect(event).to be_valid } end context "when name missing" do let(:event) { build(:event, :name => nil) } - specify { event.should be_invalid } - specify { event.should have(1).error_on(:name) } + specify { expect(event).to be_invalid } + specify { expect(event).to have(1).error_on(:name) } end context "when name duplicated" do let!(:event1) { create(:event) } let(:event2) { build(:event, :name => event1.name) } - specify { event2.should be_invalid } - specify { event2.should have(1).error_on(:name) } + specify { expect(event2).to be_invalid } + specify { expect(event2).to have(1).error_on(:name) } end context "when url invalid" do let(:event) { build(:event, :url => 'www.google.com') } - specify { event.should be_invalid } - specify { event.should have(1).error_on(:url) } + specify { expect(event).to be_invalid } + specify { expect(event).to have(1).error_on(:url) } end end describe :effective_at_formatted do let(:event) { create(:event, :effective_at => '2012-05-10') } - specify { event.effective_at_formatted.should == '10/05/2012' } + specify { expect(event.effective_at_formatted).to eq('10/05/2012') } end end diff --git a/spec/models/geo_entity_spec.rb b/spec/models/geo_entity_spec.rb index c46d596d9a..2b7621b964 100644 --- a/spec/models/geo_entity_spec.rb +++ b/spec/models/geo_entity_spec.rb @@ -61,31 +61,31 @@ ) } subject { GeoEntity.nodes_and_descendants([europe.id]) } - specify { subject.map(&:id).should include(europe.id, poland.id, wolin.id) } - specify { subject.size.should == 3 } + specify { expect(subject.map(&:id)).to include(europe.id, poland.id, wolin.id) } + specify { expect(subject.size).to eq(3) } end end describe :destroy do let(:geo_entity) { create(:geo_entity) } context "when no dependent objects attached" do - specify { geo_entity.destroy.should be_truthy } + specify { expect(geo_entity.destroy).to be_truthy } end context "when dependent objects attached" do context "when distributions" do before(:each) { create(:distribution, :geo_entity => geo_entity) } - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end context "when exported shipments" do before(:each) { create(:shipment, :exporter => geo_entity) } - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end context "when imported shipments" do before(:each) { create(:shipment, :importer => geo_entity) } - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end context "when originated shipments" do before(:each) { create(:shipment, :country_of_origin => geo_entity) } - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end context "when connected geo entities" do let(:child_geo_entity) { create(:geo_entity) } @@ -97,7 +97,7 @@ :related_geo_entity => child_geo_entity ) end - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end end end diff --git a/spec/models/html_to_latex_spec.rb b/spec/models/html_to_latex_spec.rb index 0ac8da7bd9..5595d79099 100644 --- a/spec/models/html_to_latex_spec.rb +++ b/spec/models/html_to_latex_spec.rb @@ -7,13 +7,13 @@ context "when tag closed" do let(:input_str) { "Text about Foobarus lolus and friends" } specify { - subject.should == "Text about \\textit{Foobarus lolus} and friends" + expect(subject).to eq("Text about \\textit{Foobarus lolus} and friends") } end context "when tag not closed" do let(:input_str) { "Text about Foobarus lolus and friends" } specify { - subject.should == "Text about \\textit{Foobarus lolus and friends}" + expect(subject).to eq("Text about \\textit{Foobarus lolus and friends}") } end end @@ -21,24 +21,24 @@ context "when tag closed" do let(:input_str) { "Text,

paragraph

and some more text" } specify { - subject.should == "Text, \\newline paragraph\\newline and some more text" + expect(subject).to eq("Text, \\newline paragraph\\newline and some more text") } end context "when tag not closed" do let(:input_str) { "Text,

paragraph and some more text" } specify { - subject.should == "Text, \\newline paragraph and some more text" + expect(subject).to eq("Text, \\newline paragraph and some more text") } end end context "when latex special characters" do context "within tags" do let(:input_str) { "Lolus & friends" } - specify { subject.should == "\\textbf{Lolus \\& friends}" } + specify { expect(subject).to eq("\\textbf{Lolus \\& friends}") } end context "outside of tags" do let(:input_str) { "Lolus & friends" } - specify { subject.should == "\\textbf{Lolus} \\& friends" } + specify { expect(subject).to eq("\\textbf{Lolus} \\& friends") } end end end diff --git a/spec/models/hybrid_relationship_spec.rb b/spec/models/hybrid_relationship_spec.rb index 34177dd663..9bf648bb22 100644 --- a/spec/models/hybrid_relationship_spec.rb +++ b/spec/models/hybrid_relationship_spec.rb @@ -52,15 +52,15 @@ } specify { hybrid_rel.save - tc.hybrids.map(&:full_name).should include('Lolcatus lolatus x lolcatus') + expect(tc.hybrids.map(&:full_name)).to include('Lolcatus lolatus x lolcatus') } specify { hybrid_rel.save another_hybrid_rel.save hybrid_rel.other_taxon_concept = another_hybrid hybrid_rel.save - tc.hybrids.map(&:full_name).should include('Lolcatus lolcatus x ?') - another_tc.hybrids.map(&:full_name).should include('Lolcatus lolatus x lolcatus') + expect(tc.hybrids.map(&:full_name)).to include('Lolcatus lolcatus x ?') + expect(another_tc.hybrids.map(&:full_name)).to include('Lolcatus lolatus x lolcatus') } end end diff --git a/spec/models/listing_change_spec.rb b/spec/models/listing_change_spec.rb index 475b741032..3c9b394bee 100644 --- a/spec/models/listing_change_spec.rb +++ b/spec/models/listing_change_spec.rb @@ -44,7 +44,7 @@ excluded_taxon_concepts_ids: "#{excluded_taxon_concept.id}" ) } - specify { listing_change.should be_valid } + specify { expect(listing_change).to be_valid } end context "inclusion taxon concept is lower rank" do let(:inclusion) { create_cites_eu_subspecies } @@ -56,7 +56,7 @@ inclusion_taxon_concept_id: inclusion.id ) } - specify { listing_change.should have(1).error_on(:inclusion_taxon_concept_id) } + specify { expect(listing_change.error_on(:inclusion_taxon_concept_id).size).to eq(1) } end context "species listing designation mismatch" do let(:designation1) { create(:designation) } @@ -68,7 +68,7 @@ :change_type => create(:change_type, :designation => designation2) ) } - specify { listing_change.should have(1).error_on(:species_listing_id) } + specify { expect(listing_change.error_on(:species_listing_id).size).to eq(1) } end context "event designation mismatch" do let(:designation1) { create(:designation) } @@ -80,13 +80,13 @@ :change_type => create(:change_type, :designation => designation2) ) } - specify { listing_change.should have(1).error_on(:event_id) } + specify { expect(listing_change.error_on(:event_id).size).to eq(1) } end end end describe :effective_at_formatted do let(:listing_change) { create_cites_I_addition(:effective_at => '2012-05-10') } - specify { listing_change.effective_at_formatted.should == '10/05/2012' } + specify { expect(listing_change.effective_at_formatted).to eq('10/05/2012') } end describe :duplicates do diff --git a/spec/models/nomenclature_change/lump_spec.rb b/spec/models/nomenclature_change/lump_spec.rb index 7f15942a8e..c256a9f92f 100644 --- a/spec/models/nomenclature_change/lump_spec.rb +++ b/spec/models/nomenclature_change/lump_spec.rb @@ -58,7 +58,7 @@ :inputs_attributes => { 0 => { :taxon_concept_id => create_cites_eu_subspecies.id } } ) } - specify { expect(lump).to have(1).errors_on(:inputs) } + specify { expect(lump.errors_on(:inputs).size).to eq(1) } end end end diff --git a/spec/models/nomenclature_change/output_spec.rb b/spec/models/nomenclature_change/output_spec.rb index 5a218ecc85..ebb6de305f 100644 --- a/spec/models/nomenclature_change/output_spec.rb +++ b/spec/models/nomenclature_change/output_spec.rb @@ -66,7 +66,7 @@ :new_name_status => 'A' ) } - specify { expect(output).to have(1).error_on(:new_parent_id) } + specify { expect(output.error_on(:new_parent_id).size).to eq(1) } end context "when taxon concept specified" do let(:tc) { create_cites_eu_species } diff --git a/spec/models/nomenclature_change/split_spec.rb b/spec/models/nomenclature_change/split_spec.rb index 81249a0cab..cc26a8908c 100644 --- a/spec/models/nomenclature_change/split_spec.rb +++ b/spec/models/nomenclature_change/split_spec.rb @@ -69,7 +69,7 @@ } ) } - specify { expect(split).to have(1).errors_on(:outputs) } + specify { expect(split.errors_on(:outputs).size).to eq(1) } end end end diff --git a/spec/models/nomenclature_change/status_to_accepted_spec.rb b/spec/models/nomenclature_change/status_to_accepted_spec.rb index 5f6c0c28de..f54b493877 100644 --- a/spec/models/nomenclature_change/status_to_accepted_spec.rb +++ b/spec/models/nomenclature_change/status_to_accepted_spec.rb @@ -47,7 +47,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change).to have(1).error_on(:primary_output) } + specify { expect(status_change.error_on(:primary_output).size).to eq(1) } end end context "when primary output has valid name status" do @@ -61,7 +61,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change).to have(0).errors_on(:primary_output) } + specify { expect(status_change.errors_on(:primary_output).size).to eq(0) } end end end diff --git a/spec/models/nomenclature_change/status_to_synonym_spec.rb b/spec/models/nomenclature_change/status_to_synonym_spec.rb index 560a317859..6166675cf4 100644 --- a/spec/models/nomenclature_change/status_to_synonym_spec.rb +++ b/spec/models/nomenclature_change/status_to_synonym_spec.rb @@ -47,7 +47,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change).to have(1).error_on(:primary_output) } + specify { expect(status_change.error_on(:primary_output).size).to eq(1) } end end context "when primary output has valid name status" do @@ -61,7 +61,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change).to have(0).errors_on(:primary_output) } + specify { expect(status_change.errors_on(:primary_output).size).to eq(0) } end end context "when required secondary output missing" do @@ -73,7 +73,7 @@ status: NomenclatureChange::StatusToSynonym::RELAY ) } - specify { expect(status_change).to have(1).error_on(:secondary_output) } + specify { expect(status_change.error_on(:secondary_output).size).to eq(1) } end context "when submitting" do let(:status_change) { @@ -83,7 +83,7 @@ status: NomenclatureChange::StatusToSynonym::SUBMITTED ) } - specify { expect(status_change).to have(1).error_on(:secondary_output) } + specify { expect(status_change.error_on(:secondary_output).size).to eq(1) } end end end diff --git a/spec/models/preset_tag_spec.rb b/spec/models/preset_tag_spec.rb index 15f521fba9..85dc246eef 100644 --- a/spec/models/preset_tag_spec.rb +++ b/spec/models/preset_tag_spec.rb @@ -15,17 +15,17 @@ describe :create do context "when valid" do let(:preset_tag) { build(:preset_tag, :name => 'Test Tag', :model => 'TaxonConcept') } - specify { preset_tag.should be_valid } + specify { expect(preset_tag).to be_valid } end context "when name missing" do let(:preset_tag) { build(:preset_tag, :name => nil, :model => 'TaxonConcept') } - specify { preset_tag.should be_invalid } - specify { preset_tag.should have(1).error_on(:name) } + specify { expect(preset_tag).to be_invalid } + specify { expect(preset_tag).to have(1).error_on(:name) } end context "when model (type) incorrect" do let(:preset_tag) { build(:preset_tag, :name => 'Test Tag', :model => 'Nope') } - specify { preset_tag.should be_invalid } - specify { preset_tag.should have(1).error_on(:model) } + specify { expect(preset_tag).to be_invalid } + specify { expect(preset_tag).to have(1).error_on(:model) } end end end diff --git a/spec/models/purpose_spec.rb b/spec/models/purpose_spec.rb index 21007403c5..2ffb2487e1 100644 --- a/spec/models/purpose_spec.rb +++ b/spec/models/purpose_spec.rb @@ -18,7 +18,7 @@ describe :destroy do context "when no dependent objects attached" do let(:purpose) { create(:purpose) } - specify { purpose.destroy.should be_truthy } + specify { expect(purpose.destroy).to be_truthy } end context "when dependent objects attached" do let(:purpose) { create(:purpose) } @@ -30,11 +30,11 @@ :start_notification_id => create_cites_suspension_notification.id ) } - specify { purpose.destroy.should be_falsey } + specify { expect(purpose.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :purpose => purpose) } - specify { purpose.destroy.should be_falsey } + specify { expect(purpose.destroy).to be_falsey } end end end diff --git a/spec/models/quota_spec.rb b/spec/models/quota_spec.rb index 3a9a42592a..25092b5a92 100644 --- a/spec/models/quota_spec.rb +++ b/spec/models/quota_spec.rb @@ -45,7 +45,7 @@ Quota.export('set' => 'current') end subject { Dir["#{DownloadsCache.quotas_path}/*"] } - specify { subject.should_not be_empty } + specify { expect(subject).not_to be_empty } end end @@ -59,7 +59,7 @@ Quota.export('set' => 'current') end subject { Dir["#{DownloadsCache.quotas_path}/*"] } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end end @@ -79,7 +79,7 @@ ) } - specify { quota.should be_valid } + specify { expect(quota).to be_valid } end context "when quota missing" do @@ -92,8 +92,8 @@ ) } - specify { quota1.should be_invalid } - specify { quota1.should have(2).error_on(:quota) } + specify { expect(quota1).to be_invalid } + specify { expect(quota1.error_on(:quota).size).to eq(2) } end context "when publication date missing" do @@ -106,8 +106,8 @@ ) } - specify { quota.should be_invalid } - specify { quota.should have(1).error_on(:publication_date) } + specify { expect(quota).to be_invalid } + specify { expect(quota.error_on(:publication_date).size).to eq(1) } end context "when start date greater than end date" do @@ -121,8 +121,8 @@ ) } - specify { quota.should be_invalid } - specify { quota.should have(1).error_on(:start_date) } + specify { expect(quota).to be_invalid } + specify { expect(quota.error_on(:start_date).size).to eq(1) } end pending "doesn't save a quota without a unit" do diff --git a/spec/models/rank_spec.rb b/spec/models/rank_spec.rb index 96a626d1d9..aaae38fe10 100644 --- a/spec/models/rank_spec.rb +++ b/spec/models/rank_spec.rb @@ -19,17 +19,17 @@ describe :parent_rank_lower_bound do context "obligatory rank" do let(:rank) { create(:rank, name: Rank::KINGDOM) } - specify { rank.parent_rank_lower_bound.should == '0' } + specify { expect(rank.parent_rank_lower_bound).to eq('0') } end context "optional rank" do let(:rank) { create(:rank, name: Rank::SUBFAMILY) } - specify { rank.parent_rank_lower_bound.should == '5' } + specify { expect(rank.parent_rank_lower_bound).to eq('5') } end end describe :create do context "when taxonomic position malformed" do let(:rank) { build(:rank, name: Rank::PHYLUM, taxonomic_position: '1.a.b') } - specify { rank.should have(1).error_on(:taxonomic_position) } + specify { expect(rank).to have(1).error_on(:taxonomic_position) } end end describe :destroy do @@ -39,30 +39,30 @@ r.update_attribute(:name, 'SUPER PHYLUM') r } - specify { rank.destroy.should be_truthy } + specify { expect(rank.destroy).to be_truthy } end context "when dependent objects attached" do let(:rank) { create(:rank, name: Rank::PHYLUM, taxonomic_position: '1.1') } let!(:taxon_concept) { create(:taxon_concept, :rank => rank) } - specify { rank.destroy.should be_falsey } + specify { expect(rank.destroy).to be_falsey } end context "when protected name" do let(:rank) { create(:rank, name: Rank::PHYLUM, taxonomic_position: '1.1') } - specify { rank.destroy.should be_falsey } + specify { expect(rank.destroy).to be_falsey } end end describe :in_range do context "when no bounds specified" do subject { Rank.in_range(nil, nil) } - specify { subject.should == Rank.dict } + specify { expect(subject).to eq(Rank.dict) } end context "when lower bound specified" do subject { Rank.in_range(Rank::CLASS, nil) } - specify { subject.should == [Rank::KINGDOM, Rank::PHYLUM, Rank::CLASS] } + specify { expect(subject).to eq([Rank::KINGDOM, Rank::PHYLUM, Rank::CLASS]) } end context "when lower and upper bound specified" do subject { Rank.in_range(Rank::GENUS, Rank::FAMILY) } - specify { subject.should == [Rank::FAMILY, Rank::SUBFAMILY, Rank::GENUS] } + specify { expect(subject).to eq([Rank::FAMILY, Rank::SUBFAMILY, Rank::GENUS]) } end end end diff --git a/spec/models/sapi/geoip_spec.rb b/spec/models/sapi/geoip_spec.rb index eed8843eae..ff9c1a7c44 100644 --- a/spec/models/sapi/geoip_spec.rb +++ b/spec/models/sapi/geoip_spec.rb @@ -12,6 +12,6 @@ } ) end - specify { subject.resolve('1.1.1.1')[:city].should == 'Bogotá' } + specify { expect(subject.resolve('1.1.1.1')[:city]).to eq('Bogotá') } end end diff --git a/spec/models/source_spec.rb b/spec/models/source_spec.rb index d8c2fa9fb8..d61341f3b8 100644 --- a/spec/models/source_spec.rb +++ b/spec/models/source_spec.rb @@ -18,7 +18,7 @@ describe :destroy do context "when no dependent objects attached" do let(:source) { create(:source) } - specify { source.destroy.should be_truthy } + specify { expect(source.destroy).to be_truthy } end context "when dependent objects attached" do let(:source) { create(:source) } @@ -30,16 +30,16 @@ :start_notification_id => create_cites_suspension_notification.id ) } - specify { source.destroy.should be_falsey } + specify { expect(source.destroy).to be_falsey } end context "when CITES quota" do let(:geo_entity) { create(:geo_entity) } let!(:quota) { create(:quota, :sources => [source], :geo_entity_id => geo_entity.id) } - specify { source.destroy.should be_falsey } + specify { expect(source.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :source => source) } - specify { source.destroy.should be_falsey } + specify { expect(source.destroy).to be_falsey } end end end diff --git a/spec/models/species/common_names_export_spec.rb b/spec/models/species/common_names_export_spec.rb index d9b4bf45fe..aacd4d6d86 100644 --- a/spec/models/species/common_names_export_spec.rb +++ b/spec/models/species/common_names_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::CommonNamesExport.new({}) } - specify { subject.path.should == "public/downloads/common_names/" } + specify { expect(subject.path).to eq("public/downloads/common_names/") } end describe :export do context "when no results" do subject { Species::CommonNamesExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -30,13 +30,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/documents_export_spec.rb b/spec/models/species/documents_export_spec.rb index e6fb2832c0..5330024e36 100644 --- a/spec/models/species/documents_export_spec.rb +++ b/spec/models/species/documents_export_spec.rb @@ -4,7 +4,7 @@ subject { Species::DocumentsExport.new({}) } - specify { subject.path.should == "public/downloads/documents/" } + specify { expect(subject.path).to eq("public/downloads/documents/") } end SPEC_DOCUMENTS_DOWNLOAD_PATH = "spec/public/downloads/documents" describe :export do @@ -25,7 +25,7 @@ Species::DocumentsExport.new({}) } specify "when file not cached it should not be generated" do - subject.export.should be_falsey + expect(subject.export).to be_falsey end end context "when results" do @@ -39,12 +39,12 @@ #} pending "when file not cached it should be generated" do subject.export - File.file?(subject.file_name).should be_truthy - File.size(subject.file_name).should be > 0 + expect(File.file?(subject.file_name)).to be_truthy + expect(File.size(subject.file_name)).to be > 0 end pending "when file cached it should not be generated" do FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export end end diff --git a/spec/models/species/hybrid_prefix_matcher_spec.rb b/spec/models/species/hybrid_prefix_matcher_spec.rb index bef84c75ca..d10de6e9bf 100644 --- a/spec/models/species/hybrid_prefix_matcher_spec.rb +++ b/spec/models/species/hybrid_prefix_matcher_spec.rb @@ -11,7 +11,7 @@ :visibility => :trade }) } - specify { subject.results.should include(@hybrid_ac) } + specify { expect(subject.results).to include(@hybrid_ac) } end context "when trade internal visibility" do subject { @@ -21,7 +21,7 @@ :visibility => :trade_internal }) } - specify { subject.results.should include(@hybrid_ac) } + specify { expect(subject.results).to include(@hybrid_ac) } end context "when speciesplus visibility" do subject { @@ -30,7 +30,7 @@ :ranks => [] }) } - specify { subject.results.should be_empty } + specify { expect(subject.results).to be_empty } end end end diff --git a/spec/models/species/invisible_subspecies_search_spec.rb b/spec/models/species/invisible_subspecies_search_spec.rb index 514d4dbcc0..a50144c26c 100644 --- a/spec/models/species/invisible_subspecies_search_spec.rb +++ b/spec/models/species/invisible_subspecies_search_spec.rb @@ -5,8 +5,8 @@ context "when searching by scientific name" do context "when subspecies never listed" do subject { Species::Search.new({ :taxon_concept_query => 'amazona festiva festiva' }).results } - specify { subject.should_not include(@subspecies2_2_2_1) } - specify { subject.should include(@species2_2_2) } + specify { expect(subject).not_to include(@subspecies2_2_2_1) } + specify { expect(subject).to include(@species2_2_2) } end end end diff --git a/spec/models/species/listings_export_spec.rb b/spec/models/species/listings_export_spec.rb index 6eb9c36866..abee7fe65e 100644 --- a/spec/models/species/listings_export_spec.rb +++ b/spec/models/species/listings_export_spec.rb @@ -7,7 +7,7 @@ :designation_id => cites.id }) } - specify { subject.path.should == "public/downloads/cites_listings/" } + specify { expect(subject.path).to eq("public/downloads/cites_listings/") } end describe :export do context "when no results" do @@ -18,7 +18,7 @@ :geo_entities_ids => [poland.id] }) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -40,13 +40,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end @@ -61,7 +61,7 @@ :species_listings_ids => [cites_I.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } context "when Poland" do subject { @@ -71,7 +71,7 @@ :geo_entities_ids => [poland.id] }) } - specify { subject.query.to_a.size.should == 0 } + specify { expect(subject.query.to_a.size).to eq(0) } end context "when Nepal" do @@ -82,7 +82,7 @@ :geo_entities_ids => [nepal.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end end context "when higher taxon ids" do @@ -92,7 +92,7 @@ :taxon_concepts_ids => [@family.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end context "when implicitly listed subspecies present" do before(:each) do @@ -107,7 +107,7 @@ :taxon_concepts_ids => [@family.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end end context "when EU" do @@ -118,7 +118,7 @@ :species_listings_ids => [eu_A.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } context "when Spain" do subject { @@ -128,7 +128,7 @@ :geo_entities_ids => [spain.id] }) } - specify { subject.query.to_a.size.should == 0 } + specify { expect(subject.query.to_a.size).to eq(0) } end context "when Nepal" do @@ -139,7 +139,7 @@ :geo_entities_ids => [nepal.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end end context "when higher taxon ids" do @@ -149,7 +149,7 @@ :taxon_concepts_ids => [@family.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end end end diff --git a/spec/models/species/orphaned_taxon_concepts_export_spec.rb b/spec/models/species/orphaned_taxon_concepts_export_spec.rb index 37c4350518..d5c8a0d506 100644 --- a/spec/models/species/orphaned_taxon_concepts_export_spec.rb +++ b/spec/models/species/orphaned_taxon_concepts_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::OrphanedTaxonConceptsExport.new({}) } - specify { subject.path.should == "public/downloads/orphaned_taxon_concepts/" } + specify { expect(subject.path).to eq("public/downloads/orphaned_taxon_concepts/") } end describe :export do context "when no results" do subject { Species::OrphanedTaxonConceptsExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -31,13 +31,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/search_spec.rb b/spec/models/species/search_spec.rb index df452c0921..4151626563 100644 --- a/spec/models/species/search_spec.rb +++ b/spec/models/species/search_spec.rb @@ -5,19 +5,19 @@ context "when searching by scientific name" do context "when regular query" do subject { Species::Search.new({ :taxon_concept_query => 'canis' }).results } - specify { subject.should include(@species) } + specify { expect(subject).to include(@species) } end context "when malicious query" do subject { Species::Search.new({ :taxon_concept_query => 'canis\'' }).results } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end context "when leading whitespace" do subject { Species::Search.new({ :taxon_concept_query => ' canis' }).results } - specify { subject.should include(@species) } + specify { expect(subject).to include(@species) } end context "when trailing whitespace" do subject { Species::Search.new({ :taxon_concept_query => 'canis ' }).results } - specify { subject.should include(@species) } + specify { expect(subject).to include(@species) } end end end diff --git a/spec/models/species/species_reference_output_spec.rb b/spec/models/species/species_reference_output_spec.rb index 57b7dd3da3..1b1a2b0ac5 100644 --- a/spec/models/species/species_reference_output_spec.rb +++ b/spec/models/species/species_reference_output_spec.rb @@ -4,14 +4,14 @@ subject { Species::SpeciesReferenceOutputExport.new({}) } - specify { subject.path.should == "public/downloads/species_reference_output/" } + specify { expect(subject.path).to eq("public/downloads/species_reference_output/") } end describe :export do context "when no results" do subject { Species::SpeciesReferenceOutputExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -30,13 +30,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/standard_reference_output_spec.rb b/spec/models/species/standard_reference_output_spec.rb index ee6eb97a40..7b5d4ef5ad 100644 --- a/spec/models/species/standard_reference_output_spec.rb +++ b/spec/models/species/standard_reference_output_spec.rb @@ -4,14 +4,14 @@ subject { Species::StandardReferenceOutputExport.new({}) } - specify { subject.path.should == "public/downloads/standard_reference_output/" } + specify { expect(subject.path).to eq("public/downloads/standard_reference_output/") } end describe :export do context "when no results" do subject { Species::StandardReferenceOutputExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -30,13 +30,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/synonyms_and_trade_names_export_spec.rb b/spec/models/species/synonyms_and_trade_names_export_spec.rb index bdf4e9d59e..9463b5a86e 100644 --- a/spec/models/species/synonyms_and_trade_names_export_spec.rb +++ b/spec/models/species/synonyms_and_trade_names_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::SynonymsAndTradeNamesExport.new({}) } - specify { subject.path.should == "public/downloads/synonyms_and_trade_names/" } + specify { expect(subject.path).to eq("public/downloads/synonyms_and_trade_names/") } end describe :export do context "when no results" do subject { Species::SynonymsAndTradeNamesExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -36,13 +36,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/taxon_concept_prefix_matcher_spec.rb b/spec/models/species/taxon_concept_prefix_matcher_spec.rb index 77070fb1ac..c7cc511398 100644 --- a/spec/models/species/taxon_concept_prefix_matcher_spec.rb +++ b/spec/models/species/taxon_concept_prefix_matcher_spec.rb @@ -11,7 +11,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when searching by hyphenated common name without hyphens" do subject { @@ -20,7 +20,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when searching by part of hyphenated common name" do subject { @@ -29,7 +29,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end end context "when searching by scientific name" do @@ -40,7 +40,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when malicious query" do subject { @@ -49,7 +49,7 @@ :ranks => [] }) } - specify { subject.results.should be_empty } + specify { expect(subject.results).to be_empty } end context "when leading whitespace" do subject { @@ -58,7 +58,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when trailing whitespace" do subject { @@ -67,7 +67,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when implicitly listed subspecies" do subject { @@ -76,7 +76,7 @@ :ranks => [] }) } - specify { subject.results.should_not include(@subspecies2_ac) } + specify { expect(subject.results).not_to include(@subspecies2_ac) } end context "when explicitly listed subspecies" do subject { @@ -85,7 +85,7 @@ :ranks => [] }) } - specify { subject.results.should include(@subspecies1_ac) } + specify { expect(subject.results).to include(@subspecies1_ac) } end context "when implicitly listed higher taxon (without an explicitly listed ancestor)" do subject { @@ -94,7 +94,7 @@ :ranks => [] }) } - specify { subject.results.should include(@order_ac) } + specify { expect(subject.results).to include(@order_ac) } end context "when explicitly listed higher taxon" do subject { @@ -103,7 +103,7 @@ :ranks => [] }) } - specify { subject.results.should include(@family_ac) } + specify { expect(subject.results).to include(@family_ac) } end # check ranks filtering context "when explicitly listed higher taxon but ranks expected FAMILY" do @@ -114,7 +114,7 @@ :visibility => :trade }) } - specify { subject.results.should include(@family_ac) } + specify { expect(subject.results).to include(@family_ac) } end context "when explicitly listed higher taxon but ranks expected SPECIES" do subject { @@ -124,7 +124,7 @@ :visibility => :trade }) } - specify { subject.results.should be_empty } + specify { expect(subject.results).to be_empty } end context "when searching for name that matches Species and Subspecies but ranks expected SUBSPECIES" do subject { @@ -135,8 +135,8 @@ }) } specify { - subject.results.should_not include(@species_ac) - subject.results.should include(@subspecies1_ac) + expect(subject.results).not_to include(@species_ac) + expect(subject.results).to include(@subspecies1_ac) } end end diff --git a/spec/models/species/taxon_concepts_export_spec.rb b/spec/models/species/taxon_concepts_export_spec.rb index 08ec901a37..e9d6bb7e5c 100644 --- a/spec/models/species/taxon_concepts_export_spec.rb +++ b/spec/models/species/taxon_concepts_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::TaxonConceptsNamesExport.new({}) } - specify { subject.path.should == "public/downloads/taxon_concepts_names/" } + specify { expect(subject.path).to eq("public/downloads/taxon_concepts_names/") } end describe :export do context "when no results" do subject { Species::TaxonConceptsNamesExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -30,13 +30,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/trade_name_prefix_matcher_spec.rb b/spec/models/species/trade_name_prefix_matcher_spec.rb index d3b6e8b598..509f0896da 100644 --- a/spec/models/species/trade_name_prefix_matcher_spec.rb +++ b/spec/models/species/trade_name_prefix_matcher_spec.rb @@ -36,7 +36,7 @@ :visibility => :trade }) } - specify { subject.results.should include(@status_N_species_ac) } + specify { expect(subject.results).to include(@status_N_species_ac) } end context "when trade internal visibility" do subject { @@ -46,7 +46,7 @@ :visibility => :trade_internal }) } - specify { subject.results.should include(@status_N_species_ac) } + specify { expect(subject.results).to include(@status_N_species_ac) } end context "when speciesplus visibility" do subject { @@ -55,7 +55,7 @@ :ranks => [] }) } - specify { subject.results.should_not include(@status_N_species_ac) } + specify { expect(subject.results).not_to include(@status_N_species_ac) } end end context "when searching for trade name" do @@ -67,8 +67,8 @@ :visibility => :trade }) } - specify { subject.results.should_not include(@trade_name_ac) } - specify { subject.results.should include(@accepted_name_ac) } + specify { expect(subject.results).not_to include(@trade_name_ac) } + specify { expect(subject.results).to include(@accepted_name_ac) } end context "when trade internal visibility" do subject { @@ -78,8 +78,8 @@ :visibility => :trade_internal }) } - specify { subject.results.should include(@trade_name_ac) } - specify { subject.results.should include(@accepted_name_ac) } + specify { expect(subject.results).to include(@trade_name_ac) } + specify { expect(subject.results).to include(@accepted_name_ac) } end context "when speciesplus visibility" do subject { @@ -88,8 +88,8 @@ :ranks => [] }) } - specify { subject.results.should_not include(@trade_name_ac) } - specify { subject.results.should include(@accepted_name_ac) } + specify { expect(subject.results).not_to include(@trade_name_ac) } + specify { expect(subject.results).to include(@accepted_name_ac) } end end end diff --git a/spec/models/species/visible_subspecies_search_spec.rb b/spec/models/species/visible_subspecies_search_spec.rb index 9e50bf9e3a..794f65a4c8 100644 --- a/spec/models/species/visible_subspecies_search_spec.rb +++ b/spec/models/species/visible_subspecies_search_spec.rb @@ -5,7 +5,7 @@ context "when searching by scientific name" do context "when subspecies previously listed " do subject { Species::Search.new({ :taxon_concept_query => 'canis lupus' }).results } - specify { subject.should include(@subspecies) } + specify { expect(subject).to include(@subspecies) } end end end diff --git a/spec/models/synonym_relationship_spec.rb b/spec/models/synonym_relationship_spec.rb index 8d4a5e8fff..82d4d1258b 100644 --- a/spec/models/synonym_relationship_spec.rb +++ b/spec/models/synonym_relationship_spec.rb @@ -51,15 +51,15 @@ } specify { synonymy_rel.save - tc.synonyms.map(&:full_name).should include('Lolcatus lolus') + expect(tc.synonyms.map(&:full_name)).to include('Lolcatus lolus') } specify { synonymy_rel.save another_synonymy_rel.save synonymy_rel.other_taxon_concept = another_synonym synonymy_rel.save - tc.synonyms.map(&:full_name).should include('Lolcatus lolatus') - another_tc.synonyms.map(&:full_name).should include('Lolcatus lolus') + expect(tc.synonyms.map(&:full_name)).to include('Lolcatus lolatus') + expect(another_tc.synonyms.map(&:full_name)).to include('Lolcatus lolus') } end end diff --git a/spec/models/taxon_common_spec.rb b/spec/models/taxon_common_spec.rb index 8ad96fce02..d4c42137cc 100644 --- a/spec/models/taxon_common_spec.rb +++ b/spec/models/taxon_common_spec.rb @@ -57,7 +57,7 @@ another_tc_common.save tc_common.name = "Black lolcat" tc_common.save - another_tc.common_names.map(&:name).should include('Lolcat') + expect(another_tc.common_names.map(&:name)).to include('Lolcat') } end end diff --git a/spec/models/taxon_concept/agalychnis_spec.rb b/spec/models/taxon_concept/agalychnis_spec.rb index 3c2919d2c8..b7fcd7731c 100644 --- a/spec/models/taxon_concept/agalychnis_spec.rb +++ b/spec/models/taxon_concept/agalychnis_spec.rb @@ -7,55 +7,55 @@ context "REFERENCES" do describe :cites_accepted do context "for class Amphibia" do - specify { @klass.cites_accepted.should be_truthy } + specify { expect(@klass.cites_accepted).to be_truthy } end context "for family Hylidae" do - specify { @family.cites_accepted.should be_truthy } + specify { expect(@family.cites_accepted).to be_truthy } end context "for genus Agalychnis" do - specify { @genus.cites_accepted.should == false } + specify { expect(@genus.cites_accepted).to eq(false) } end end describe :standard_taxon_concept_references do context "for class Amphibia" do - specify { @klass.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } + specify { expect(@klass.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } end context "for family Hylidae" do - specify { @family.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } + specify { expect(@family.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } end context "for genus Agalychnis" do - specify { @genus.taxon_concept.standard_taxon_concept_references.should be_empty } + specify { expect(@genus.taxon_concept.standard_taxon_concept_references).to be_empty } end end end context "LISTING" do describe :cites_listing do context "for genus Agalychnis" do - specify { @genus.cites_listing.should == 'II' } + specify { expect(@genus.cites_listing).to eq('II') } end end describe :eu_listing do context "for genus Agalychnis" do - specify { @genus.eu_listing.should == 'B' } + specify { expect(@genus.eu_listing).to eq('B') } end end describe :cites_listed do context "for family Hylidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Agalychnis" do - specify { @genus.cites_listed.should be_truthy } + specify { expect(@genus.cites_listed).to be_truthy } end end describe :eu_listed do context "for family Hylidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Agalychnis" do - specify { @genus.eu_listed.should be_truthy } + specify { expect(@genus.eu_listed).to be_truthy } end end diff --git a/spec/models/taxon_concept/agave_spec.rb b/spec/models/taxon_concept/agave_spec.rb index a9e918847c..0c062f103a 100644 --- a/spec/models/taxon_concept/agave_spec.rb +++ b/spec/models/taxon_concept/agave_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context 'for species Agave parviflora' do - specify { @species2.cites_listing.should == 'I' } + specify { expect(@species2.cites_listing).to eq('I') } end context 'for species Agave arizonica' do - specify { @species1.cites_listing.should == 'NC' } + specify { expect(@species1.cites_listing).to eq('NC') } end end describe :cites_listed do context "for species Agave parviflora" do - specify { @species2.cites_listed.should be_truthy } + specify { expect(@species2.cites_listed).to be_truthy } end context "for species Agave arizonica" do - specify { @species1.cites_listed.should be_nil } + specify { expect(@species1.cites_listed).to be_nil } end end describe :cites_show do context "for species Agave parviflora" do - specify { @species2.cites_show.should be_truthy } + specify { expect(@species2.cites_show).to be_truthy } end context "for species Agave arizonica" do - specify { @species1.cites_show.should be_falsey } + specify { expect(@species1.cites_show).to be_falsey } end end describe :eu_listing do context 'for species Agave parviflora' do - specify { @species2.eu_listing.should == 'A' } + specify { expect(@species2.eu_listing).to eq('A') } end context 'for species Agave arizonica' do - specify { @species1.eu_listing.should == 'NC' } + specify { expect(@species1.eu_listing).to eq('NC') } end end describe :eu_listed do context "for species Agave parviflora" do - specify { @species2.eu_listed.should be_truthy } + specify { expect(@species2.eu_listed).to be_truthy } end context "for species Agave arizonica" do - specify { @species1.eu_listed.should be_nil } + specify { expect(@species1.eu_listed).to be_nil } end end describe :eu_show do context "for species Agave parviflora" do - specify { @species2.eu_show.should be_truthy } + specify { expect(@species2.eu_show).to be_truthy } end context "for species Agave arizonica" do - specify { @species1.eu_show.should be_falsey } + specify { expect(@species1.eu_show).to be_falsey } end end diff --git a/spec/models/taxon_concept/ailuropoda_spec.rb b/spec/models/taxon_concept/ailuropoda_spec.rb index 29fba6f47d..61a1b5bc01 100644 --- a/spec/models/taxon_concept/ailuropoda_spec.rb +++ b/spec/models/taxon_concept/ailuropoda_spec.rb @@ -7,37 +7,37 @@ context "LISTING" do describe :cites_listing do context "for species Ailuropoda melanoleuca" do - specify { @species.cites_listing.should == 'I' } + specify { expect(@species.cites_listing).to eq('I') } end context "for genus level Ailuropoda" do - specify { @genus.cites_listing.should == 'I' } + specify { expect(@genus.cites_listing).to eq('I') } end end describe :eu_listing do context "for species Ailuropoda melanoleuca" do - specify { @species.eu_listing.should == 'A' } + specify { expect(@species.eu_listing).to eq('A') } end context "for genus level Ailuropoda" do - specify { @genus.eu_listing.should == 'A' } + specify { expect(@genus.eu_listing).to eq('A') } end end describe :cites_listed do context "for genus Ailuropoda" do - specify { @genus.cites_listed.should be_falsey } + specify { expect(@genus.cites_listed).to be_falsey } end context "for species Ailuropoda melanoleuca" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end end describe :eu_listed do context "for genus Ailuropoda" do - specify { @genus.eu_listed.should be_falsey } + specify { expect(@genus.eu_listed).to be_falsey } end context "for species Ailuropoda melanoleuca" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end diff --git a/spec/models/taxon_concept/arctocephalus_spec.rb b/spec/models/taxon_concept/arctocephalus_spec.rb index a807914721..332050df5d 100644 --- a/spec/models/taxon_concept/arctocephalus_spec.rb +++ b/spec/models/taxon_concept/arctocephalus_spec.rb @@ -7,37 +7,37 @@ context "LISTING" do describe :cites_listing do it "should be II at species level Arctocephalus australis" do - @species1.cites_listing.should == 'II' + expect(@species1.cites_listing).to eq('II') end it "should be I at species level Arctocephalus townsendi" do - @species2.cites_listing.should == 'I' + expect(@species2.cites_listing).to eq('I') end it "should be I/II at genus level Arctocephalus" do - @genus.cites_listing.should == 'I/II' + expect(@genus.cites_listing).to eq('I/II') end end describe :cites_listed do it "should be true for genus Arctocephalus" do - @genus.cites_listed.should be_truthy + expect(@genus.cites_listed).to be_truthy end it "should be true for species Arctocephalus townsendi" do - @species2.cites_listed.should be_truthy + expect(@species2.cites_listed).to be_truthy end it "should be false for species Arctocephalus australis (inclusion in higher taxa listing)" do - @species1.cites_listed.should == false + expect(@species1.cites_listed).to eq(false) end end describe :eu_listed do it "should be true for genus Arctocephalus" do - @genus.eu_listed.should be_truthy + expect(@genus.eu_listed).to be_truthy end it "should be true for species Arctocephalus townsendi" do - @species2.eu_listed.should be_truthy + expect(@species2.eu_listed).to be_truthy end it "should be false for species Arctocephalus australis (inclusion in higher taxa listing)" do - @species1.eu_listed.should == false + expect(@species1.eu_listed).to eq(false) end end diff --git a/spec/models/taxon_concept/boa_constrictor_spec.rb b/spec/models/taxon_concept/boa_constrictor_spec.rb index 8d1ba024e4..217c8d50b1 100644 --- a/spec/models/taxon_concept/boa_constrictor_spec.rb +++ b/spec/models/taxon_concept/boa_constrictor_spec.rb @@ -6,25 +6,25 @@ context "TAXONOMY" do describe :full_name do context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.full_name.should == 'Boa constrictor occidentalis' } + specify { expect(@subspecies1.full_name).to eq('Boa constrictor occidentalis') } end context "for species Boa constrictor" do - specify { @species.full_name.should == 'Boa constrictor' } + specify { expect(@species.full_name).to eq('Boa constrictor') } end context "for genus Boa" do - specify { @genus.full_name.should == 'Boa' } + specify { expect(@genus.full_name).to eq('Boa') } end end describe :ancestors do context "family" do - specify { @species.family_name.should == 'Boidae' } + specify { expect(@species.family_name).to eq('Boidae') } end context "order" do - specify { @species.order_name.should == 'Serpentes' } + specify { expect(@species.order_name).to eq('Serpentes') } end context "class" do - specify { @species.class_name.should == 'Reptilia' } + specify { expect(@species.class_name).to eq('Reptilia') } end end end @@ -32,127 +32,127 @@ context "LISTING" do describe :cites_listing do context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.cites_listing.should == 'I' } + specify { expect(@subspecies1.cites_listing).to eq('I') } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2.cites_listing.should == 'II' } + specify { expect(@subspecies2.cites_listing).to eq('II') } end context "for species Boa constrictor" do - specify { @species.cites_listing.should == 'I/II' } + specify { expect(@species.cites_listing).to eq('I/II') } end end describe :eu_listing do context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.eu_listing.should == 'A' } + specify { expect(@subspecies1.eu_listing).to eq('A') } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2.eu_listing.should == 'B' } + specify { expect(@subspecies2.eu_listing).to eq('B') } end context "for species Boa constrictor" do - specify { @species.eu_listing.should == 'A/B' } + specify { expect(@species.eu_listing).to eq('A/B') } end end describe :cites_listed do context "for family Boidae" do - specify { @family.cites_listed.should be_truthy } + specify { expect(@family.cites_listed).to be_truthy } end context "for genus Boa" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.cites_listed.should be_truthy } + specify { expect(@subspecies1.cites_listed).to be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2.cites_listed.should be_falsey } + specify { expect(@subspecies2.cites_listed).to be_falsey } end end describe :cites_show do context "for family Boidae" do - specify { @family.cites_show.should be_truthy } + specify { expect(@family.cites_show).to be_truthy } end context "for genus Boa" do - specify { @genus.cites_show.should be_truthy } + specify { expect(@genus.cites_show).to be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.cites_show.should be_truthy } + specify { expect(@subspecies1.cites_show).to be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2.cites_show.should be_falsey } + specify { expect(@subspecies2.cites_show).to be_falsey } end end describe :cites_listed_descendants do context "for family Boidae" do - specify { @family.cites_listed_descendants.should be_truthy } + specify { expect(@family.cites_listed_descendants).to be_truthy } end context "for genus Boa" do - specify { @genus.cites_listed_descendants.should be_truthy } + specify { expect(@genus.cites_listed_descendants).to be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species.cites_listed_descendants.should be_truthy } + specify { expect(@species.cites_listed_descendants).to be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.cites_listed_descendants.should be_falsey } + specify { expect(@subspecies1.cites_listed_descendants).to be_falsey } end end describe :eu_listed do context "for family Boidae" do - specify { @family.eu_listed.should be_truthy } + specify { expect(@family.eu_listed).to be_truthy } end context "for genus Boa" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.eu_listed.should be_truthy } + specify { expect(@subspecies1.eu_listed).to be_truthy } end end describe :show_in_species_plus_ac do context "for family Boidae" do - specify { @family_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@family_ac.show_in_species_plus_ac).to be_truthy } end context "for genus Boa" do - specify { @genus_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@genus_ac.show_in_species_plus_ac).to be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@species_ac.show_in_species_plus_ac).to be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies1_ac.show_in_species_plus_ac).to be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2_ac.show_in_species_plus_ac.should be_falsey } + specify { expect(@subspecies2_ac.show_in_species_plus_ac).to be_falsey } end end describe :show_in_checklist_ac do context "for family Boidae" do - specify { @family_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@family_ac.show_in_checklist_ac).to be_truthy } end context "for genus Boa" do - specify { @genus_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@genus_ac.show_in_checklist_ac).to be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@species_ac.show_in_checklist_ac).to be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@subspecies1_ac.show_in_checklist_ac).to be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2_ac.show_in_checklist_ac.should be_falsey } + specify { expect(@subspecies2_ac.show_in_checklist_ac).to be_falsey } end end diff --git a/spec/models/taxon_concept/caiman_latirostris_spec.rb b/spec/models/taxon_concept/caiman_latirostris_spec.rb index 08a15c1bed..330611fc76 100644 --- a/spec/models/taxon_concept/caiman_latirostris_spec.rb +++ b/spec/models/taxon_concept/caiman_latirostris_spec.rb @@ -7,12 +7,12 @@ context "TAXONOMY" do describe :full_name do context "for species synonym Alligator cynocephalus" do - specify { @species1.full_name.should == 'Alligator cynocephalus' } + specify { expect(@species1.full_name).to eq('Alligator cynocephalus') } end end describe :rank_name do context "for species synonym Alligator cynocephalus" do - specify { @species1.rank_name.should == Rank::SPECIES } + specify { expect(@species1.rank_name).to eq(Rank::SPECIES) } end end end @@ -20,88 +20,88 @@ context "REFERENCES" do describe :cites_accepted do context 'for species Caiman latirostris' do - specify { @species.cites_accepted.should be_truthy } + specify { expect(@species.cites_accepted).to be_truthy } end context "for synonym species Alligator cynocephalus" do - specify { @species1.cites_accepted.should == false } + specify { expect(@species1.cites_accepted).to eq(false) } end end describe :standard_taxon_concept_references do context 'for species Caiman latirostris' do - specify { @species.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } + specify { expect(@species.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } end end end context "LISTING" do describe :cites_listing do context 'for species Caiman latirostris' do - specify { @species.cites_listing.should == 'I/II' } + specify { expect(@species.cites_listing).to eq('I/II') } end end describe :eu_listing do context 'for species Caiman latirostris' do - specify { @species.eu_listing.should == 'A/B' } + specify { expect(@species.eu_listing).to eq('A/B') } end end describe :cites_listed do context 'for order Crocodylia' do - specify { @order.cites_listed.should be_truthy } + specify { expect(@order.cites_listed).to be_truthy } end context "for family Alligatoridae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Caiman" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Caiman latoristris" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end end describe :eu_listed do context 'for order Crocodylia' do - specify { @order.eu_listed.should be_truthy } + specify { expect(@order.eu_listed).to be_truthy } end context "for family Alligatoridae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Caiman" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Caiman latoristris" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end describe :cites_show do context "for order Crocodylia" do - specify { @order.cites_show.should be_truthy } + specify { expect(@order.cites_show).to be_truthy } end context "for family Alligatoridae" do - specify { @family.cites_show.should be_truthy } + specify { expect(@family.cites_show).to be_truthy } end context "for genus Caiman" do - specify { @genus.cites_show.should be_truthy } + specify { expect(@genus.cites_show).to be_truthy } end context "for species Caiman latoristris" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end context "for synonym species Alligator cynocephalus" do - specify { @species1.cites_show.should be_falsey } + specify { expect(@species1.cites_show).to be_falsey } end end describe :ann_symbol do context "for species Caiman latirostris" do - specify { @species.ann_symbol.should_not be_blank } + specify { expect(@species.ann_symbol).not_to be_blank } end end describe :hash_ann_symbol do context "for species Caiman latirostris" do - specify { @species.hash_ann_symbol.should be_blank } + specify { expect(@species.hash_ann_symbol).to be_blank } end end diff --git a/spec/models/taxon_concept/canis_lupus_spec.rb b/spec/models/taxon_concept/canis_lupus_spec.rb index 42ca0e59c8..1a40c03b8c 100644 --- a/spec/models/taxon_concept/canis_lupus_spec.rb +++ b/spec/models/taxon_concept/canis_lupus_spec.rb @@ -6,55 +6,55 @@ context "LISTING" do describe :cites_listing do context "for species Canis lupus (population split listing)" do - specify { @species.cites_listing.should == 'I/II' } + specify { expect(@species.cites_listing).to eq('I/II') } end end describe :eu_listing do context "for species Canis lupus (population split listing)" do - specify { @species.eu_listing.should == 'A/B' } + specify { expect(@species.eu_listing).to eq('A/B') } end end describe :cites_listed do context "for species Canis lupus" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { @subspecies.cites_listed.should be_blank } + specify { expect(@subspecies.cites_listed).to be_blank } end end describe :eu_listed do context "for species Canis lupus" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end describe :show_in_species_plus_ac do context "for species Canis lupus" do - specify { @species_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@species_ac.show_in_species_plus_ac).to be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { @subspecies_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies_ac.show_in_species_plus_ac).to be_truthy } end end describe :show_in_checklist_ac do context "for species Canis lupus" do - specify { @species_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@species_ac.show_in_checklist_ac).to be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { @subspecies_ac.show_in_checklist_ac.should be_falsey } + specify { expect(@subspecies_ac.show_in_checklist_ac).to be_falsey } end end describe :show_in_species_plus do context "for species Canis lupus" do - specify { @species.show_in_species_plus.should be_truthy } + specify { expect(@species.show_in_species_plus).to be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { @subspecies.show_in_species_plus.should be_truthy } + specify { expect(@subspecies.show_in_species_plus).to be_truthy } end end diff --git a/spec/models/taxon_concept/caretta_caretta_cms_spec.rb b/spec/models/taxon_concept/caretta_caretta_cms_spec.rb index 08a742787d..2e81a42e86 100644 --- a/spec/models/taxon_concept/caretta_caretta_cms_spec.rb +++ b/spec/models/taxon_concept/caretta_caretta_cms_spec.rb @@ -7,19 +7,19 @@ context "LISTING" do describe :cms_listing do context "for family Cheloniidae" do - specify { @family.cms_listing.should == 'I/II' } + specify { expect(@family.cms_listing).to eq('I/II') } end context "for species Caretta caretta" do - specify { @species.cms_listing.should == 'I/II' } + specify { expect(@species.cms_listing).to eq('I/II') } end end describe :cms_listed do context "for family Cheloniidae" do - specify { @family.cms_listed.should be_truthy } + specify { expect(@family.cms_listed).to be_truthy } end context "for species Caretta caretta" do - specify { @species.cms_listed.should be_truthy } + specify { expect(@species.cms_listed).to be_truthy } end end end @@ -28,12 +28,12 @@ describe :current_cms_additions do context "for family Cheloniidae" do specify { - @family.current_cms_additions.size.should == 1 + expect(@family.current_cms_additions.size).to eq(1) } end context "for species Caretta caretta" do specify { - @species.current_cms_additions.size.should == 2 + expect(@species.current_cms_additions.size).to eq(2) } end end diff --git a/spec/models/taxon_concept/cedrela_montana_spec.rb b/spec/models/taxon_concept/cedrela_montana_spec.rb index 97454159f6..9a51e135ca 100644 --- a/spec/models/taxon_concept/cedrela_montana_spec.rb +++ b/spec/models/taxon_concept/cedrela_montana_spec.rb @@ -7,37 +7,37 @@ context "LISTING" do describe :cites_listing do context 'for species Cedrela montana' do - specify { @species.cites_listing.should be_blank } + specify { expect(@species.cites_listing).to be_blank } end end describe :cites_listed do context "for species Cedrela montana" do - specify { @species.cites_listed.should be_nil } + specify { expect(@species.cites_listed).to be_nil } end end describe :cites_show do context "for species Cedrela montana" do - specify { @species.cites_show.should be_falsey } + specify { expect(@species.cites_show).to be_falsey } end end describe :eu_listing do context 'for species Cedrela montana' do - specify { @species.eu_listing.should == 'D' } + specify { expect(@species.eu_listing).to eq('D') } end end describe :eu_listed do context "for species Cedrela montana" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end describe :eu_show do context "for species Cedrela montana" do - specify { @species.eu_show.should be_truthy } + specify { expect(@species.eu_show).to be_truthy } end end diff --git a/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb b/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb index 1a80fcec4b..2812829f94 100644 --- a/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb +++ b/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb @@ -7,31 +7,31 @@ context "LISTING" do describe :cms_listing do context "for species Cervus elaphus" do - specify { @species.cms_listing.should == 'I/II' } + specify { expect(@species.cms_listing).to eq('I/II') } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.cms_listing.should == 'I/II' } + specify { expect(@subspecies1.cms_listing).to eq('I/II') } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.cms_listing.should == 'I/II' } + specify { expect(@subspecies2.cms_listing).to eq('I/II') } end end describe :show_in_species_plus_ac do context "for subspecies Cervus elaphus bactrianus (instrument)" do - specify { @subspecies1_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies1_ac.show_in_species_plus_ac).to be_truthy } end context "for subspecies Cervus elaphus barbarus (listing)" do - specify { @subspecies2_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies2_ac.show_in_species_plus_ac).to be_truthy } end end describe :show_in_species_plus do context "for subspecies Cervus elaphus bactrianus (instrument)" do - specify { @subspecies1.show_in_species_plus.should be_truthy } + specify { expect(@subspecies1.show_in_species_plus).to be_truthy } end context "for subspecies Cervus elaphus barbarus (listing)" do - specify { @subspecies2.show_in_species_plus.should be_truthy } + specify { expect(@subspecies2.show_in_species_plus).to be_truthy } end end diff --git a/spec/models/taxon_concept/cervus_elaphus_spec.rb b/spec/models/taxon_concept/cervus_elaphus_spec.rb index 88692a0672..4dca68a802 100644 --- a/spec/models/taxon_concept/cervus_elaphus_spec.rb +++ b/spec/models/taxon_concept/cervus_elaphus_spec.rb @@ -7,13 +7,13 @@ context "TAXONOMY" do describe :full_name do context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.full_name.should == 'Cervus elaphus bactrianus' } + specify { expect(@subspecies1.full_name).to eq('Cervus elaphus bactrianus') } end context "for species Cervus elaphus" do - specify { @species.full_name.should == 'Cervus elaphus' } + specify { expect(@species.full_name).to eq('Cervus elaphus') } end context "for genus Cervus" do - specify { @genus.full_name.should == 'Cervus' } + specify { expect(@genus.full_name).to eq('Cervus') } end end end @@ -21,100 +21,100 @@ context "LISTING" do describe :cites_listing do context "for species Cervus elaphus" do - specify { @species.cites_listing.should == 'I/II/III/NC' } + specify { expect(@species.cites_listing).to eq('I/II/III/NC') } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.cites_listing.should == 'II' } + specify { expect(@subspecies1.cites_listing).to eq('II') } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.cites_listing.should == 'III' } + specify { expect(@subspecies2.cites_listing).to eq('III') } end context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.cites_listing.should == 'I' } + specify { expect(@subspecies3.cites_listing).to eq('I') } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.cites_listing.should == 'NC' } + specify { expect(@subspecies4.cites_listing).to eq('NC') } end end describe :eu_listing do context "for species Cervus elaphus" do - specify { @species.eu_listing.should == 'A/B/C/NC' } + specify { expect(@species.eu_listing).to eq('A/B/C/NC') } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.eu_listing.should == 'B' } + specify { expect(@subspecies1.eu_listing).to eq('B') } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.eu_listing.should == 'C' } + specify { expect(@subspecies2.eu_listing).to eq('C') } end context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.eu_listing.should == 'A' } + specify { expect(@subspecies3.eu_listing).to eq('A') } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.eu_listing.should == 'NC' } + specify { expect(@subspecies4.eu_listing).to eq('NC') } end end describe :cites_listed do context "for order Artiodactyla" do - specify { @order.cites_listed.should == false } + specify { expect(@order.cites_listed).to eq(false) } end context "for family Cervidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Cervus" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Cervus elaphus" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.cites_listed.should be_truthy } + specify { expect(@subspecies1.cites_listed).to be_truthy } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.cites_listed.should be_truthy } + specify { expect(@subspecies2.cites_listed).to be_truthy } end context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.cites_listed.should be_truthy } + specify { expect(@subspecies3.cites_listed).to be_truthy } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.cites_listed.should be_blank } + specify { expect(@subspecies4.cites_listed).to be_blank } end end describe :eu_listed do context "for order Artiodactyla" do - specify { @order.eu_listed.should == false } + specify { expect(@order.eu_listed).to eq(false) } end context "for family Cervidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Cervus" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Cervus elaphus" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.eu_listed.should be_truthy } + specify { expect(@subspecies1.eu_listed).to be_truthy } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.eu_listed.should be_truthy } + specify { expect(@subspecies2.eu_listed).to be_truthy } end context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.eu_listed.should be_truthy } + specify { expect(@subspecies3.eu_listed).to be_truthy } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.eu_listed.should be_blank } + specify { expect(@subspecies4.eu_listed).to be_blank } end end describe :cites_show do context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.cites_show.should be_truthy } + specify { expect(@subspecies3.cites_show).to be_truthy } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.cites_show.should be_falsey } + specify { expect(@subspecies4.cites_show).to be_falsey } end end diff --git a/spec/models/taxon_concept/colophon_spec.rb b/spec/models/taxon_concept/colophon_spec.rb index 8d11ce398d..b77571f19d 100644 --- a/spec/models/taxon_concept/colophon_spec.rb +++ b/spec/models/taxon_concept/colophon_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context "for genus Colophon" do - specify { @genus.cites_listing.should == 'III' } + specify { expect(@genus.cites_listing).to eq('III') } end context "for species Colophon barnardi" do - specify { @species.cites_listing.should == 'III' } + specify { expect(@species.cites_listing).to eq('III') } end end describe :eu_listing do context "for genus Colophon" do - specify { @genus.eu_listing.should == 'C' } + specify { expect(@genus.eu_listing).to eq('C') } end context "for species Colophon barnardi" do - specify { @species.eu_listing.should == 'C' } + specify { expect(@species.eu_listing).to eq('C') } end end describe :cites_listed do context "for genus Colophon" do - specify { @genus.cites_listed.should == true } + specify { expect(@genus.cites_listed).to eq(true) } end context "for species Colophon barnardi" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end end describe :eu_listed do context "for genus Colophon" do - specify { @genus.eu_listed.should == true } + specify { expect(@genus.eu_listed).to eq(true) } end context "for species Colophon barnardi" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end end describe :cites_show do context "for order Coleoptera" do - specify { @order.cites_show.should be_falsey } + specify { expect(@order.cites_show).to be_falsey } end context "for family Lucanidae" do - specify { @family.cites_show.should be_falsey } + specify { expect(@family.cites_show).to be_falsey } end end describe :current_party_ids do context "for genus Colophon" do - specify { @genus.current_parties_ids.should == [GeoEntity.find_by_iso_code2('ZA').id] } + specify { expect(@genus.current_parties_ids).to eq([GeoEntity.find_by_iso_code2('ZA').id]) } end context "for species Colophon barnardi" do - specify { @species.current_parties_ids.should == [GeoEntity.find_by_iso_code2('ZA').id] } + specify { expect(@species.current_parties_ids).to eq([GeoEntity.find_by_iso_code2('ZA').id]) } end end diff --git a/spec/models/taxon_concept/dalbergia_spec.rb b/spec/models/taxon_concept/dalbergia_spec.rb index 74927a9c2d..8640fc958b 100644 --- a/spec/models/taxon_concept/dalbergia_spec.rb +++ b/spec/models/taxon_concept/dalbergia_spec.rb @@ -7,28 +7,28 @@ context "LISTING" do describe :cites_listing do context 'for species Dalbergia abbreviata' do - specify { @species1.cites_listing.should == 'NC' } + specify { expect(@species1.cites_listing).to eq('NC') } end context 'for species Dalbergia abrahamii' do - specify { @species2.cites_listing.should == 'II' } + specify { expect(@species2.cites_listing).to eq('II') } end end describe :cites_listed do context "for species Dalbergia abbreviata" do - specify { @species1.cites_listed.should be_nil } + specify { expect(@species1.cites_listed).to be_nil } end context "for species Dalbergia abrahamii" do - specify { @species2.cites_listed.should == false } + specify { expect(@species2.cites_listed).to eq(false) } end end describe :cites_show do context "for species Dalbergia abbreviata" do - specify { @species1.cites_show.should be_falsey } + specify { expect(@species1.cites_show).to be_falsey } end context "for species Dalbergia abrahamii" do - specify { @species2.cites_show.should be_truthy } + specify { expect(@species2.cites_show).to be_truthy } end end end diff --git a/spec/models/taxon_concept/destroy_spec.rb b/spec/models/taxon_concept/destroy_spec.rb index 87c9103adf..215de976f2 100644 --- a/spec/models/taxon_concept/destroy_spec.rb +++ b/spec/models/taxon_concept/destroy_spec.rb @@ -5,63 +5,63 @@ context "general" do before(:each) { @taxon_concept = create_cms_species } context "when no dependent objects attached" do - specify { @taxon_concept.destroy.should be_truthy } + specify { expect(@taxon_concept.destroy).to be_truthy } end context "when distributions" do before(:each) { create(:distribution, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_truthy } + specify { expect(@taxon_concept.destroy).to be_truthy } end context "when common names" do before(:each) { create(:taxon_common, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_truthy } + specify { expect(@taxon_concept.destroy).to be_truthy } end context "when references" do before(:each) { create(:taxon_concept_reference, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_truthy } + specify { expect(@taxon_concept.destroy).to be_truthy } end context "when document citations" do before(:each) do create(:document_citation_taxon_concept, taxon_concept: @taxon_concept) end - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end end context "CMS" do before(:each) { @taxon_concept = create_cms_species } context "when taxon instruments" do before(:each) { create(:taxon_instrument, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end end context "CITES / EU" do before(:each) { @taxon_concept = create_cites_eu_species } context "when listing changes" do before(:each) { create_cites_I_addition(:taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when CITES quotas" do before(:each) { create(:quota, :taxon_concept => @taxon_concept, :geo_entity => create(:geo_entity)) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when CITES suspensions" do before(:each) { create(:cites_suspension, :taxon_concept => @taxon_concept, :start_notification => create(:cites_suspension_notification, :designation => cites)) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when EU opinions" do before(:each) { create(:eu_opinion, :taxon_concept => @taxon_concept, start_event: create(:ec_srg)) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when EU suspensions" do before(:each) { create(:eu_suspension, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when reported shipments" do before(:each) { create(:shipment, :reported_taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end end end diff --git a/spec/models/taxon_concept/diospyros_spec.rb b/spec/models/taxon_concept/diospyros_spec.rb index d85c1ed0fc..1585b3acbf 100644 --- a/spec/models/taxon_concept/diospyros_spec.rb +++ b/spec/models/taxon_concept/diospyros_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context 'for species Diospyros aculeata' do - specify { @species1.cites_listing.should == 'II' } + specify { expect(@species1.cites_listing).to eq('II') } end context 'for species Diospyros acuta' do - specify { @species2.cites_listing.should == 'NC' } + specify { expect(@species2.cites_listing).to eq('NC') } end end describe :cites_listed do context "for species Diospyros aculeata" do - specify { @species1.cites_listed.should == false } + specify { expect(@species1.cites_listed).to eq(false) } end context "for species Diospyros acuta" do - specify { @species2.cites_listed.should be_nil } + specify { expect(@species2.cites_listed).to be_nil } end end describe :cites_show do context "for species Diospyros aculeata" do - specify { @species1.cites_show.should be_truthy } + specify { expect(@species1.cites_show).to be_truthy } end context "for species Diospyros acuta" do - specify { @species2.cites_show.should be_falsey } + specify { expect(@species2.cites_show).to be_falsey } end end describe :eu_listing do context 'for species Diospyros aculeata' do - specify { @species1.eu_listing.should == 'B' } + specify { expect(@species1.eu_listing).to eq('B') } end context 'for species Diospyros acuta' do - specify { @species2.eu_listing.should == 'NC' } + specify { expect(@species2.eu_listing).to eq('NC') } end end describe :eu_listed do context "for species Diospyros aculeata" do - specify { @species1.eu_listed.should == false } + specify { expect(@species1.eu_listed).to eq(false) } end context "for species Diospyros acuta" do - specify { @species2.eu_listed.should be_nil } + specify { expect(@species2.eu_listed).to be_nil } end end describe :eu_show do context "for species Diospyros aculeata" do - specify { @species1.eu_show.should be_truthy } + specify { expect(@species1.eu_show).to be_truthy } end context "for species Diospyros acuta" do - specify { @species2.eu_show.should be_falsey } + specify { expect(@species2.eu_show).to be_falsey } end end diff --git a/spec/models/taxon_concept/falconiformes_spec.rb b/spec/models/taxon_concept/falconiformes_spec.rb index ff958a5859..75cebe94a6 100644 --- a/spec/models/taxon_concept/falconiformes_spec.rb +++ b/spec/models/taxon_concept/falconiformes_spec.rb @@ -7,7 +7,7 @@ context "TAXONOMY" do describe :rank_name do context "for Falco hybrid" do - specify { @hybrid.rank_name.should == Rank::GENUS } + specify { expect(@hybrid.rank_name).to eq(Rank::GENUS) } end end end @@ -15,124 +15,124 @@ context "LISTING" do describe :cites_listing do context "for order Falconiformes" do - specify { @order.cites_listing.should == 'I/II/III/NC' } + specify { expect(@order.cites_listing).to eq('I/II/III/NC') } end context "for species Falco araea" do - specify { @species2_1.cites_listing.should == 'I' } + specify { expect(@species2_1.cites_listing).to eq('I') } end context "for species Falco alopex (H)" do - specify { @species2_2.cites_listing.should == 'II' } + specify { expect(@species2_2.cites_listing).to eq('II') } end context "for species Gymnogyps californianus" do - specify { @species1_1.cites_listing.should == 'I' } + specify { expect(@species1_1.cites_listing).to eq('I') } end context "for species Sarcoramphus papa" do - specify { @species1_2.cites_listing.should == 'III' } + specify { expect(@species1_2.cites_listing).to eq('III') } end context "for species Vultur atratus" do - specify { @species1_3.cites_listing.should == 'NC' } + specify { expect(@species1_3.cites_listing).to eq('NC') } end end describe :eu_listing do context "for order Falconiformes" do - specify { @order.eu_listing.should == 'A/B/C/NC' } + specify { expect(@order.eu_listing).to eq('A/B/C/NC') } end context "for species Falco araea" do - specify { @species2_1.eu_listing.should == 'A' } + specify { expect(@species2_1.eu_listing).to eq('A') } end context "for species Falco alopex (H)" do - specify { @species2_2.eu_listing.should == 'B' } + specify { expect(@species2_2.eu_listing).to eq('B') } end context "for species Gymnogyps californianus" do - specify { @species1_1.eu_listing.should == 'A' } + specify { expect(@species1_1.eu_listing).to eq('A') } end context "for species Sarcoramphus papa" do - specify { @species1_2.eu_listing.should == 'C' } + specify { expect(@species1_2.eu_listing).to eq('C') } end context "for species Vultur atratus" do - specify { @species1_3.eu_listing.should == 'NC' } + specify { expect(@species1_3.eu_listing).to eq('NC') } end end describe :cites_status do context "for genus Vultur" do - specify { @genus1_3.cites_status.should == 'EXCLUDED' } + specify { expect(@genus1_3.cites_status).to eq('EXCLUDED') } end context "for species Vultur atratus" do - specify { @species1_3.cites_status.should == 'EXCLUDED' } + specify { expect(@species1_3.cites_status).to eq('EXCLUDED') } end end describe :cites_listed do context "for order Falconiformes" do - specify { @order.cites_listed.should be_truthy } + specify { expect(@order.cites_listed).to be_truthy } end context "for family Falconidae (inclusion in higher taxa listing)" do - specify { @family2.cites_listed.should == false } + specify { expect(@family2.cites_listed).to eq(false) } end context "for genus Falco" do - specify { @genus2_1.cites_listed.should == false } + specify { expect(@genus2_1.cites_listed).to eq(false) } end context "for species Falco araea" do - specify { @species2_1.cites_listed.should be_truthy } + specify { expect(@species2_1.cites_listed).to be_truthy } end context "for species Falco alopex" do - specify { @species2_2.cites_listed.should == false } + specify { expect(@species2_2.cites_listed).to eq(false) } end context "for species Vultur atratus" do - specify { @species1_3.cites_listed.should be_blank } + specify { expect(@species1_3.cites_listed).to be_blank } end context "for subspecies Falco peregrinus peregrinus" do - specify { @subspecies2_3_1.cites_listed.should == false } + specify { expect(@subspecies2_3_1.cites_listed).to eq(false) } end end describe :eu_listed do context "for order Falconiformes" do - specify { @order.eu_listed.should be_truthy } + specify { expect(@order.eu_listed).to be_truthy } end context "for family Falconidae (inclusion in higher taxa listing)" do - specify { @family2.eu_listed.should == false } + specify { expect(@family2.eu_listed).to eq(false) } end context "for genus Falco" do - specify { @genus2_1.eu_listed.should == false } + specify { expect(@genus2_1.eu_listed).to eq(false) } end context "for species Falco araea" do - specify { @species2_1.eu_listed.should be_truthy } + specify { expect(@species2_1.eu_listed).to be_truthy } end context "for species Falco alopex" do - specify { @species2_2.eu_listed.should == false } + specify { expect(@species2_2.eu_listed).to eq(false) } end context "for species Vultur atratus" do - specify { @species1_3.eu_listed.should be_blank } + specify { expect(@species1_3.eu_listed).to be_blank } end context "for subspecies Falco peregrinus peregrinus" do - specify { @subspecies2_3_1.eu_listed.should == false } + specify { expect(@subspecies2_3_1.eu_listed).to eq(false) } end end describe :cites_show do context "for order Falconiformes" do - specify { @order.cites_show.should be_truthy } + specify { expect(@order.cites_show).to be_truthy } end context "for family Falconidae" do - specify { @family2.cites_show.should be_truthy } + specify { expect(@family2.cites_show).to be_truthy } end context "for Falco hybrid" do - specify { @hybrid.cites_show.should be_falsey } + specify { expect(@hybrid.cites_show).to be_falsey } end end describe :show_in_checklist_ac do context "for subspecies Falco peregrinus peregrinus" do - specify { @subspecies2_3_1_ac.show_in_checklist_ac.should be_falsey } + specify { expect(@subspecies2_3_1_ac.show_in_checklist_ac).to be_falsey } end end describe :show_in_species_plus_ac do context "for subspecies Falco peregrinus peregrinus" do - specify { @subspecies2_3_1_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies2_3_1_ac.show_in_species_plus_ac).to be_truthy } end end diff --git a/spec/models/taxon_concept/hybrids_spec.rb b/spec/models/taxon_concept/hybrids_spec.rb index 493ecb9f6f..30e5c0b644 100644 --- a/spec/models/taxon_concept/hybrids_spec.rb +++ b/spec/models/taxon_concept/hybrids_spec.rb @@ -30,16 +30,16 @@ } context "when new" do specify { - tc.has_hybrids?.should be_truthy + expect(tc.has_hybrids?).to be_truthy } specify { - hybrid.is_hybrid?.should be_truthy + expect(hybrid.is_hybrid?).to be_truthy } specify { - hybrid.has_hybrid_parents?.should be_truthy + expect(hybrid.has_hybrid_parents?).to be_truthy } specify { - hybrid.full_name.should == 'Lolcatus lolcatus x lolatus' + expect(hybrid.full_name).to eq('Lolcatus lolcatus x lolatus') } end context "when duplicate" do @@ -47,9 +47,9 @@ hybrid.dup } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(0) + end.to change(TaxonConcept, :count).by(0) } end context "when duplicate but author name different" do @@ -59,9 +59,9 @@ res } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(1) + end.to change(TaxonConcept, :count).by(1) } end end diff --git a/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb b/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb index aaae65628d..2c76ff4fd3 100644 --- a/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb +++ b/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb @@ -6,26 +6,26 @@ context "TAXONOMY" do describe :full_name do context "for species Loxodonta africana" do - specify { @species.full_name.should == 'Loxodonta africana' } + specify { expect(@species.full_name).to eq('Loxodonta africana') } end context "for genus Loxodonta" do - specify { @genus.full_name.should == 'Loxodonta' } + specify { expect(@genus.full_name).to eq('Loxodonta') } end end describe :rank do context "for species Loxodonta africana" do - specify { @species.rank_name.should == 'SPECIES' } + specify { expect(@species.rank_name).to eq('SPECIES') } end end describe :ancestors do context "family" do - specify { @species.family_name.should == 'Elephantidae' } + specify { expect(@species.family_name).to eq('Elephantidae') } end context "order" do - specify { @species.order_name.should == 'Proboscidea' } + specify { expect(@species.order_name).to eq('Proboscidea') } end context "class" do - specify { @species.class_name.should == 'Mammalia' } + specify { expect(@species.class_name).to eq('Mammalia') } end end end @@ -33,13 +33,13 @@ context "LISTING" do describe :cms_listing do context "for species Loxodonta africana" do - specify { @species.cms_listing.should == 'II' } + specify { expect(@species.cms_listing).to eq('II') } end end describe :cms_listed do context "for species Loxodonta africana" do - specify { @species.cms_listed.should be_truthy } + specify { expect(@species.cms_listed).to be_truthy } end end end diff --git a/spec/models/taxon_concept/loxodonta_africana_spec.rb b/spec/models/taxon_concept/loxodonta_africana_spec.rb index 8c6a70efa7..e41b70e88e 100644 --- a/spec/models/taxon_concept/loxodonta_africana_spec.rb +++ b/spec/models/taxon_concept/loxodonta_africana_spec.rb @@ -6,15 +6,15 @@ context "TAXONOMY" do describe :full_name do context "for species Loxodonta africana" do - specify { @species.full_name.should == 'Loxodonta africana' } + specify { expect(@species.full_name).to eq('Loxodonta africana') } end context "for genus Loxodonta" do - specify { @genus.full_name.should == 'Loxodonta' } + specify { expect(@genus.full_name).to eq('Loxodonta') } end end describe :rank do context "for species Loxodonta africana" do - specify { @species.rank_name.should == 'SPECIES' } + specify { expect(@species.rank_name).to eq('SPECIES') } end end describe :ancestors do @@ -33,31 +33,31 @@ context "LISTING" do describe :cites_listing do context "for species Loxodonta africana (population split listing)" do - specify { @species.cites_listing.should == 'I/II' } + specify { expect(@species.cites_listing).to eq('I/II') } end end describe :eu_listing do context "for species Loxodonta africana (population split listing)" do - specify { @species.eu_listing.should == 'A/B' } + specify { expect(@species.eu_listing).to eq('A/B') } end end describe :cites_listed do context "for species Loxodonta africana" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end context "for family Elephantidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end end describe :eu_listed do context "for species Loxodonta africana" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end context "for family Elephantidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end end diff --git a/spec/models/taxon_concept/mellivora_capensis_spec.rb b/spec/models/taxon_concept/mellivora_capensis_spec.rb index 6bfb4e2b75..73bf14a5cf 100644 --- a/spec/models/taxon_concept/mellivora_capensis_spec.rb +++ b/spec/models/taxon_concept/mellivora_capensis_spec.rb @@ -6,43 +6,43 @@ context "LISTING" do describe :cites_listing do context "for species Mellivora capensis" do - specify { @species.cites_listing.should == 'III' } + specify { expect(@species.cites_listing).to eq('III') } end end describe :eu_listing do context "for species Mellivora capensis" do - specify { @species.eu_listing.should == 'C' } + specify { expect(@species.eu_listing).to eq('C') } end end describe :cites_listed do context "for family Mustelinae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Mellivora" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Mellivora capensis" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end end describe :eu_listed do context "for family Mustelinae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Mellivora" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Mellivora capensis" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end describe :current_party_ids do context "for species Mellivora capensis" do - specify { @species.current_parties_ids.should == [GeoEntity.find_by_iso_code2('BW').id] } + specify { expect(@species.current_parties_ids).to eq([GeoEntity.find_by_iso_code2('BW').id]) } end end diff --git a/spec/models/taxon_concept/moschus_spec.rb b/spec/models/taxon_concept/moschus_spec.rb index 96a8f1ea76..a3d8375ae8 100644 --- a/spec/models/taxon_concept/moschus_spec.rb +++ b/spec/models/taxon_concept/moschus_spec.rb @@ -7,31 +7,31 @@ context "LISTING" do describe :cites_listing do context "for genus Moschus" do - specify { @genus.cites_listing.should == 'I/II' } + specify { expect(@genus.cites_listing).to eq('I/II') } end context "for species Moschus leucogaster" do - specify { @species1.cites_listing.should == 'I' } + specify { expect(@species1.cites_listing).to eq('I') } end context "for species Moschus moschiferus" do - specify { @species2.cites_listing.should == 'II' } + specify { expect(@species2.cites_listing).to eq('II') } end context "for subspecies Moschus moschiferus moschiferus" do - specify { @subspecies.cites_listing.should == 'II' } + specify { expect(@subspecies.cites_listing).to eq('II') } end end describe :cites_listed do context "for genus Moschus" do - specify { @genus.cites_listed.should be_truthy } + specify { expect(@genus.cites_listed).to be_truthy } end context "for species Moschus leucogaster" do - specify { @species1.cites_listed.should == false } + specify { expect(@species1.cites_listed).to eq(false) } end context "for species Moschus moschiferus" do - specify { @species2.cites_listed.should == false } + specify { expect(@species2.cites_listed).to eq(false) } end context "for subspecies Moschus moschiferus moschiferus" do - specify { @subspecies.cites_listed.should == false } + specify { expect(@subspecies.cites_listed).to eq(false) } end end end @@ -40,29 +40,29 @@ describe :current_cites_additions do context "for species Moschus leucogaster" do specify { - @species1.current_cites_additions.size.should == 1 + expect(@species1.current_cites_additions.size).to eq(1) addition = @species1.current_cites_additions.first - addition.original_taxon_concept_id.should == @genus.id + expect(addition.original_taxon_concept_id).to eq(@genus.id) # should inherit just the I listing from split listed genus - addition.species_listing_name.should == 'I' + expect(addition.species_listing_name).to eq('I') } end context "for species Moschus moschiferus" do specify { - @species2.current_cites_additions.size.should == 1 + expect(@species2.current_cites_additions.size).to eq(1) addition = @species2.current_cites_additions.first - addition.original_taxon_concept_id.should == @genus.id + expect(addition.original_taxon_concept_id).to eq(@genus.id) # should inherit just the II listing from split listed genus - addition.species_listing_name.should == 'II' + expect(addition.species_listing_name).to eq('II') } end context "for subspecies Moschus moschiferus moschiferus" do specify { - @subspecies.current_cites_additions.size.should == 1 + expect(@subspecies.current_cites_additions.size).to eq(1) addition = @subspecies.current_cites_additions.first - addition.original_taxon_concept_id.should == @genus.id + expect(addition.original_taxon_concept_id).to eq(@genus.id) # should inherit just the II listing from split listed genus - addition.species_listing_name.should == 'II' + expect(addition.species_listing_name).to eq('II') } end end diff --git a/spec/models/taxon_concept/natator_depressus_spec.rb b/spec/models/taxon_concept/natator_depressus_spec.rb index 498c9a0e92..09a24dc656 100644 --- a/spec/models/taxon_concept/natator_depressus_spec.rb +++ b/spec/models/taxon_concept/natator_depressus_spec.rb @@ -7,10 +7,10 @@ context "LISTING" do describe :cites_listing do context "for family Cheloniidae" do - specify { @family.cites_listing.should == 'I' } + specify { expect(@family.cites_listing).to eq('I') } end context "for species Natator depressus" do - specify { @species.cites_listing.should == 'I' } + specify { expect(@species.cites_listing).to eq('I') } end end diff --git a/spec/models/taxon_concept/notomys_aquilo_spec.rb b/spec/models/taxon_concept/notomys_aquilo_spec.rb index a17cfcb41e..b3e27c07d9 100644 --- a/spec/models/taxon_concept/notomys_aquilo_spec.rb +++ b/spec/models/taxon_concept/notomys_aquilo_spec.rb @@ -7,19 +7,19 @@ context "LISTING" do describe :cites_listing do context "for genus Notomys" do - specify { @genus.cites_listing.should == 'NC' } + specify { expect(@genus.cites_listing).to eq('NC') } end context "for species Notomys aquilo" do - specify { @species.cites_listing.should == 'NC' } + specify { expect(@species.cites_listing).to eq('NC') } end end describe :cites_show do context "for genus Notomys" do - specify { @genus.cites_show.should be_falsey } + specify { expect(@genus.cites_show).to be_falsey } end context "for species Notomys aquilo" do - specify { @species.cites_show.should be_falsey } + specify { expect(@species.cites_show).to be_falsey } end end diff --git a/spec/models/taxon_concept/panax_ginseng_spec.rb b/spec/models/taxon_concept/panax_ginseng_spec.rb index fa7ce59242..c583c453d2 100644 --- a/spec/models/taxon_concept/panax_ginseng_spec.rb +++ b/spec/models/taxon_concept/panax_ginseng_spec.rb @@ -8,43 +8,43 @@ describe :cites_listed do context "for species Panax ginseng" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end context "for genus Panax" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end end describe :eu_listed do context "for species Panax ginseng" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end context "for genus Panax" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end end describe :cites_listing do context "for species Panax ginseng" do - specify { @species.cites_listing.should == 'II/NC' } + specify { expect(@species.cites_listing).to eq('II/NC') } end end describe :eu_listing do context "for species Panax ginseng" do - specify { @species.eu_listing.should == 'B/NC' } + specify { expect(@species.eu_listing).to eq('B/NC') } end end describe :ann_symbol do context "for species Panax ginseng" do - specify { @species.ann_symbol.should_not be_blank } + specify { expect(@species.ann_symbol).not_to be_blank } end end describe :hash_ann_symbol do context "for species Panax ginseng" do - specify { @species.hash_ann_symbol.should == '#3' } + specify { expect(@species.hash_ann_symbol).to eq('#3') } end end end diff --git a/spec/models/taxon_concept/pereskia_spec.rb b/spec/models/taxon_concept/pereskia_spec.rb index 44220e6039..8784c72374 100644 --- a/spec/models/taxon_concept/pereskia_spec.rb +++ b/spec/models/taxon_concept/pereskia_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context "for genus Pereskia (not listed, shown)" do - specify { @genus1.cites_listing.should == 'NC' } + specify { expect(@genus1.cites_listing).to eq('NC') } end context "for genus Ariocarpus" do - specify { @genus2.cites_listing.should == 'I' } + specify { expect(@genus2.cites_listing).to eq('I') } end context "for family Cactaceae" do - specify { @family.cites_listing.should == 'I/II/NC' } + specify { expect(@family.cites_listing).to eq('I/II/NC') } end end describe :eu_listing do context "for genus Pereskia (not listed, shown)" do - specify { @genus1.eu_listing.should == 'NC' } + specify { expect(@genus1.eu_listing).to eq('NC') } end context "for genus Ariocarpus" do - specify { @genus2.eu_listing.should == 'A' } + specify { expect(@genus2.eu_listing).to eq('A') } end context "for family Cactaceae" do - specify { @family.eu_listing.should == 'A/B/NC' } + specify { expect(@family.eu_listing).to eq('A/B/NC') } end end describe :cites_listed do context "for family Cactaceae" do - specify { @family.cites_listed.should be_truthy } + specify { expect(@family.cites_listed).to be_truthy } end context "for genus Pereskia" do - specify { @genus1.cites_listed.should be_nil } + specify { expect(@genus1.cites_listed).to be_nil } end end describe :eu_listed do context "for family Cactaceae" do - specify { @family.eu_listed.should be_truthy } + specify { expect(@family.eu_listed).to be_truthy } end context "for genus Pereskia" do - specify { @genus1.eu_listed.should be_nil } + specify { expect(@genus1.eu_listed).to be_nil } end end describe :cites_status do context "for genus Pereskia" do - specify { @genus1.cites_status.should == 'EXCLUDED' } + specify { expect(@genus1.cites_status).to eq('EXCLUDED') } end end describe :cites_show do context "for genus Pereskia" do - specify { @genus1.cites_show.should == true } + specify { expect(@genus1.cites_show).to eq(true) } end end diff --git a/spec/models/taxon_concept/platysternon_megacephalum_spec.rb b/spec/models/taxon_concept/platysternon_megacephalum_spec.rb index fb86c24c1d..63316c582f 100644 --- a/spec/models/taxon_concept/platysternon_megacephalum_spec.rb +++ b/spec/models/taxon_concept/platysternon_megacephalum_spec.rb @@ -7,43 +7,43 @@ context "LISTING" do describe :cites_listing do context 'for family Platysternidae' do - specify { @family.cites_listing.should == 'I' } + specify { expect(@family.cites_listing).to eq('I') } end context 'for species Platysternon megacephalum' do - specify { @species.cites_listing.should == 'I' } + specify { expect(@species.cites_listing).to eq('I') } end end describe :cites_listed do context "for species Platysternon megacephalum" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end end describe :cites_show do context "for species Platysternon megacephalum" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end end describe :eu_listing do context 'for family Platysternidae' do - specify { @family.eu_listing.should == 'A' } + specify { expect(@family.eu_listing).to eq('A') } end context 'for species Platysternon megacephalum' do - specify { @species.eu_listing.should == 'A' } + specify { expect(@species.eu_listing).to eq('A') } end end describe :eu_listed do context "for species Platysternon megacephalum" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end end describe :eu_show do context "for species Platysternon megacephalum" do - specify { @species.eu_show.should be_truthy } + specify { expect(@species.eu_show).to be_truthy } end end diff --git a/spec/models/taxon_concept/pristis_microdon_spec.rb b/spec/models/taxon_concept/pristis_microdon_spec.rb index 2de1a66f31..bbef9fb494 100644 --- a/spec/models/taxon_concept/pristis_microdon_spec.rb +++ b/spec/models/taxon_concept/pristis_microdon_spec.rb @@ -7,43 +7,43 @@ context "LISTING" do describe :cites_listing do context 'for family Pristidae' do - specify { @family.cites_listing.should == 'I' } + specify { expect(@family.cites_listing).to eq('I') } end context 'for species Pristis microdon' do - specify { @species.cites_listing.should == 'I' } + specify { expect(@species.cites_listing).to eq('I') } end end describe :cites_listed do context "for species Pristis microdon" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end end describe :cites_show do context "for species Pristis microdon" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end end describe :eu_listing do context 'for family Pristidae' do - specify { @family.eu_listing.should == 'A' } + specify { expect(@family.eu_listing).to eq('A') } end context 'for species Pristis microdon' do - specify { @species.eu_listing.should == 'A' } + specify { expect(@species.eu_listing).to eq('A') } end end describe :eu_listed do context "for species Pristis microdon" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end end describe :eu_show do context "for species Pristis microdon" do - specify { @species.eu_show.should be_truthy } + specify { expect(@species.eu_show).to be_truthy } end end diff --git a/spec/models/taxon_concept/pseudomys_fieldi_spec.rb b/spec/models/taxon_concept/pseudomys_fieldi_spec.rb index f32afd4544..5eef23dee9 100644 --- a/spec/models/taxon_concept/pseudomys_fieldi_spec.rb +++ b/spec/models/taxon_concept/pseudomys_fieldi_spec.rb @@ -7,28 +7,28 @@ context "LISTING" do describe :cites_listing do context "for subspecies Pseudomys fieldi preaconis" do - specify { @subspecies.cites_listing.should == 'I' } + specify { expect(@subspecies.cites_listing).to eq('I') } end context "for species Pseudomys fieldi" do - specify { @species.cites_listing.should == 'I/NC' } + specify { expect(@species.cites_listing).to eq('I/NC') } end end describe :eu_listing do context "for subspecies Pseudomys fieldi preaconis" do - specify { @subspecies.eu_listing.should == 'A' } + specify { expect(@subspecies.eu_listing).to eq('A') } end context "for species Pseudomys fieldi" do - specify { @species.eu_listing.should == 'A/NC' } + specify { expect(@species.eu_listing).to eq('A/NC') } end end describe :cites_show do context "for subspecies Pseudomys fieldi preaconis" do - specify { @subspecies.cites_show.should be_truthy } + specify { expect(@subspecies.cites_show).to be_truthy } end context "for species Pseudomys fieldi" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end end diff --git a/spec/models/taxon_concept/psittaciformes_spec.rb b/spec/models/taxon_concept/psittaciformes_spec.rb index 2eb2fb82d6..a5a6216861 100644 --- a/spec/models/taxon_concept/psittaciformes_spec.rb +++ b/spec/models/taxon_concept/psittaciformes_spec.rb @@ -7,136 +7,136 @@ context "LISTING" do describe :cites_listing do context "for order Psittaciformes" do - specify { @order.cites_listing.should == 'I/II/NC' } + specify { expect(@order.cites_listing).to eq('I/II/NC') } end context "for species Cacatua goffiniana" do - specify { @species1_2_1.cites_listing.should == 'I' } + specify { expect(@species1_2_1.cites_listing).to eq('I') } end context "for species Cacatua ducorpsi (H)" do - specify { @species1_2_2.cites_listing.should == 'II' } + specify { expect(@species1_2_2.cites_listing).to eq('II') } end context "for species Probosciger aterrimus" do - specify { @species1_1.cites_listing.should == 'I' } + specify { expect(@species1_1.cites_listing).to eq('I') } end context "for species Amazona aestiva" do - specify { @species2_2_1.cites_listing.should == 'II' } + specify { expect(@species2_2_1.cites_listing).to eq('II') } end context "for species Agapornis roseicollis (DEL II, not listed, not shown)" do - specify { @species2_1.cites_listing.should == 'NC' } + specify { expect(@species2_1.cites_listing).to eq('NC') } end context "for species Psittacula krameri (DEL III, not listed, not shown)" do - specify { @species2_3.cites_listing.should == 'NC' } + specify { expect(@species2_3.cites_listing).to eq('NC') } end context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.cites_listing.should == 'II' } + specify { expect(@subspecies2_2_2_1.cites_listing).to eq('II') } end end describe :eu_listing do context "for order Psittaciformes" do - specify { @order.eu_listing.should == 'A/B/NC' } + specify { expect(@order.eu_listing).to eq('A/B/NC') } end context "for species Cacatua goffiniana" do - specify { @species1_2_1.eu_listing.should == 'A' } + specify { expect(@species1_2_1.eu_listing).to eq('A') } end context "for species Cacatua ducorpsi (H)" do - specify { @species1_2_2.eu_listing.should == 'B' } + specify { expect(@species1_2_2.eu_listing).to eq('B') } end context "for species Probosciger aterrimus" do - specify { @species1_1.eu_listing.should == 'A' } + specify { expect(@species1_1.eu_listing).to eq('A') } end context "for species Amazona aestiva" do - specify { @species2_2_1.eu_listing.should == 'B' } + specify { expect(@species2_2_1.eu_listing).to eq('B') } end context "for species Agapornis roseicollis (DEL II, not listed, not shown)" do - specify { @species2_1.eu_listing.should == 'NC' } + specify { expect(@species2_1.eu_listing).to eq('NC') } end context "for species Psittacula krameri (DEL III, not listed, not shown)" do - specify { @species2_3.eu_listing.should == 'NC' } + specify { expect(@species2_3.eu_listing).to eq('NC') } end context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.eu_listing.should == 'B' } + specify { expect(@subspecies2_2_2_1.eu_listing).to eq('B') } end end describe :cites_listed do context "for order Psittaciformes" do - specify { @order.cites_listed.should be_truthy } + specify { expect(@order.cites_listed).to be_truthy } end context "for family Cacatuidae" do - specify { @family1.cites_listed.should == false } + specify { expect(@family1.cites_listed).to eq(false) } end context "for genus Cacatua" do - specify { @genus1_2.cites_listed.should == false } + specify { expect(@genus1_2.cites_listed).to eq(false) } end context "for species Cacatua goffiniana" do - specify { @species1_2_1.cites_listed.should be_truthy } + specify { expect(@species1_2_1.cites_listed).to be_truthy } end context "for species Cacatua ducorpsi" do - specify { @species1_2_2.cites_listed.should == false } + specify { expect(@species1_2_2.cites_listed).to eq(false) } end context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.cites_listed.should == false } + specify { expect(@subspecies2_2_2_1.cites_listed).to eq(false) } end end describe :eu_listed do context "for order Psittaciformes" do - specify { @order.eu_listed.should be_truthy } + specify { expect(@order.eu_listed).to be_truthy } end context "for family Cacatuidae" do - specify { @family1.eu_listed.should == false } + specify { expect(@family1.eu_listed).to eq(false) } end context "for genus Cacatua" do - specify { @genus1_2.eu_listed.should == false } + specify { expect(@genus1_2.eu_listed).to eq(false) } end context "for species Cacatua goffiniana" do - specify { @species1_2_1.eu_listed.should be_truthy } + specify { expect(@species1_2_1.eu_listed).to be_truthy } end context "for species Cacatua ducorpsi" do - specify { @species1_2_2.eu_listed.should == false } + specify { expect(@species1_2_2.eu_listed).to eq(false) } end context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.eu_listed.should == false } + specify { expect(@subspecies2_2_2_1.eu_listed).to eq(false) } end end describe :cites_show do context "for species Agapornis roseicollis (DEL II)" do - specify { @species2_1.cites_show.should be_truthy } + specify { expect(@species2_1.cites_show).to be_truthy } end context "for species Amazona aestiva" do - specify { @species2_2_1.cites_show.should be_truthy } + specify { expect(@species2_2_1.cites_show).to be_truthy } end context "for species Psittacula krameri (DEL III)" do - specify { @species2_3.cites_show.should be_truthy } + specify { expect(@species2_3.cites_show).to be_truthy } end end describe :cites_status do context "for species Agapornis roseicollis (DEL II)" do - specify { @species2_1.cites_status.should == 'EXCLUDED' } + specify { expect(@species2_1.cites_status).to eq('EXCLUDED') } end context "for species Psittacula krameri (DEL III)" do - specify { @species2_3.cites_status.should == 'EXCLUDED' } + specify { expect(@species2_3.cites_status).to eq('EXCLUDED') } end end describe :show_in_checklist_ac do context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1_ac.show_in_checklist_ac.should be_falsey } + specify { expect(@subspecies2_2_2_1_ac.show_in_checklist_ac).to be_falsey } end end describe :show_in_species_plus_ac do context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1_ac.show_in_species_plus_ac.should be_falsey } + specify { expect(@subspecies2_2_2_1_ac.show_in_species_plus_ac).to be_falsey } end end describe :show_in_species_plus do context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.show_in_species_plus.should be_falsey } + specify { expect(@subspecies2_2_2_1.show_in_species_plus).to be_falsey } end end diff --git a/spec/models/taxon_concept/synonyms_spec.rb b/spec/models/taxon_concept/synonyms_spec.rb index 8097264efe..8b696ec7c2 100644 --- a/spec/models/taxon_concept/synonyms_spec.rb +++ b/spec/models/taxon_concept/synonyms_spec.rb @@ -30,16 +30,16 @@ } context "when new" do specify { - tc.has_synonyms?.should be_truthy + expect(tc.has_synonyms?).to be_truthy } specify { - synonym.is_synonym?.should be_truthy + expect(synonym.is_synonym?).to be_truthy } specify { - synonym.has_accepted_names?.should be_truthy + expect(synonym.has_accepted_names?).to be_truthy } specify { - synonym.full_name.should == 'Lolcatus lolus' + expect(synonym.full_name).to eq('Lolcatus lolus') } end context "when duplicate" do @@ -47,9 +47,9 @@ synonym.dup } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(0) + end.to change(TaxonConcept, :count).by(0) } end context "when duplicate but author name different" do @@ -59,9 +59,9 @@ res } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(1) + end.to change(TaxonConcept, :count).by(1) } end context "when has accepted parent" do @@ -84,13 +84,13 @@ ) end # should not modify a synonym's full name when saving - specify { @synonym.full_name.should == 'Lolcatus lolus furiatus' } + specify { expect(@synonym.full_name).to eq('Lolcatus lolus furiatus') } context "overnight calculations" do before(:each) do Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings end # should not modify a synonym's full name overnight - specify { @synonym.reload.full_name.should == 'Lolcatus lolus furiatus' } + specify { expect(@synonym.reload.full_name).to eq('Lolcatus lolus furiatus') } end end end diff --git a/spec/models/taxon_concept/tapiridae_spec.rb b/spec/models/taxon_concept/tapiridae_spec.rb index 39d3110960..e4dd41a5a9 100644 --- a/spec/models/taxon_concept/tapiridae_spec.rb +++ b/spec/models/taxon_concept/tapiridae_spec.rb @@ -6,12 +6,12 @@ context "TAXONOMY" do describe :full_name do context "for family Tapiridae" do - specify { @family.full_name.should == 'Tapiridae' } + specify { expect(@family.full_name).to eq('Tapiridae') } end end describe :rank do context "for family Tapiridae" do - specify { @family.rank_name.should == 'FAMILY' } + specify { expect(@family.rank_name).to eq('FAMILY') } end end describe :ancestors do @@ -27,43 +27,43 @@ context "LISTING" do describe :cites_listing do context "for family Tapiridae" do - specify { @family.cites_listing.should == 'I/II' } + specify { expect(@family.cites_listing).to eq('I/II') } end context "for species Tapirus terrestris" do - specify { @species.cites_listing.should == 'II' } + specify { expect(@species.cites_listing).to eq('II') } end end describe :eu_listing do context "for family Tapiridae" do - specify { @family.eu_listing.should == 'A/B' } + specify { expect(@family.eu_listing).to eq('A/B') } end context "for species Tapirus terrestris" do - specify { @species.eu_listing.should == 'B' } + specify { expect(@species.eu_listing).to eq('B') } end end describe :cites_listed do context "for family Tapiridae" do - specify { @family.cites_listed.should be_truthy } + specify { expect(@family.cites_listed).to be_truthy } end context "for genus Tapirus" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Tapirus terrestris" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end end describe :eu_listed do context "for family Tapiridae" do - specify { @family.eu_listed.should be_truthy } + specify { expect(@family.eu_listed).to be_truthy } end context "for genus Tapirus" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Tapirus terrestris" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end end diff --git a/spec/models/taxon_concept/trade_names_spec.rb b/spec/models/taxon_concept/trade_names_spec.rb index 57e3d7babb..73fddb12fc 100644 --- a/spec/models/taxon_concept/trade_names_spec.rb +++ b/spec/models/taxon_concept/trade_names_spec.rb @@ -30,16 +30,16 @@ } context "when new" do specify { - tc.has_trade_names?.should be_truthy + expect(tc.has_trade_names?).to be_truthy } specify { - trade_name.is_trade_name?.should be_truthy + expect(trade_name.is_trade_name?).to be_truthy } specify { - trade_name.has_accepted_names_for_trade_name?.should be_truthy + expect(trade_name.has_accepted_names_for_trade_name?).to be_truthy } specify { - trade_name.full_name.should == 'Lolcatus lolus' + expect(trade_name.full_name).to eq('Lolcatus lolus') } end context "when duplicate" do @@ -47,9 +47,9 @@ trade_name.dup } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(0) + end.to change(TaxonConcept, :count).by(0) } end context "when duplicate but author name different" do @@ -59,9 +59,9 @@ res } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(1) + end.to change(TaxonConcept, :count).by(1) } end context "when has accepted parent" do @@ -84,13 +84,13 @@ ) end # should not modify a trade_name's full name when saving - specify { @trade_name.full_name.should == 'Lolcatus lolus furiatus' } + specify { expect(@trade_name.full_name).to eq('Lolcatus lolus furiatus') } context "overnight calculations" do before(:each) do Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings end # should not modify a trade_name's full name overnight - specify { @trade_name.reload.full_name.should == 'Lolcatus lolus furiatus' } + specify { expect(@trade_name.reload.full_name).to eq('Lolcatus lolus furiatus') } end end end diff --git a/spec/models/taxon_concept/uroplatus_spec.rb b/spec/models/taxon_concept/uroplatus_spec.rb index 319db64f14..ea9ff61ef0 100644 --- a/spec/models/taxon_concept/uroplatus_spec.rb +++ b/spec/models/taxon_concept/uroplatus_spec.rb @@ -7,70 +7,70 @@ context "REFERENCES" do describe :cites_accepted do context "for genus Uroplatus" do - specify { @genus.cites_accepted.should == false } + specify { expect(@genus.cites_accepted).to eq(false) } end context "for species Uroplatus alluaudi" do - specify { @species1.cites_accepted.should == false } + specify { expect(@species1.cites_accepted).to eq(false) } end context "for species Uroplatus giganteus" do - specify { @species2.cites_accepted.should be_truthy } + specify { expect(@species2.cites_accepted).to be_truthy } end end describe :standard_taxon_concept_references do context "for family Gekkonidae" do - specify { @family.taxon_concept.standard_taxon_concept_references.should be_empty } + specify { expect(@family.taxon_concept.standard_taxon_concept_references).to be_empty } end context "for genus Uroplatus" do - specify { @genus.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should be_empty } + specify { expect(@genus.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to be_empty } end context "for species Uroplatus alluaudi" do - specify { @species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should be_empty } + specify { expect(@species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to be_empty } end context "for species Uroplatus giganteus" do - specify { @species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } + specify { expect(@species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } end end end context "LISTING" do describe :cites_listing do context "for genus Uroplatus" do - specify { @genus.cites_listing.should == 'II' } + specify { expect(@genus.cites_listing).to eq('II') } end context "for species Uroplatus giganteus" do - specify { @species2.cites_listing.should == 'II' } + specify { expect(@species2.cites_listing).to eq('II') } end end describe :eu_listing do context "for genus Uroplatus" do - specify { @genus.eu_listing.should == 'B' } + specify { expect(@genus.eu_listing).to eq('B') } end context "for species Uroplatus giganteus" do - specify { @species2.eu_listing.should == 'B' } + specify { expect(@species2.eu_listing).to eq('B') } end end describe :cites_listed do context "for family Gekkonidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Uroplatus" do - specify { @genus.cites_listed.should be_truthy } + specify { expect(@genus.cites_listed).to be_truthy } end context "for species Uroplatus giganteus" do - specify { @species2.cites_listed.should == false } + specify { expect(@species2.cites_listed).to eq(false) } end end describe :eu_listed do context "for family Gekkonidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Uroplatus" do - specify { @genus.eu_listed.should be_truthy } + specify { expect(@genus.eu_listed).to be_truthy } end context "for species Uroplatus giganteus" do - specify { @species2.eu_listed.should == false } + specify { expect(@species2.eu_listed).to eq(false) } end end diff --git a/spec/models/taxon_concept/validation_spec.rb b/spec/models/taxon_concept/validation_spec.rb index 25a50ad324..2f340605b6 100644 --- a/spec/models/taxon_concept/validation_spec.rb +++ b/spec/models/taxon_concept/validation_spec.rb @@ -16,7 +16,7 @@ :parent_id => kingdom_tc.id ) } - specify { tc.valid? should be_truthy } + specify { tc.valid? is_expected.to be_truthy } end context "taxonomy does not match parent" do let(:tc) { @@ -25,7 +25,7 @@ :parent_id => kingdom_tc.id ) } - specify { tc.should have(1).error_on(:parent_id) } + specify { expect(tc.error_on(:parent_id).size).to eq(1) } end context "parent is not an accepted name" do let(:genus_tc) { @@ -40,7 +40,7 @@ :parent_id => genus_tc.id ) } - specify { tc.should have(1).error_on(:parent_id) } + specify { expect(tc.error_on(:parent_id).size).to eq(1) } end context "parent rank is too high above child rank" do let(:tc) { @@ -49,7 +49,7 @@ :parent_id => kingdom_tc.id ) } - specify { tc.should have(1).error_on(:parent_id) } + specify { expect(tc.error_on(:parent_id).size).to eq(1) } end context "parent rank is below child rank" do let(:parent) { @@ -64,7 +64,7 @@ :parent_id => parent.id ) } - specify { tc.should have(1).error_on(:parent_id) } + specify { expect(tc.error_on(:parent_id).size).to eq(1) } end context "scientific name is not given" do let(:tc) { @@ -74,7 +74,7 @@ :taxon_name => build(:taxon_name, :scientific_name => nil) ) } - specify { tc.should have(1).error_on(:taxon_name_id) } + specify { expect(tc.error_on(:taxon_name_id).size).to eq(1) } end context "when taxonomic position malformed" do let(:tc) { @@ -84,7 +84,7 @@ :taxonomic_position => '1.a.b' ) } - specify { tc.should have(1).error_on(:taxonomic_position) } + specify { expect(tc.error_on(:taxonomic_position).size).to eq(1) } end context "when full name is already given" do let(:tc_parent) { create_cites_eu_species } @@ -100,7 +100,7 @@ taxon_name: build(:taxon_name, scientific_name: 'duplicatus') ) } - specify { tc2.should have(1).error_on(:full_name) } + specify { expect(tc2.error_on(:full_name).size).to eq(1) } end end context "update" do @@ -132,17 +132,17 @@ let!(:species_child) { create_cites_eu_subspecies(parent_id: species.id) } specify "cannot change taxonomy when dependents present" do species.taxonomy = cms - expect(species).to have(1).error_on(:taxonomy_id) + expect(species.error_on(:taxonomy_id).size).to eq(1) end end context "scientific name" do specify "cannot change species scientific name" do species.scientific_name = 'Vulgaris' - expect(species).to have(1).error_on(:full_name) + expect(species.error_on(:full_name).size).to eq(1) end specify "cannot change genus scientific name" do genus.scientific_name = 'Felis' - expect(genus).to have(1).error_on(:full_name) + expect(genus.error_on(:full_name).size).to eq(1) end end context "parent" do @@ -159,25 +159,25 @@ end specify "cannot change A species parent" do species.parent = new_genus - expect(species).to have(1).error_on(:full_name) + expect(species.error_on(:full_name).size).to eq(1) end specify "can change S species parent" do s_species.parent = new_genus - expect(s_species).to have(0).error_on(:full_name) + expect(s_species.error_on(:full_name).size).to eq(0) end specify "can change A genus parent" do genus.parent = new_family - expect(genus).to have(0).error_on(:full_name) + expect(genus.error_on(:full_name).size).to eq(0) end end context "rank" do specify "cannot change A species rank" do species.rank = create(:rank, name: 'GENUS') - expect(species).to have(1).error_on(:full_name) + expect(species.error_on(:full_name).size).to eq(1) end specify "can change S species rank" do s_species.rank = create(:rank, name: 'GENUS') - expect(s_species).to have(0).error_on(:full_name) + expect(s_species.error_on(:full_name).size).to eq(0) end end end diff --git a/spec/models/taxon_concept/varanidae_spec.rb b/spec/models/taxon_concept/varanidae_spec.rb index 864e5ba393..3dbb782a63 100644 --- a/spec/models/taxon_concept/varanidae_spec.rb +++ b/spec/models/taxon_concept/varanidae_spec.rb @@ -7,65 +7,65 @@ context "REFERENCES" do describe :cites_accepted do context "for species Varanus bengalensis" do - specify { @species1.cites_accepted.should be_truthy } + specify { expect(@species1.cites_accepted).to be_truthy } end end describe :standard_taxon_concept_references do context "for order Sauria" do - specify { @order.taxon_concept.standard_taxon_concept_references.should be_empty } + specify { expect(@order.taxon_concept.standard_taxon_concept_references).to be_empty } end context "for family Varanidae" do - specify { @family.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref1.id } + specify { expect(@family.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref1.id } end context "for species Varanus bengalensis" do - specify { @species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref1.id } + specify { expect(@species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref1.id } end context "for species Varanus bushi" do - specify { @species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref1.id } - specify { @species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref2.id } + specify { expect(@species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref1.id } + specify { expect(@species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref2.id } end end end context "LISTING" do describe :cites_listing do context "for genus Varanus" do - specify { @genus.cites_listing.should == 'I/II' } + specify { expect(@genus.cites_listing).to eq('I/II') } end context "for species Varanus bengalensis" do - specify { @species1.cites_listing.should == 'I' } + specify { expect(@species1.cites_listing).to eq('I') } end end describe :eu_listing do context "for genus Varanus" do - specify { @genus.eu_listing.should == 'A/B' } + specify { expect(@genus.eu_listing).to eq('A/B') } end context "for species Varanus bengalensis" do - specify { @species1.eu_listing.should == 'A' } + specify { expect(@species1.eu_listing).to eq('A') } end end describe :cites_listed do context "for family Varanidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Varanus" do - specify { @genus.cites_listed.should be_truthy } + specify { expect(@genus.cites_listed).to be_truthy } end context "for species Varanus bengalensis" do - specify { @species1.cites_listed.should be_truthy } + specify { expect(@species1.cites_listed).to be_truthy } end end describe :eu_listed do context "for family Varanidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Varanus" do - specify { @genus.eu_listed.should be_truthy } + specify { expect(@genus.eu_listed).to be_truthy } end context "for species Varanus bengalensis" do - specify { @species1.eu_listed.should be_truthy } + specify { expect(@species1.eu_listed).to be_truthy } end end diff --git a/spec/models/taxon_concept_prefix_matcher_spec.rb b/spec/models/taxon_concept_prefix_matcher_spec.rb index 709e3c75e5..69736f7875 100644 --- a/spec/models/taxon_concept_prefix_matcher_spec.rb +++ b/spec/models/taxon_concept_prefix_matcher_spec.rb @@ -50,8 +50,8 @@ SearchParams.new(:taxonomy => { :id => taxonomy.id }, :scientific_name => 'Ab') } let(:matcher) { TaxonConceptPrefixMatcher.new matcher_params } - specify { matcher.taxon_concepts.should include(taxon_concept4) } - specify { matcher.taxon_concepts.should_not include(hybrid) } + specify { expect(matcher.taxon_concepts).to include(taxon_concept4) } + specify { expect(matcher.taxon_concepts).not_to include(hybrid) } end context "when name status H" do @@ -59,8 +59,8 @@ SearchParams.new(:taxonomy => { :id => taxonomy.id }, :scientific_name => 'Ab', :name_status => 'H') } let(:matcher) { TaxonConceptPrefixMatcher.new matcher_params } - specify { matcher.taxon_concepts.should_not include(taxon_concept4) } - specify { matcher.taxon_concepts.should include(hybrid) } + specify { expect(matcher.taxon_concepts).not_to include(taxon_concept4) } + specify { expect(matcher.taxon_concepts).to include(hybrid) } end context "when rank scope applied" do @@ -76,8 +76,9 @@ } specify { - parent_matcher.taxon_concepts.map(&:full_name).should == + expect(parent_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aab', 'Aac'] + ) } let(:ancestor_matcher_params) { @@ -92,8 +93,9 @@ } specify { - ancestor_matcher.taxon_concepts.map(&:full_name).should == + expect(ancestor_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aaa'] + ) } let(:self_and_ancestor_matcher_params) { @@ -108,8 +110,9 @@ } specify { - self_and_ancestor_matcher.taxon_concepts.map(&:full_name).should == + expect(self_and_ancestor_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aaa', 'Aaab'] + ) } end @@ -126,8 +129,9 @@ } specify { - ancestor_matcher.taxon_concepts.map(&:full_name).should == + expect(ancestor_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aaa', 'Aab', 'Aac'] + ) } let(:descendant_matcher_params) { @@ -142,8 +146,9 @@ } specify { - descendant_matcher.taxon_concepts.map(&:full_name).should == + expect(descendant_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aaab', 'Aab', 'Abb'] + ) } end diff --git a/spec/models/taxon_relationship_spec.rb b/spec/models/taxon_relationship_spec.rb index 33843d4a49..cbcce73ca3 100644 --- a/spec/models/taxon_relationship_spec.rb +++ b/spec/models/taxon_relationship_spec.rb @@ -19,12 +19,12 @@ context 'a relationship with no opposite' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => false) } let!(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { taxon_relationship.has_opposite?.should == false } + specify { expect(taxon_relationship.has_opposite?).to eq(false) } end context 'with an opposite' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => true) } let(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { taxon_relationship.has_opposite?.should == true } + specify { expect(taxon_relationship.has_opposite?).to eq(true) } end end @@ -32,13 +32,13 @@ context 'when creating a bidirectional relationship' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => true) } let!(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { taxon_relationship.has_opposite?.should == true } + specify { expect(taxon_relationship.has_opposite?).to eq(true) } end context 'when creating a non bidirectional relationship' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => false) } let!(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { taxon_relationship.has_opposite?.should == false } + specify { expect(taxon_relationship.has_opposite?).to eq(false) } end end @@ -90,7 +90,7 @@ ) } specify { - taxon_relationship2.valid?.should == false + expect(taxon_relationship2.valid?).to eq(false) } end context "adding an intertaxonomic relationship between taxon concepts that are already related in the opposite direction (B -> A)" do @@ -116,7 +116,7 @@ ) } specify { - taxon_relationship2.valid?.should == false + expect(taxon_relationship2.valid?).to eq(false) } end context "adding an intertaxonomic relationship between taxon concepts that are not already related" do @@ -144,7 +144,7 @@ } specify { - taxon_relationship2.valid?.should == true + expect(taxon_relationship2.valid?).to eq(true) } end end diff --git a/spec/models/taxonomy_spec.rb b/spec/models/taxonomy_spec.rb index 667476afc3..f2fd940082 100644 --- a/spec/models/taxonomy_spec.rb +++ b/spec/models/taxonomy_spec.rb @@ -14,41 +14,41 @@ describe :create do context "when valid" do let(:taxonomy) { build(:taxonomy, :name => 'WILDLIFE') } - specify { taxonomy.should be_valid } + specify { expect(taxonomy).to be_valid } end context "when name missing" do let(:taxonomy) { build(:taxonomy, :name => nil) } - specify { taxonomy.should be_invalid } - specify { taxonomy.should have(1).error_on(:name) } + specify { expect(taxonomy).to be_invalid } + specify { expect(taxonomy).to have(1).error_on(:name) } end context "when name duplicated" do let!(:taxonomy1) { create(:taxonomy) } let(:taxonomy2) { build(:taxonomy, :name => taxonomy1.name) } - specify { taxonomy2.should be_invalid } - specify { taxonomy2.should have(1).error_on(:name) } + specify { expect(taxonomy2).to be_invalid } + specify { expect(taxonomy2).to have(1).error_on(:name) } end end describe :update do context "when updating a non-protected name" do let(:taxonomy) { create(:taxonomy) } - specify { taxonomy.update_attributes({ :name => 'WORLD OF LOLCATS' }).should be_truthy } + specify { expect(taxonomy.update_attributes({ :name => 'WORLD OF LOLCATS' })).to be_truthy } end context "when updating a protected name" do - specify { cites_eu.update_attributes({ :name => 'WORLD OF LOLCATS' }).should be_falsey } + specify { expect(cites_eu.update_attributes({ :name => 'WORLD OF LOLCATS' })).to be_falsey } end end describe :destroy do context "when no dependent objects attached" do let(:taxonomy) { create(:taxonomy, :name => 'WILDLIFE') } - specify { taxonomy.destroy.should be_truthy } + specify { expect(taxonomy.destroy).to be_truthy } end context "when dependent objects attached" do let(:taxonomy) { create(:taxonomy, :name => 'WILDLIFE') } let!(:designation) { create(:designation, :taxonomy => taxonomy) } - specify { taxonomy.destroy.should be_falsey } + specify { expect(taxonomy.destroy).to be_falsey } end context "when protected name" do - specify { cites_eu.destroy.should be_falsey } + specify { expect(cites_eu.destroy).to be_falsey } end end end diff --git a/spec/models/term_spec.rb b/spec/models/term_spec.rb index 6b39148e4f..03dc9bddf7 100644 --- a/spec/models/term_spec.rb +++ b/spec/models/term_spec.rb @@ -18,7 +18,7 @@ describe :destroy do context "when no dependent objects attached" do let(:term) { create(:term) } - specify { term.destroy.should be_truthy } + specify { expect(term.destroy).to be_truthy } end context "when dependent objects attached" do let(:term) { create(:term) } @@ -30,16 +30,16 @@ :start_notification_id => create_cites_suspension_notification.id ) } - specify { term.destroy.should be_falsey } + specify { expect(term.destroy).to be_falsey } end context "when CITES quota" do let(:geo_entity) { create(:geo_entity) } let!(:quota) { create(:quota, :terms => [term], :geo_entity_id => geo_entity.id) } - specify { term.destroy.should be_falsey } + specify { expect(term.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :term => term) } - specify { term.destroy.should be_falsey } + specify { expect(term.destroy).to be_falsey } end end end diff --git a/spec/models/trade/annual_report_upload_spec.rb b/spec/models/trade/annual_report_upload_spec.rb index 2838815d38..5009d6b86d 100644 --- a/spec/models/trade/annual_report_upload_spec.rb +++ b/spec/models/trade/annual_report_upload_spec.rb @@ -51,7 +51,7 @@ def invalid_file :csv_source_file => exporter_file ) } - specify { subject.should be_valid } + specify { expect(subject).to be_valid } end context "when uploaded file as importer with exporter column headers" do subject { @@ -61,7 +61,7 @@ def invalid_file :csv_source_file => exporter_file ) } - specify { subject.should_not be_valid } + specify { expect(subject).not_to be_valid } end context "when uploaded file as importer with importer column headers" do subject { @@ -71,7 +71,7 @@ def invalid_file :csv_source_file => importer_file ) } - specify { subject.should be_valid } + specify { expect(subject).to be_valid } end context "when uploaded file as exporter with importer column headers" do subject { @@ -81,7 +81,7 @@ def invalid_file :csv_source_file => importer_file ) } - specify { subject.should_not be_valid } + specify { expect(subject).not_to be_valid } end end @@ -96,7 +96,7 @@ def invalid_file :csv_source_file => importer_file ) } - specify { subject.validation_errors.should be_empty } + specify { expect(subject.validation_errors).to be_empty } end describe :create do @@ -111,7 +111,7 @@ def invalid_file } specify { sandbox_klass = Trade::SandboxTemplate.ar_klass(subject.sandbox.table_name) - sandbox_klass.count.should == 10 + expect(sandbox_klass.count).to eq(10) } end end @@ -125,7 +125,7 @@ def invalid_file ) } specify { - subject.sandbox.should_receive(:destroy) + expect(subject.sandbox).to receive(:destroy) subject.destroy } end diff --git a/spec/models/trade/distinct_values_validation_rule_spec.rb b/spec/models/trade/distinct_values_validation_rule_spec.rb index 313384298b..4c3da03fcb 100644 --- a/spec/models/trade/distinct_values_validation_rule_spec.rb +++ b/spec/models/trade/distinct_values_validation_rule_spec.rb @@ -51,7 +51,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end context 'exporter should not equal importer (I)' do @@ -68,7 +68,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end context 'exporter should not equal country of origin' do @@ -81,7 +81,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end end diff --git a/spec/models/trade/filter_spec.rb b/spec/models/trade/filter_spec.rb index df0087ee40..df9ef90298 100644 --- a/spec/models/trade/filter_spec.rb +++ b/spec/models/trade/filter_spec.rb @@ -12,9 +12,9 @@ :internal => false, :taxon_with_descendants => true }).results } - specify { subject.should include(@shipment1) } - specify { subject.should_not include(@shipment2) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject).not_to include(@shipment2) } + specify { expect(subject.length).to eq(2) } end context "at FAMILY rank" do subject { Trade::Filter.new({ @@ -22,7 +22,7 @@ :internal => false, :taxon_with_descendants => false }).results } - specify { subject.length.should == 0 } + specify { expect(subject.length).to eq(0) } end end context "in the admin interface" do @@ -31,18 +31,18 @@ :taxon_concepts_ids => [@animal_genus.id], :internal => true }).results } - specify { subject.should include(@shipment1) } - specify { subject.should_not include(@shipment2) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject).not_to include(@shipment2) } + specify { expect(subject.length).to eq(2) } end context "at FAMILY rank" do subject { Trade::Filter.new({ :taxon_concepts_ids => [@plant_family.id], :internal => true }).results } - specify { subject.should include(@shipment2) } - specify { subject.should_not include(@shipment1) } - specify { subject.length.should == 4 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject).not_to include(@shipment1) } + specify { expect(subject.length).to eq(4) } end context "at mixed ranks" do subject { @@ -51,9 +51,9 @@ :internal => true }).results } - specify { subject.should include(@shipment1) } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 6 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(6) } end end context "when status N shipments present" do @@ -65,7 +65,7 @@ :taxon_concepts_ids => [@status_N_species.id] }).results } - specify { subject.should include(@shipment_of_status_N) } + specify { expect(subject).to include(@shipment_of_status_N) } end context "when subspecies shipments present" do before(:each) do @@ -76,7 +76,7 @@ :taxon_concepts_ids => [@animal_species.id] }).results } - specify { subject.should include(@shipment_of_subspecies) } + specify { expect(subject).to include(@shipment_of_subspecies) } end context "when synonym subspecies shipments present" do before(:each) do @@ -92,7 +92,7 @@ :taxon_concepts_ids => [@animal_species.id] }).results } - specify { subject.should_not include(@shipment_of_synonym_subspecies) } + specify { expect(subject).not_to include(@shipment_of_synonym_subspecies) } end context "when searching by accepted name" do subject { @@ -100,7 +100,7 @@ :taxon_concepts_ids => [@plant_species.id] }).results } - specify { subject.should include(@shipment_of_synonym_subspecies) } + specify { expect(subject).to include(@shipment_of_synonym_subspecies) } end end end @@ -119,160 +119,160 @@ :reported_taxon_concepts_ids => [@trade_name.id] }).results } - specify { subject.should include(@shipment_of_trade_name) } + specify { expect(subject).to include(@shipment_of_trade_name) } end end context "when searching by appendices" do subject { Trade::Filter.new({ :appendices => ['I'] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(1) } end context "when searching for terms_ids" do subject { Trade::Filter.new({ :terms_ids => [@term_cav.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 3 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(3) } end context "when searching for units_ids" do subject { Trade::Filter.new({ :units_ids => [@unit.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 3 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(3) } end context "when searching for purposes_ids" do subject { Trade::Filter.new({ :purposes_ids => [@purpose.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 7 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(7) } end context "when searching for sources_ids" do context "when code" do subject { Trade::Filter.new({ :sources_ids => [@source.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(2) } end context "when blank" do subject { Trade::Filter.new({ :source_blank => true }).results } - specify { subject.should include(@shipment6) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment6) } + specify { expect(subject.length).to eq(1) } end context "when both code and blank" do subject { Trade::Filter.new({ :sources_ids => [@source.id], :source_blank => true }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 3 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(3) } end context "when wild" do subject { Trade::Filter.new({ :sources_ids => [@source_wild.id], :source_blank => true }).results } - specify { subject.should include(@shipment3) } - specify { subject.length.should == 5 } + specify { expect(subject).to include(@shipment3) } + specify { expect(subject.length).to eq(5) } end context "when wild and internal" do subject { Trade::Filter.new({ :sources_ids => [@source_wild.id], :source_blank => true, :internal => true }).results } - specify { subject.should include(@shipment3) } - specify { subject.length.should == 4 } + specify { expect(subject).to include(@shipment3) } + specify { expect(subject.length).to eq(4) } end end context "when searching for importers_ids" do subject { Trade::Filter.new({ :importers_ids => [@argentina.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(2) } end context "when searching for exporters_ids" do subject { Trade::Filter.new({ :exporters_ids => [@argentina.id] }).results } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 5 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(5) } end context "when searching for countries_of_origin_ids" do subject { Trade::Filter.new({ :countries_of_origin_ids => [@argentina.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(2) } end context "when searching by year" do context "when time range specified" do subject { Trade::Filter.new({ :time_range_start => 2013, :time_range_end => 2015 }).results } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 6 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(6) } end context "when time range specified incorrectly" do subject { Trade::Filter.new({ :time_range_start => 2013, :time_range_end => 2012 }).results } - specify { subject.length.should == 0 } + specify { expect(subject.length).to eq(0) } end context "when time range start specified" do subject { Trade::Filter.new({ :time_range_start => 2012 }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 7 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(7) } end context "when time range end specified" do subject { Trade::Filter.new({ :time_range_end => 2012 }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(1) } end end context "when searching by reporter_type" do context "when reporter type is not I or E" do subject { Trade::Filter.new({ :internal => true, :reporter_type => 'K' }).results } - specify { subject.length.should == 7 } + specify { expect(subject.length).to eq(7) } end context "when reporter type is I" do subject { Trade::Filter.new({ :internal => true, :reporter_type => 'I' }).results } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 5 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(5) } end context "when reporter type is E" do subject { Trade::Filter.new({ :internal => true, :reporter_type => 'E' }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(2) } end end context "when searching by permit" do context "when permit number" do subject { Trade::Filter.new({ :internal => true, :permits_ids => [@export_permit1.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(1) } end context "when blank" do subject { Trade::Filter.new({ :internal => true, :permit_blank => true }).results } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 5 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(5) } end context "when both permit number and blank" do subject { Trade::Filter.new({ :internal => true, :permits_ids => [@export_permit1.id], :permit_blank => true }).results } - specify { subject.length.should == 6 } + specify { expect(subject.length).to eq(6) } end end context "when searching by quantity" do subject { Trade::Filter.new({ :internal => true, :quantity => 20 }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(1) } end end describe :total_cnt do context "when none matches" do subject { Trade::Filter.new({ :appendices => ['III'] }) } - specify { subject.total_cnt.should == 0 } + specify { expect(subject.total_cnt).to eq(0) } end context "when one matches" do subject { Trade::Filter.new({ :appendices => ['I'] }) } - specify { subject.total_cnt.should == 1 } + specify { expect(subject.total_cnt).to eq(1) } end context "when two match" do subject { Trade::Filter.new({ :purposes_ids => [@purpose.id] }) } - specify { subject.total_cnt.should == 7 } + specify { expect(subject.total_cnt).to eq(7) } end end diff --git a/spec/models/trade/inclusion_validation_rule_spec.rb b/spec/models/trade/inclusion_validation_rule_spec.rb index ff6f00ca80..e7612dc869 100644 --- a/spec/models/trade/inclusion_validation_rule_spec.rb +++ b/spec/models/trade/inclusion_validation_rule_spec.rb @@ -149,7 +149,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).should be_empty + expect(subject.validation_errors_for_aru(annual_report_upload)).to be_empty } end context 'trading partner should be a valid iso code' do @@ -176,7 +176,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end context 'term can only be paired with unit as defined by term_trade_codes_pairs table' do @@ -203,7 +203,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end context "when required unit blank" do @@ -215,7 +215,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end @@ -235,7 +235,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 2 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(2) } end context 'taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table' do @@ -256,7 +256,7 @@ end specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end context "when hybrid" do @@ -273,7 +273,7 @@ end specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end diff --git a/spec/models/trade/permit_matcher_spec.rb b/spec/models/trade/permit_matcher_spec.rb index e74cfd9618..10d95e86a8 100644 --- a/spec/models/trade/permit_matcher_spec.rb +++ b/spec/models/trade/permit_matcher_spec.rb @@ -7,23 +7,23 @@ end context "when regular query" do subject { Trade::PermitMatcher.new({ :permit_query => '006' }).results } - specify { subject.should include(@permit) } + specify { expect(subject).to include(@permit) } end context "when wildcard query" do subject { Trade::PermitMatcher.new({ :permit_query => '%AA' }).results } - specify { subject.should include(@permit) } + specify { expect(subject).to include(@permit) } end context "when malicious query" do subject { Trade::PermitMatcher.new({ :permit_query => '006\'' }).results } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end context "when leading whitespace" do subject { Trade::PermitMatcher.new({ :permit_query => ' 006' }).results } - specify { subject.should include(@permit) } + specify { expect(subject).to include(@permit) } end context "when trailing whitespace" do subject { Trade::PermitMatcher.new({ :permit_query => '006AAA ' }).results } - specify { subject.should include(@permit) } + specify { expect(subject).to include(@permit) } end end end diff --git a/spec/models/trade/pov_inclusion_validation_rule_spec.rb b/spec/models/trade/pov_inclusion_validation_rule_spec.rb index 3b02d2b41c..7e028e6f87 100644 --- a/spec/models/trade/pov_inclusion_validation_rule_spec.rb +++ b/spec/models/trade/pov_inclusion_validation_rule_spec.rb @@ -73,7 +73,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end context "when W source and country of origin blank and exporter doesn't match distribution (I)" do @@ -96,7 +96,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end context "when W source and country XX" do @@ -119,7 +119,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).should be_empty + expect(subject.validation_errors_for_aru(@aru)).to be_empty } end context "when W source and country doesn't match distribution of higher taxa" do @@ -142,7 +142,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).should be_empty + expect(subject.validation_errors_for_aru(@aru)).to be_empty } end context "when invalid scope specified" do diff --git a/spec/models/trade/sandbox_spec.rb b/spec/models/trade/sandbox_spec.rb index 876afdd971..6b2a91c240 100644 --- a/spec/models/trade/sandbox_spec.rb +++ b/spec/models/trade/sandbox_spec.rb @@ -47,7 +47,7 @@ specify { sandbox_klass = Trade::SandboxTemplate.ar_klass(subject.table_name) subject.destroy - ActiveRecord::Base.connection.table_exists?('trade_sandbox_1').should be_falsey + expect(ActiveRecord::Base.connection.table_exists?('trade_sandbox_1')).to be_falsey } end diff --git a/spec/models/trade/sandbox_template_spec.rb b/spec/models/trade/sandbox_template_spec.rb index 7b275bfcb5..6be0160989 100644 --- a/spec/models/trade/sandbox_template_spec.rb +++ b/spec/models/trade/sandbox_template_spec.rb @@ -55,7 +55,7 @@ end specify { @shipment1.update_attributes(:taxon_name => canis_aureus.full_name) - @shipment1.reload.taxon_concept_id.should == canis_aureus.id + expect(@shipment1.reload.taxon_concept_id).to eq(canis_aureus.id) } end @@ -76,13 +76,13 @@ ) end specify { - @shipment.reload.taxon_concept_id.should be_nil + expect(@shipment.reload.taxon_concept_id).to be_nil sandbox_klass.update_batch( { taxon_name: 'Canis lupus' }, @validation_error, annual_report_upload ) - @shipment.reload.taxon_concept_id.should == canis_lupus.id + expect(@shipment.reload.taxon_concept_id).to eq(canis_lupus.id) } end diff --git a/spec/models/trade/scoped_inclusion_validation_rule_spec.rb b/spec/models/trade/scoped_inclusion_validation_rule_spec.rb index 1d9b324a38..f55cad3c84 100644 --- a/spec/models/trade/scoped_inclusion_validation_rule_spec.rb +++ b/spec/models/trade/scoped_inclusion_validation_rule_spec.rb @@ -19,7 +19,7 @@ create_taxon_concept_country_of_origin_validation } specify { - subject.validation_errors(@aru).size.should == 0 + expect(subject.validation_errors(@aru).size).to eq(0) } end @@ -46,7 +46,7 @@ create_taxon_concept_country_of_origin_validation } specify { - subject.validation_errors(@aru).size.should == 0 + expect(subject.validation_errors(@aru).size).to eq(0) } end diff --git a/spec/models/trade/shipment_spec.rb b/spec/models/trade/shipment_spec.rb index 65395b15c7..3d5261f867 100644 --- a/spec/models/trade/shipment_spec.rb +++ b/spec/models/trade/shipment_spec.rb @@ -38,15 +38,15 @@ describe :create do context "when reporter_type not given" do subject { build(:shipment, :reporter_type => nil) } - specify { subject.should have(2).error_on(:reporter_type) } + specify { expect(subject.error_on(:reporter_type).size).to eq(2) } end context "when appendix valid" do subject { build(:shipment, :appendix => 'N') } - specify { subject.should be_valid } + specify { expect(subject).to be_valid } end context "when appendix not valid" do subject { build(:shipment, :appendix => 'I/II') } - specify { subject.should have(1).error_on(:appendix) } + specify { expect(subject.error_on(:appendix).size).to eq(1) } end context "when permit numbers given" do before(:each) do @@ -57,13 +57,13 @@ ) end context "when export permit" do - specify { @shipment.export_permit_number.should == 'A' } + specify { expect(@shipment.export_permit_number).to eq('A') } end context "when import permit" do - specify { @shipment.import_permit_number.should == 'B' } + specify { expect(@shipment.import_permit_number).to eq('B') } end context "when origin permit" do - specify { @shipment.origin_permit_number.should == 'C' } + specify { expect(@shipment.origin_permit_number).to eq('C') } end end end @@ -120,7 +120,7 @@ :taxon_concept => @taxon_concept, :appendix => 'II', :year => 2013 ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "invalid" do subject { @@ -129,7 +129,7 @@ :taxon_concept => @taxon_concept, :appendix => 'N', :year => 2013 ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -138,7 +138,7 @@ :taxon_concept => @taxon_concept, :appendix => 'I', :year => 2013 ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end @@ -160,7 +160,7 @@ :taxon_concept => @taxon_concept, :appendix => 'N', :year => 2013 ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end @@ -181,7 +181,7 @@ :taxon_concept => @taxon_concept, :appendix => 'N', :year => 2013 ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end end @@ -206,7 +206,7 @@ :term => @cav, :unit => @bag ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -215,7 +215,7 @@ :term => @cav, :unit => @kil ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end context "blank unit is valid" do subject { @@ -224,7 +224,7 @@ :term => @cav, :unit => nil ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end context "blank unit is invalid" do subject { @@ -233,7 +233,7 @@ :term => @cap, :unit => nil ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end end context "when term + purpose" do @@ -252,7 +252,7 @@ :term => @cav, :purpose => @b ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -261,7 +261,7 @@ :term => @cav, :purpose => @p ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when species name + term" do @@ -280,7 +280,7 @@ :taxon_concept => @taxon_concept, :term => @cav ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -289,7 +289,7 @@ :taxon_concept => @taxon_concept, :term => @bal ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when species name + country of origin" do @@ -305,7 +305,7 @@ :country_of_origin => @poland ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -316,7 +316,7 @@ :country_of_origin => @argentina ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end context "blank" do subject { @@ -327,7 +327,7 @@ :country_of_origin => nil ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when species name + exporter" do @@ -344,7 +344,7 @@ :exporter => @poland ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -356,7 +356,7 @@ :exporter => @argentina ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end context "valid with XX" do subject { @@ -368,7 +368,7 @@ :exporter => @xx ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when exporter + country of origin" do @@ -384,7 +384,7 @@ :country_of_origin => @argentina ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -395,7 +395,7 @@ :country_of_origin => @argentina ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when exporter + importer" do @@ -411,7 +411,7 @@ :exporter => @argentina ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -422,7 +422,7 @@ :exporter => @argentina ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when species name + source code" do @@ -442,7 +442,7 @@ :source => @artificial ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -452,7 +452,7 @@ :source => @wild ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end end diff --git a/spec/models/trade/shipments_comptab_export_spec.rb b/spec/models/trade/shipments_comptab_export_spec.rb index 677aeb07eb..2371af5826 100644 --- a/spec/models/trade/shipments_comptab_export_spec.rb +++ b/spec/models/trade/shipments_comptab_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsComptabExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsComptabExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsComptabExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsComptabExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end end diff --git a/spec/models/trade/shipments_export_spec.rb b/spec/models/trade/shipments_export_spec.rb index 5fb7f56e3e..04c591339b 100644 --- a/spec/models/trade/shipments_export_spec.rb +++ b/spec/models/trade/shipments_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end end diff --git a/spec/models/trade/shipments_gross_exports_export_spec.rb b/spec/models/trade/shipments_gross_exports_export_spec.rb index 731238ed3a..a24542671e 100644 --- a/spec/models/trade/shipments_gross_exports_export_spec.rb +++ b/spec/models/trade/shipments_gross_exports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/shipments_gross_imports_export_spec.rb b/spec/models/trade/shipments_gross_imports_export_spec.rb index 028853fbe1..a4e5f25c0e 100644 --- a/spec/models/trade/shipments_gross_imports_export_spec.rb +++ b/spec/models/trade/shipments_gross_imports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/shipments_net_exports_export_spec.rb b/spec/models/trade/shipments_net_exports_export_spec.rb index e7dd4e576d..60a11f6afc 100644 --- a/spec/models/trade/shipments_net_exports_export_spec.rb +++ b/spec/models/trade/shipments_net_exports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsNetExportsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsNetExportsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsNetExportsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsNetExportsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/shipments_net_imports_export_spec.rb b/spec/models/trade/shipments_net_imports_export_spec.rb index 5bca60f606..2cf261f6ea 100644 --- a/spec/models/trade/shipments_net_imports_export_spec.rb +++ b/spec/models/trade/shipments_net_imports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsNetImportsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsNetImportsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsNetImportsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsNetImportsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb b/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb index c141d8e3cb..92e5cbbe5e 100644 --- a/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb +++ b/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb @@ -76,7 +76,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 0 + expect(subject.validation_errors_for_aru(@aru).size).to eq(0) } end context "when old listing" do @@ -93,12 +93,12 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } specify { subject.refresh_errors_if_needed(@aru) ve = subject.validation_errors_for_aru(@aru).first - ve.error_message.should == 'taxon_name Loxodonta africana with appendix II with year 1996 is invalid' + expect(ve.error_message).to eq('taxon_name Loxodonta africana with appendix II with year 1996 is invalid') } end context "when appendix N and CITES listed" do @@ -112,12 +112,12 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } specify { subject.refresh_errors_if_needed(@aru) ve = subject.validation_errors_for_aru(@aru).first - ve.error_message.should == 'taxon_name Loxodonta africana with appendix N with year 1996 is invalid' + expect(ve.error_message).to eq('taxon_name Loxodonta africana with appendix N with year 1996 is invalid') } end context "when reported under a synonym, but otherwise fine" do @@ -131,7 +131,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 0 + expect(subject.validation_errors_for_aru(@aru).size).to eq(0) } end context "when hybrid" do @@ -168,7 +168,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 0 + expect(subject.validation_errors_for_aru(@aru).size).to eq(0) } end end @@ -184,7 +184,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 0 + expect(subject.validation_errors_for_aru(@aru).size).to eq(0) } end context "when not CITES listed and not EU listed" do @@ -199,7 +199,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end end diff --git a/spec/models/trade/taxon_concept_source_validation_rule_spec.rb b/spec/models/trade/taxon_concept_source_validation_rule_spec.rb index af16dc1b1d..28b82a9ee2 100644 --- a/spec/models/trade/taxon_concept_source_validation_rule_spec.rb +++ b/spec/models/trade/taxon_concept_source_validation_rule_spec.rb @@ -41,12 +41,12 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } specify { subject.refresh_errors_if_needed(annual_report_upload) ve = subject.validation_errors_for_aru(annual_report_upload).first - ve.error_message.should == "taxon_name #{@animal.full_name} with source_code A is invalid" + expect(ve.error_message).to eq("taxon_name #{@animal.full_name} with source_code A is invalid") } end context "when species name is from Kingdom Plantae, source_code can't be C or R" do @@ -62,7 +62,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 2 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(2) } end end diff --git a/spec/models/trade/validation_rule_spec.rb b/spec/models/trade/validation_rule_spec.rb index 3f8b4794f1..b236d58596 100644 --- a/spec/models/trade/validation_rule_spec.rb +++ b/spec/models/trade/validation_rule_spec.rb @@ -137,7 +137,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end @@ -158,7 +158,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end @@ -175,7 +175,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end diff --git a/spec/models/trade_restriction_spec.rb b/spec/models/trade_restriction_spec.rb index f2b0b23afe..00b953f3b6 100644 --- a/spec/models/trade_restriction_spec.rb +++ b/spec/models/trade_restriction_spec.rb @@ -46,11 +46,11 @@ end it "should return @quota1 if filter set to current" do result = Quota.filter_is_current("current") - result.should == [@quota1] + expect(result).to eq([@quota1]) end it 'should return both @quota1 and @quota2 if filter set to "all"' do result = Quota.filter_is_current("all") - result.should =~ [@quota1, @quota2] + expect(result).to match_array([@quota1, @quota2]) end end @@ -67,15 +67,15 @@ end it 'should get all quotas if geo_entities filter not set' do result = Quota.filter_geo_entities({}) - result.should =~ [@quota1, @quota2, @quota3, @quota4] + expect(result).to match_array([@quota1, @quota2, @quota3, @quota4]) end it 'should return quota1 and quota3 if geo_entities filter set to @geo_entity1' do result = Quota.filter_geo_entities({ "geo_entities_ids" => [@geo_entity1.id] }) - result.should =~ [@quota1, @quota3] + expect(result).to match_array([@quota1, @quota3]) end it 'should return quota1, quota3, and quota4 if geo_entities filter set to @geo_entity1 and @geo_entity3' do result = Quota.filter_geo_entities({ "geo_entities_ids" => [@geo_entity1.id, @geo_entity3.id] }) - result.should =~ [@quota1, @quota3, @quota4] + expect(result).to match_array([@quota1, @quota3, @quota4]) end end @@ -89,15 +89,15 @@ end it 'should get all quotas if years filter not set' do result = Quota.filter_years({}) - result.should =~ [@quota1, @quota2, @quota3, @quota4] + expect(result).to match_array([@quota1, @quota2, @quota3, @quota4]) end it 'should return quota1 and quota3 if years filter set to 2012' do result = Quota.filter_years({ "years" => [2012] }) - result.should =~ [@quota1, @quota3] + expect(result).to match_array([@quota1, @quota3]) end it 'should return quota1, quota3, and quota4 if years filter set to 2012 and 2013' do result = Quota.filter_years({ "years" => [2012, 2013] }) - result.should =~ [@quota1, @quota3, @quota4] + expect(result).to match_array([@quota1, @quota3, @quota4]) end end end diff --git a/spec/models/unit_spec.rb b/spec/models/unit_spec.rb index ad8e4725dc..296529fc5c 100644 --- a/spec/models/unit_spec.rb +++ b/spec/models/unit_spec.rb @@ -18,18 +18,18 @@ describe :destroy do context "when no dependent objects attached" do let(:unit) { create(:unit) } - specify { unit.destroy.should be_truthy } + specify { expect(unit.destroy).to be_truthy } end context "when dependent objects attached" do let(:unit) { create(:unit) } context "when quotas" do let(:geo_entity) { create(:geo_entity) } let!(:quota) { create(:quota, :unit => unit, :geo_entity_id => geo_entity.id) } - specify { unit.destroy.should be_falsey } + specify { expect(unit.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :unit => unit) } - specify { unit.destroy.should be_falsey } + specify { expect(unit.destroy).to be_falsey } end end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 27c62321ac..94508582db 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -36,7 +36,7 @@ describe :destroy do context "when no dependent objects attached" do let(:user) { create(:user) } - specify { user.destroy.should be_truthy } + specify { expect(user.destroy).to be_truthy } end context "when dependent objects attached" do let(:user) { create(:user) } @@ -44,7 +44,7 @@ user.make_current create(:shipment) end - specify { user.destroy.should be_falsey } + specify { expect(user.destroy).to be_falsey } end end @@ -55,38 +55,38 @@ context "when is a Data Manager" do let(:user) { create(:user, role: User::MANAGER) } - it { should be_able_to(:manage, :all) } + it { is_expected.to be_able_to(:manage, :all) } end context "when is a Data Contributor" do let(:user) { create(:user, role: User::CONTRIBUTOR) } - it { should be_able_to(:create, TaxonConcept) } - it { should_not be_able_to(:destroy, TaxonConcept) } + it { is_expected.to be_able_to(:create, TaxonConcept) } + it { is_expected.not_to be_able_to(:destroy, TaxonConcept) } end context "when is a E-library Viewer" do let(:user) { create(:user, role: User::ELIBRARY_USER) } - it { should_not be_able_to(:manage, TaxonConcept) } + it { is_expected.not_to be_able_to(:manage, TaxonConcept) } end context "when is an API User" do let(:user) { create(:user, role: User::API_USER) } - it { should_not be_able_to(:manage, TaxonConcept) } + it { is_expected.not_to be_able_to(:manage, TaxonConcept) } end context "when is a Secretariat" do let(:user) { create(:user, role: User::SECRETARIAT) } - it { should_not be_able_to(:create, :all) } - it { should_not be_able_to(:update, :all) } - it { should_not be_able_to(:destroy, :all) } + it { is_expected.not_to be_able_to(:create, :all) } + it { is_expected.not_to be_able_to(:update, :all) } + it { is_expected.not_to be_able_to(:destroy, :all) } end context "when is not active" do let(:user) { create(:user, role: User::MANAGER, is_active: false) } - it { should_not be_able_to(:create, :all) } - it { should_not be_able_to(:update, :all) } - it { should_not be_able_to(:destroy, :all) } + it { is_expected.not_to be_able_to(:create, :all) } + it { is_expected.not_to be_able_to(:update, :all) } + it { is_expected.not_to be_able_to(:destroy, :all) } end end end diff --git a/spec/workers/eu_regulation_activation_worker_spec.rb b/spec/workers/eu_regulation_activation_worker_spec.rb index dadd184bf5..3e9789cd54 100644 --- a/spec/workers/eu_regulation_activation_worker_spec.rb +++ b/spec/workers/eu_regulation_activation_worker_spec.rb @@ -29,16 +29,16 @@ EuRegulationActivationWorker.new.perform(eu_regulation.id, true) end - specify { eu_regulation.listing_changes.reload.first.is_current.should be_truthy } - specify { prev_eu_regulation.listing_changes.reload.first.is_current.should be_truthy } + specify { expect(eu_regulation.listing_changes.reload.first.is_current).to be_truthy } + specify { expect(prev_eu_regulation.listing_changes.reload.first.is_current).to be_truthy } describe "Set old EU regulation to false" do before do EuRegulationActivationWorker.new.perform(prev_eu_regulation.id, false) end - specify { eu_regulation.listing_changes.reload.first.is_current.should be_truthy } - specify { prev_eu_regulation.listing_changes.reload.first.is_current.should be_falsey } + specify { expect(eu_regulation.listing_changes.reload.first.is_current).to be_truthy } + specify { expect(prev_eu_regulation.listing_changes.reload.first.is_current).to be_falsey } end end diff --git a/spec/workers/event_listing_changes_copy_worker_spec.rb b/spec/workers/event_listing_changes_copy_worker_spec.rb index 7538921e6f..2650a87b06 100644 --- a/spec/workers/event_listing_changes_copy_worker_spec.rb +++ b/spec/workers/event_listing_changes_copy_worker_spec.rb @@ -39,14 +39,14 @@ ) } before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - specify { eu_regulation.listing_changes.reload.count.should == 1 } - specify { eu_regulation.listing_changes.first.is_current.should be_falsey } + specify { expect(eu_regulation.listing_changes.reload.count).to eq(1) } + specify { expect(eu_regulation.listing_changes.first.is_current).to be_falsey } end context "when copy into current regulation" do before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - specify { eu_regulation.listing_changes.reload.count.should == 1 } - specify { eu_regulation.listing_changes.first.is_current.should be_truthy } + specify { expect(eu_regulation.listing_changes.reload.count).to eq(1) } + specify { expect(eu_regulation.listing_changes.first.is_current).to be_truthy } end context "when exclusion" do @@ -67,10 +67,10 @@ } before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - specify { eu_regulation.listing_changes.reload.count.should == 1 } - specify { eu_regulation.listing_changes.first.exclusions.count.should == 2 } - specify { eu_regulation.listing_changes.first.taxonomic_exclusions.count.should == 1 } - specify { eu_regulation.listing_changes.first.geographic_exclusions.count.should == 1 } + specify { expect(eu_regulation.listing_changes.reload.count).to eq(1) } + specify { expect(eu_regulation.listing_changes.first.exclusions.count).to eq(2) } + specify { expect(eu_regulation.listing_changes.first.taxonomic_exclusions.count).to eq(1) } + specify { expect(eu_regulation.listing_changes.first.geographic_exclusions.count).to eq(1) } end end diff --git a/spec/workers/quotas_copy_worker_spec.rb b/spec/workers/quotas_copy_worker_spec.rb index 996be3e8b8..847957f607 100644 --- a/spec/workers/quotas_copy_worker_spec.rb +++ b/spec/workers/quotas_copy_worker_spec.rb @@ -44,10 +44,10 @@ before(:each) do QuotasCopyWorker.new.perform(job_defaults) end - specify { Quota.count(true).should == 2 } - specify { Quota.where(:is_current => true).count(true).should == 1 } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).first.id.should == quota.id } + specify { expect(Quota.count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } end describe "Try to copy quota from wrong year" do @@ -56,9 +56,9 @@ "from_year" => quota.start_date.year + 1 })) end - specify { Quota.count(true).should == 1 } - specify { Quota.where(:is_current => true).count(true).should == 1 } - specify { Quota.where(:is_current => false).count(true).should == 0 } + specify { expect(Quota.count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(0) } end describe "Copy quota when there are no current quotas" do @@ -67,9 +67,9 @@ quota.save QuotasCopyWorker.new.perform(job_defaults) end - specify { Quota.count(true).should == 1 } - specify { Quota.where(:is_current => true).count(true).should == 0 } - specify { Quota.where(:is_current => false).count(true).should == 1 } + specify { expect(Quota.count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(0) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } end describe "When multiple quotas copy quota for given country" do @@ -87,11 +87,11 @@ "included_geo_entities_ids" => [geo_entity.id] })) end - specify { Quota.count(true).should == 3 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).first.id.should == quota.id } + specify { expect(Quota.count(true)).to eq(3) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } end describe "When multiple quotas copy quota for both countries" do @@ -109,11 +109,11 @@ "included_geo_entities_ids" => [geo_entity.id.to_s, geo_entity2.id.to_s] })) end - specify { Quota.count(true).should == 4 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => false).count(true).should == 2 } - specify { Quota.where(:is_current => false).map(&:id).should include(quota.id) } - specify { Quota.where(:is_current => false).map(&:id).should include(@quota2.id) } + specify { expect(Quota.count(true)).to eq(4) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => false).map(&:id)).to include(quota.id) } + specify { expect(Quota.where(:is_current => false).map(&:id)).to include(@quota2.id) } end describe "When multiple quotas don't copy quota for given country" do @@ -131,11 +131,11 @@ "excluded_geo_entities_ids" => [geo_entity2.id.to_s] })) end - specify { Quota.count(true).should == 3 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).first.id.should == quota.id } + specify { expect(Quota.count(true)).to eq(3) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } end describe "When multiple quotas copy quota for given taxon_concept" do @@ -152,11 +152,11 @@ "included_taxon_concepts_ids" => quota.taxon_concept_id.to_s })) end - specify { Quota.count(true).should == 3 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).map(&:id).should include(quota.id) } + specify { expect(Quota.count(true)).to eq(3) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).map(&:id)).to include(quota.id) } end describe "When multiple quotas copy quota for both taxon_concepts" do @@ -174,11 +174,11 @@ "included_taxon_concepts_ids" => "#{taxon_concept.id},#{tc.id}" })) end - specify { Quota.count(true).should == 4 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should_not include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 2 } - specify { Quota.where(:is_current => false).map(&:id).should include(quota.id) } + specify { expect(Quota.count(true)).to eq(4) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => false).map(&:id)).to include(quota.id) } end describe "When multiple quotas don't copy quota for given taxon_concept" do @@ -195,11 +195,11 @@ "excluded_taxon_concepts_ids" => tc.id.to_s })) end - specify { Quota.count(true).should == 3 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).first.id.should == quota.id } + specify { expect(Quota.count(true)).to eq(3) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } end describe "When text to replace passed, should be replaced" do @@ -219,14 +219,14 @@ })) end - specify { Quota.count(true).should == 4 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should_not include(@quota2.id) } - specify { Quota.where(:is_current => true).map(&:id).should_not include(quota.id) } - specify { Quota.where(:is_current => false).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:notes).should include(@quota2.notes) } - specify { Quota.where(:is_current => true).map(&:notes).should_not include(quota.notes) } - specify { Quota.where(:is_current => true).map(&:notes).should include('Le Salmon is my favourite fish') } + specify { expect(Quota.count(true)).to eq(4) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(@quota2.id) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(quota.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:notes)).to include(@quota2.notes) } + specify { expect(Quota.where(:is_current => true).map(&:notes)).not_to include(quota.notes) } + specify { expect(Quota.where(:is_current => true).map(&:notes)).to include('Le Salmon is my favourite fish') } end describe "When url passed, should be replaced" do @@ -242,11 +242,11 @@ :notes => "Derp di doo wildlife") QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) end - specify { Quota.count(true).should == 4 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should_not include(@quota2.id) } - specify { Quota.where(:is_current => true).map(&:id).should_not include(quota.id) } - specify { Quota.where(:is_current => false).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:url).should include('http://myurl.co.uk') } + specify { expect(Quota.count(true)).to eq(4) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(@quota2.id) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(quota.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:url)).to include('http://myurl.co.uk') } end end From 7cb9813a7bf61aab65e08df77e61136a6e52ee1f Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 15:36:38 +0000 Subject: [PATCH 038/334] https://guides.rubyonrails.org/v4.2/upgrading_ruby_on_rails.html#action-mailer --- Gemfile | 2 +- app/workers/changes_history_generator_worker.rb | 4 ++-- app/workers/submission_worker.rb | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 08129b7b17..aa9bc31fbb 100644 --- a/Gemfile +++ b/Gemfile @@ -32,7 +32,7 @@ gem 'wicked', '1.3.3' gem 'groupdate', '2.4.0' gem "chartkick", '1.3.2' gem 'rubyzip', '1.1.7' -gem 'responders', '~> 2.0' # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#responders +gem 'responders', '~> 2.0' # https://guides.rubyonrails.org/v4.2/upgrading_ruby_on_rails.html#responders gem 'sidekiq', '4.2.10' gem 'sidekiq-status', '1.1.4' # TODO: latest is 3.0.3 @ 2023 diff --git a/app/workers/changes_history_generator_worker.rb b/app/workers/changes_history_generator_worker.rb index 1fecb21e9c..c26e72d578 100644 --- a/app/workers/changes_history_generator_worker.rb +++ b/app/workers/changes_history_generator_worker.rb @@ -10,7 +10,7 @@ def perform(aru_id, user_id) # catch this exception so that retry is not scheduled Rails.logger.warn "CITES Report #{aru_id} not found" Appsignal.add_exception(e) if defined? Appsignal - NotificationMailer.changelog_failed(user, aru).deliver + NotificationMailer.changelog_failed(user, aru).deliver_now end user = User.find(user_id) @@ -29,7 +29,7 @@ def perform(aru_id, user_id) Appsignal.add_exception(e) if defined? Appsignal end - NotificationMailer.changelog(user, aru, tempfile).deliver + NotificationMailer.changelog(user, aru, tempfile).deliver_now tempfile.delete diff --git a/app/workers/submission_worker.rb b/app/workers/submission_worker.rb index ed2ef6a5e0..ee3e383741 100644 --- a/app/workers/submission_worker.rb +++ b/app/workers/submission_worker.rb @@ -10,14 +10,14 @@ def perform(aru_id, submitter_id) # catch this exception so that retry is not scheduled Rails.logger.warn "CITES Report #{aru_id} not found" Appsignal.add_exception(e) if defined? Appsignal - NotificationMailer.changelog_failed(submitter, aru).deliver + NotificationMailer.changelog_failed(submitter, aru).deliver_now return false end duplicates = aru.sandbox.check_for_duplicates_in_shipments if duplicates.present? tempfile = Trade::ChangelogCsvGenerator.call(aru, submitter, duplicates) - NotificationMailer.duplicates(submitter, aru, tempfile).deliver + NotificationMailer.duplicates(submitter, aru, tempfile).deliver_now return false end @@ -47,7 +47,7 @@ def perform(aru_id, submitter_id) number_of_records_submitted: records_submitted }) - NotificationMailer.changelog(submitter, aru, tempfile).deliver + NotificationMailer.changelog(submitter, aru, tempfile).deliver_now tempfile.delete end From f99b0e099035c2ba50707a66d43ca82b72a93e77 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 15:47:29 +0000 Subject: [PATCH 039/334] remove outdated gem from Gemfile --- Gemfile | 2 -- Gemfile.lock | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index aa9bc31fbb..7efbb68ddb 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,6 @@ gem 'pg', '0.21.0' # TODO: latest 1.5.4, need Rails 5 to upgrade to 1.0.0 gem 'pg_array_parser', '0.0.9' # TODO: latest 0.0.9 gem 'nested-hstore', '0.1.2' # TODO: latest 0.1.2 @ 2015 gem 'pg_search', '0.6.4' -gem 'foreigner', '1.5.0' gem 'oj', '3.14.2' # optimised JSON (picked by multi_json) gem 'nokogiri', '1.12.5' gem 'inherited_resources', '1.7.2' # TODO: need upgrade when upgrade to Rails 5 @@ -94,7 +93,6 @@ gem 'rest-client', '1.8.0', require: false group :development do # Access an IRB console on exception pages or by using <%= console %> in views gem 'web-console', '~> 2.0' - gem 'immigrant', '0.1.4' gem "guard-livereload", '1.1.3' gem "rack-livereload", '0.3.11' gem "guard-bundler", '1.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index ebadd7b808..d0c2932997 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -202,8 +202,6 @@ GEM ffi (1.16.3) font-awesome-rails (4.5.0.1) railties (>= 3.2, < 5.1) - foreigner (1.5.0) - activerecord (>= 3.0.0) formatador (1.1.0) geocoder (1.8.2) geoip (1.3.5) @@ -242,9 +240,6 @@ GEM multi_xml (>= 0.5.2) i18n (0.9.5) concurrent-ruby (~> 1.0) - immigrant (0.1.4) - activerecord (>= 3.0) - foreigner (>= 1.2.1) inherited_resources (1.7.2) actionpack (>= 3.2, < 5.2.x) has_scope (~> 0.6) @@ -401,7 +396,7 @@ GEM thor (>= 0.18.1, < 2.0) rainbow (2.2.2) rake - rake (10.0.4) + rake (13.1.0) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) @@ -611,7 +606,6 @@ DEPENDENCIES ember-source (= 1.6.1) factory_girl_rails (= 4.2.1) font-awesome-rails (= 4.5.0.1) - foreigner (= 1.5.0) geoip (= 1.3.5) gon (= 5.2.0) groupdate (= 2.4.0) @@ -619,7 +613,6 @@ DEPENDENCIES guard-livereload (= 1.1.3) handlebars-source (= 1.0.12) httparty (= 0.16.2) - immigrant (= 0.1.4) inherited_resources (= 1.7.2) jquery-cookie-rails (= 1.3.1.1) jquery-mousewheel-rails (= 0.0.9) @@ -646,7 +639,6 @@ DEPENDENCIES rack-livereload (= 0.3.11) rails (= 4.2.11.3) rails-observers (= 0.1.5) - rake (= 10.0.4) rbnacl (= 4.0.2) rbnacl-libsodium (= 1.0.16) redis-rails (= 4.0.0) From 4c0655d84fd71e0af3a1a3a24c728cf14aa1bffc Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 15:47:45 +0000 Subject: [PATCH 040/334] fix rake for 4.2 --- Gemfile | 2 -- bin/rake | 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 7efbb68ddb..a44e2502fc 100644 --- a/Gemfile +++ b/Gemfile @@ -141,8 +141,6 @@ group :test do gem 'capybara', '2.2.1' end -gem 'rake', '10.0.4' - gem 'slim', '1.3.6' gem 'memcache-client', '1.8.5' diff --git a/bin/rake b/bin/rake index 615dea9089..17240489f6 100755 --- a/bin/rake +++ b/bin/rake @@ -1,8 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path('../spring', __FILE__) -rescue LoadError => e - raise unless e.message.include?('spring') -end -require 'bundler/setup' -load Gem.bin_path('rake', 'rake') +require_relative '../config/boot' +require 'rake' +Rake.application.run From 86f3391279b5aec2b1ccc5bf01119c8aa00750f2 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 15:58:39 +0000 Subject: [PATCH 041/334] rake rails:update --- bin/bundle | 3 +++ config/application.rb | 9 +++------ config/environment.rb | 6 +++--- config/environments/development.rb | 4 ++-- config/environments/production.rb | 10 +++++----- config/environments/test.rb | 6 +++--- config/initializers/filter_parameter_logging.rb | 4 ++++ config/initializers/inflections.rb | 11 ++++++----- config/initializers/session_store.rb | 7 +------ config/initializers/wrap_parameters.rb | 8 ++++---- 10 files changed, 34 insertions(+), 34 deletions(-) create mode 100755 bin/bundle create mode 100644 config/initializers/filter_parameter_logging.rb diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 0000000000..66e9889e8b --- /dev/null +++ b/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/config/application.rb b/config/application.rb index 410faee342..d17368955a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -9,12 +9,9 @@ require "susy" # require "rails/test_unit/railtie" -if defined?(Bundler) - # If you precompile assets before deploying to production, use this line - Bundler.require(*Rails.groups) # (:assets => %w(development test))) - # If you want your assets lazily compiled in production, use this line - # Bundler.require(:default, :assets, Rails.env) -end +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) module SAPI class Application < Rails::Application diff --git a/config/environment.rb b/config/environment.rb index 37d65bc0a4..ee8d90dc65 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ -# Load the rails application +# Load the Rails application. require File.expand_path('../application', __FILE__) -# Initialize the rails application -SAPI::Application.initialize! +# Initialize the Rails application. +Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 5d6b9da394..612a1a3dca 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,5 +1,5 @@ -SAPI::Application.configure do - # Settings specified here will take precedence over those in config/application.rb +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development diff --git a/config/environments/production.rb b/config/environments/production.rb index d29e39071a..7e408b0159 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,5 +1,5 @@ -SAPI::Application.configure do - # Settings specified here will take precedence over those in config/application.rb +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true @@ -28,7 +28,7 @@ config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass - # Don't fallback to assets pipeline if a precompiled asset is missed. + # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false # Asset digests allow you to set far-future HTTP expiration dates on all assets, @@ -38,8 +38,8 @@ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache - config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true diff --git a/config/environments/test.rb b/config/environments/test.rb index dfaa173311..4472f8ae8f 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,5 +1,5 @@ -SAPI::Application.configure do - # Settings specified here will take precedence over those in config/application.rb +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that @@ -35,7 +35,7 @@ # Randomize the order test cases are executed. config.active_support.test_order = :random - # Print deprecation notices to the stderr + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr # Raises error for missing translations diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000000..4a994e1e7b --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 7394d53883..1217b93d33 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -1,16 +1,17 @@ # Be sure to restart your server when you modify this file. -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end -# + # These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections do |inflect| +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index ad78ad08ca..9f481237fd 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,8 +1,3 @@ # Be sure to restart your server when you modify this file. -SAPI::Application.config.session_store :cookie_store, key: '_SAPI_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# SAPI::Application.config.session_store :active_record_store +Rails.application.config.session_store :cookie_store, key: '_SAPI_session' diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 3bdf8e79c1..33725e95fd 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -1,14 +1,14 @@ # Be sure to restart your server when you modify this file. -# + # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] + wrap_parameters format: [:json] if respond_to?(:wrap_parameters) end -# Disable root element in JSON by default. +# To enable root element in JSON for ActiveRecord objects. # ActiveSupport.on_load(:active_record) do -# self.include_root_in_json = false +# self.include_root_in_json = true # end From 5d8009ede748cb9deec217db22252fc974861445 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 17:23:32 +0000 Subject: [PATCH 042/334] fix Arel --- .../trade/taxon_concept_appendix_year_validation_rule.rb | 4 ++-- app/models/trade/taxon_concept_source_validation_rule.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/trade/taxon_concept_appendix_year_validation_rule.rb b/app/models/trade/taxon_concept_appendix_year_validation_rule.rb index 675b324ec0..174bb01504 100644 --- a/app/models/trade/taxon_concept_appendix_year_validation_rule.rb +++ b/app/models/trade/taxon_concept_appendix_year_validation_rule.rb @@ -35,8 +35,8 @@ def validation_errors_for_shipment(shipment) def year_join_node(s, v) sandbox_year = Arel::Nodes::NamedFunction.new "CAST", [s['year'].as('INT')] - effective_from = Arel::Nodes::NamedFunction.new "DATE_PART", ["year", v['effective_from']] - effective_to = Arel::Nodes::NamedFunction.new "DATE_PART", ["year", v['effective_to']] + effective_from = Arel::Nodes::NamedFunction.new "DATE_PART", [Arel::Nodes.build_quoted("year"), v['effective_from']] + effective_to = Arel::Nodes::NamedFunction.new "DATE_PART", [Arel::Nodes.build_quoted("year"), v['effective_to']] effective_from.lteq(sandbox_year).and(effective_to.gteq(sandbox_year).or(effective_to.eq(nil))) end diff --git a/app/models/trade/taxon_concept_source_validation_rule.rb b/app/models/trade/taxon_concept_source_validation_rule.rb index 746290249c..4d2a649a10 100644 --- a/app/models/trade/taxon_concept_source_validation_rule.rb +++ b/app/models/trade/taxon_concept_source_validation_rule.rb @@ -43,7 +43,7 @@ def matching_records_arel(table_name) upper_kingdom_name = Arel::Nodes::NamedFunction.new( "UPPER", - [Arel::SqlLiteral.new("taxon_concepts.data->'kingdom_name'")] + [Arel::Nodes::SqlLiteral.new("taxon_concepts.data->'kingdom_name'")] ) arel = s.project( From 1cdca7521f2ad065323f4c164cf3558d3a08ae1f Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 17:23:52 +0000 Subject: [PATCH 043/334] fix Arel --- .../trade/taxon_concept_appendix_year_validation_rule.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/trade/taxon_concept_appendix_year_validation_rule.rb b/app/models/trade/taxon_concept_appendix_year_validation_rule.rb index 174bb01504..5c98456d99 100644 --- a/app/models/trade/taxon_concept_appendix_year_validation_rule.rb +++ b/app/models/trade/taxon_concept_appendix_year_validation_rule.rb @@ -22,8 +22,8 @@ def validation_errors_for_shipment(shipment) # if it is, check if it has a match in valid values view v = Arel::Table.new(valid_values_view) appendix_node = v['appendix'].eq(shipment.appendix) - effective_from = Arel::Nodes::NamedFunction.new "DATE_PART", ["year", v['effective_from']] - effective_to = Arel::Nodes::NamedFunction.new "DATE_PART", ["year", v['effective_to']] + effective_from = Arel::Nodes::NamedFunction.new "DATE_PART", [Arel::Nodes.build_quoted("year"), v['effective_from']] + effective_to = Arel::Nodes::NamedFunction.new "DATE_PART", [Arel::Nodes.build_quoted("year"), v['effective_to']] year_node = effective_from.lteq(shipment.year).and(effective_to.gteq(shipment.year).or(effective_to.eq(nil))) taxon_concept_node = v['taxon_concept_id'].eq(shipment.taxon_concept_id) conditions = appendix_node.and(year_node).and(taxon_concept_node) From 9aa27180bbf829d77a1918c77f49ea8d1ab720e1 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 17:43:09 +0000 Subject: [PATCH 044/334] upgrade pg_search gem to support Rails 4.2 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index a44e2502fc..5c94406ac0 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ gem 'dalli', '2.7.10' gem 'pg', '0.21.0' # TODO: latest 1.5.4, need Rails 5 to upgrade to 1.0.0 gem 'pg_array_parser', '0.0.9' # TODO: latest 0.0.9 gem 'nested-hstore', '0.1.2' # TODO: latest 0.1.2 @ 2015 -gem 'pg_search', '0.6.4' +gem 'pg_search', '1.0.6' # TODO: update to newer version when upgrade to Rails 5 gem 'oj', '3.14.2' # optimised JSON (picked by multi_json) gem 'nokogiri', '1.12.5' gem 'inherited_resources', '1.7.2' # TODO: need upgrade when upgrade to Rails 5 diff --git a/Gemfile.lock b/Gemfile.lock index d0c2932997..c709fef0cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -339,7 +339,7 @@ GEM pdfkit (0.8.4.2) pg (0.21.0) pg_array_parser (0.0.9) - pg_search (0.6.4) + pg_search (1.0.6) activerecord (>= 3.1) activesupport (>= 3.1) arel @@ -631,7 +631,7 @@ DEPENDENCIES pdfkit (= 0.8.4.2) pg (= 0.21.0) pg_array_parser (= 0.0.9) - pg_search (= 0.6.4) + pg_search (= 1.0.6) prawn (= 0.13.2) protected_attributes (= 1.1.4) quiet_assets (= 1.1.0) From d87ae49f7b98e8da76d0c51906b687e1164e0dae Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Tue, 9 Jan 2024 17:52:59 +0000 Subject: [PATCH 045/334] https://github.com/heartcombo/devise/wiki/How-To:-Upgrade-to-Devise-4.4.0 --- Gemfile | 2 +- Gemfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 5c94406ac0..64c8dafa8b 100644 --- a/Gemfile +++ b/Gemfile @@ -22,7 +22,7 @@ gem 'inherited_resources', '1.7.2' # TODO: need upgrade when upgrade to Rails 5 gem 'traco', '2.0.0' # gem 'strong_parameters' gem 'protected_attributes', '1.1.4' # TODO: Only support Rails version < 5 (https://github.com/rails/protected_attributes) -gem 'devise', '4.4.0' +gem 'devise', '4.4.3' gem 'cancancan', '1.17.0' # TODO, need upgrade to 2.0 for Rails 5 gem 'ahoy_matey', '1.6.1' # TODO: latest 5.0.2. Can't upgrade to 2.0 until upgrade to Rails 5 gem 'browser', '2.5.3' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 diff --git a/Gemfile.lock b/Gemfile.lock index c709fef0cc..67c8bd17ab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -159,10 +159,10 @@ GEM dalli (2.7.10) database_cleaner (1.2.0) debug_inspector (1.2.0) - devise (4.4.0) + devise (4.4.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.2) + railties (>= 4.1.0, < 6.0) responders warden (~> 1.2.3) diff-lcs (1.5.0) @@ -598,7 +598,7 @@ DEPENDENCIES coveralls (= 0.7.1) dalli (= 2.7.10) database_cleaner (= 1.2.0) - devise (= 4.4.0) + devise (= 4.4.3) dotenv-rails (= 2.0.1) ed25519 (= 1.2.4) ember-data-source (= 0.14) From 4c668a88d9b4d6eeff165a894771c9c47db81a1a Mon Sep 17 00:00:00 2001 From: Daniel Perrett Date: Tue, 9 Jan 2024 21:30:13 +0000 Subject: [PATCH 046/334] Stop Arel from quoting tablename.* expressions --- .../trade/distinct_values_validation_rule.rb | 2 +- app/models/trade/format_validation_rule.rb | 2 +- app/models/trade/inclusion_validation_rule.rb | 15 +++++++++------ app/models/trade/presence_validation_rule.rb | 2 +- ...taxon_concept_appendix_year_validation_rule.rb | 6 +++--- .../trade/taxon_concept_source_validation_rule.rb | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/models/trade/distinct_values_validation_rule.rb b/app/models/trade/distinct_values_validation_rule.rb index 94e85c56a0..25c40ac6d6 100644 --- a/app/models/trade/distinct_values_validation_rule.rb +++ b/app/models/trade/distinct_values_validation_rule.rb @@ -40,7 +40,7 @@ def validation_errors_for_shipment(shipment) def matching_records_arel(table_name) s = Arel::Table.new("#{table_name}_view") arel_columns = column_names.map { |c| Arel::Attribute.new(s, c) } - Trade::SandboxTemplate.select('*').from("#{table_name}_view").where( + Trade::SandboxTemplate.select(Arel.star).from("#{table_name}_view").where( arel_columns.shift.eq(arel_columns.shift) ) end diff --git a/app/models/trade/format_validation_rule.rb b/app/models/trade/format_validation_rule.rb index 08c8c7cefe..22fab9d2be 100644 --- a/app/models/trade/format_validation_rule.rb +++ b/app/models/trade/format_validation_rule.rb @@ -31,6 +31,6 @@ def matching_records(annual_report_upload) sandbox_klass = Trade::SandboxTemplate.ar_klass(table_name) s = Arel::Table.new(table_name) arel_nodes = column_names.map { |c| "#{c} !~ '#{format_re}'" } - sandbox_klass.select('*').where(arel_nodes.inject(&:or)) + sandbox_klass.select(Arel.star).where(arel_nodes.inject(&:or)) end end diff --git a/app/models/trade/inclusion_validation_rule.rb b/app/models/trade/inclusion_validation_rule.rb index 2ba8603e29..8172ceaa78 100644 --- a/app/models/trade/inclusion_validation_rule.rb +++ b/app/models/trade/inclusion_validation_rule.rb @@ -81,7 +81,7 @@ def validation_errors_for_shipment(shipment) # if it is, check if it has a match in valid values view v = Arel::Table.new(valid_values_view) arel_nodes = shipments_columns.map { |c| v[c].eq(shipment.send(c)) } - return nil if Trade::Shipment.find_by_sql(v.project('*').where(arel_nodes.inject(&:and))).any? + return nil if Trade::Shipment.find_by_sql(v.project(Arel.star).where(arel_nodes.inject(&:and))).any? error_message end @@ -92,7 +92,7 @@ def column_names_for_matching end def column_names_for_display_with_custom_table_name(table_name:) - column_names_for_display.map{ |column_name| "#{table_name}.#{column_name}" } + column_names_for_display.map{ |column_name| Arel::Nodes::SqlLiteral.new("#{table_name}.#{column_name}") } end def column_names_for_display @@ -170,8 +170,11 @@ def matching_records_grouped(annual_report_upload) def matching_records(annual_report_upload) table_name = annual_report_upload.sandbox.table_name sandbox_klass = Trade::SandboxTemplate.ar_klass(table_name) - sandbox_klass.select('*'). - from(Arel.sql("(#{matching_records_arel(table_name).to_sql}) AS matching_records")) + sandbox_klass.select( + Arel.star + ).from( + Arel.sql("(#{matching_records_arel(table_name).to_sql}) AS matching_records") + ) end # Returns records from sandbox where values in column_names are not null @@ -183,7 +186,7 @@ def scoped_records_arel(s) end not_null_conds = not_null_nodes.shift not_null_nodes.each { |n| not_null_conds = not_null_conds.and(n) } - result = s.project('*').where(not_null_conds) + result = s.project(Arel.star).where(not_null_conds) scope_nodes = sanitized_sandbox_scope.map do |scope_column, scope_def| tmp = [] if scope_def['inclusion'] @@ -220,7 +223,7 @@ def matching_records_arel(table_name) v[c].eq(s[c]).or(v[c].eq(nil).and(s[c].eq(nil))) end end - valid_values = s.project(s['*']).join(v).on(arel_nodes.inject(&:and)) + valid_values = s.project(s[Arel.star]).join(v).on(arel_nodes.inject(&:and)) scoped_records_arel(s).except(valid_values) end diff --git a/app/models/trade/presence_validation_rule.rb b/app/models/trade/presence_validation_rule.rb index 692a0e1dcd..d786329915 100644 --- a/app/models/trade/presence_validation_rule.rb +++ b/app/models/trade/presence_validation_rule.rb @@ -30,6 +30,6 @@ def matching_records(annual_report_upload) arel_nodes = column_names.map do |c| s[c].eq(nil) end - sandbox_klass.select('*').where(arel_nodes.inject(&:and)) + sandbox_klass.select(Arel.star).where(arel_nodes.inject(&:and)) end end diff --git a/app/models/trade/taxon_concept_appendix_year_validation_rule.rb b/app/models/trade/taxon_concept_appendix_year_validation_rule.rb index 5c98456d99..838972afaa 100644 --- a/app/models/trade/taxon_concept_appendix_year_validation_rule.rb +++ b/app/models/trade/taxon_concept_appendix_year_validation_rule.rb @@ -27,7 +27,7 @@ def validation_errors_for_shipment(shipment) year_node = effective_from.lteq(shipment.year).and(effective_to.gteq(shipment.year).or(effective_to.eq(nil))) taxon_concept_node = v['taxon_concept_id'].eq(shipment.taxon_concept_id) conditions = appendix_node.and(year_node).and(taxon_concept_node) - return nil if Trade::Shipment.find_by_sql(v.project('*').where(conditions)).any? + return nil if Trade::Shipment.find_by_sql(v.project(Arel.star).where(conditions)).any? error_message end @@ -56,13 +56,13 @@ def matching_records_arel(table_name) join_conditions = appendix_join_node(s, v).and(year_join_node(s, v)). and(taxon_concept_join_node(s, v)) - valid_values = s.project(s['*']).join(v).on(join_conditions) + valid_values = s.project(s[Arel.star]).join(v).on(join_conditions) not_null_nodes = column_names.map do |c| s[c].not_eq(nil) end not_null_conds = not_null_nodes.shift not_null_nodes.each { |n| not_null_conds = not_null_conds.and(n) } - s.project('*').where(not_null_conds).except(valid_values) + s.project(Arel.star).where(not_null_conds).except(valid_values) end end diff --git a/app/models/trade/taxon_concept_source_validation_rule.rb b/app/models/trade/taxon_concept_source_validation_rule.rb index 4d2a649a10..003dc836c7 100644 --- a/app/models/trade/taxon_concept_source_validation_rule.rb +++ b/app/models/trade/taxon_concept_source_validation_rule.rb @@ -47,7 +47,7 @@ def matching_records_arel(table_name) ) arel = s.project( - s['*'] + s[Arel.star] ).join(tc).on( s['taxon_concept_id'].eq(tc['id']) ).join(t).on( From 8af51fbf719e7d98fe6f21b9e1a4c37a1341839e Mon Sep 17 00:00:00 2001 From: Daniel Perrett Date: Tue, 9 Jan 2024 22:13:25 +0000 Subject: [PATCH 047/334] Convert ruby hash to JSON, and quote it properly, fixing a test --- app/models/trade/inclusion_validation_rule.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/models/trade/inclusion_validation_rule.rb b/app/models/trade/inclusion_validation_rule.rb index 8172ceaa78..0bc98ad598 100644 --- a/app/models/trade/inclusion_validation_rule.rb +++ b/app/models/trade/inclusion_validation_rule.rb @@ -19,10 +19,9 @@ class Trade::InclusionValidationRule < Trade::ValidationRule attr_accessible :valid_values_view def matching_records_for_aru_and_error(annual_report_upload, validation_error) - @query = matching_records(annual_report_upload). - where( - "'#{validation_error.matching_criteria}'::JSONB @> (#{jsonb_matching_criteria_for_comparison})::JSONB" - ) + @query = matching_records(annual_report_upload).where( + "#{Arel::Nodes.build_quoted(validation_error.matching_criteria.to_json).to_sql}::JSONB @> (#{jsonb_matching_criteria_for_comparison})::JSONB" + ) end def error_message(values_hash = nil) From 19dbf7c10057d33f04776a3baf20ed706d7cd7d0 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 10:57:10 +0000 Subject: [PATCH 048/334] review gems (wip) --- Gemfile | 38 ++++++++++++++++++-------------------- Gemfile.lock | 33 +++++++++++++-------------------- 2 files changed, 31 insertions(+), 40 deletions(-) diff --git a/Gemfile b/Gemfile index 64c8dafa8b..93bf37d759 100644 --- a/Gemfile +++ b/Gemfile @@ -11,18 +11,18 @@ gem 'actionpack-action_caching', '1.2.0' gem 'actionpack-page_caching', '1.1.1' gem 'active_model_serializers', '0.8.4' gem 'activeresource', '4.1.0' # TODO: can be removed? Seems no place using this. -gem 'dalli', '2.7.10' +gem 'dalli', '2.7.10' # TODO: latest is 3.2.6. I believe should be fine to upgrade but we have no way to test. gem 'pg', '0.21.0' # TODO: latest 1.5.4, need Rails 5 to upgrade to 1.0.0 gem 'pg_array_parser', '0.0.9' # TODO: latest 0.0.9 gem 'nested-hstore', '0.1.2' # TODO: latest 0.1.2 @ 2015 gem 'pg_search', '1.0.6' # TODO: update to newer version when upgrade to Rails 5 -gem 'oj', '3.14.2' # optimised JSON (picked by multi_json) -gem 'nokogiri', '1.12.5' +gem 'oj', '3.14.2' # optimised JSON (picked by multi_json) # TODO: to upgrade to newer version, need >=Ruby 2.7 +gem 'nokogiri', '1.12.5' # TODO: 1.12.5 is the last version support 2.5. New version need Ruby 2.6+ gem 'inherited_resources', '1.7.2' # TODO: need upgrade when upgrade to Rails 5 gem 'traco', '2.0.0' # gem 'strong_parameters' gem 'protected_attributes', '1.1.4' # TODO: Only support Rails version < 5 (https://github.com/rails/protected_attributes) -gem 'devise', '4.4.3' +gem 'devise', '4.4.3' # TODO: version 4.4.3 work under <=Rails 5.3 and <=Ruby 2.6 gem 'cancancan', '1.17.0' # TODO, need upgrade to 2.0 for Rails 5 gem 'ahoy_matey', '1.6.1' # TODO: latest 5.0.2. Can't upgrade to 2.0 until upgrade to Rails 5 gem 'browser', '2.5.3' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 @@ -33,13 +33,13 @@ gem "chartkick", '1.3.2' gem 'rubyzip', '1.1.7' gem 'responders', '~> 2.0' # https://guides.rubyonrails.org/v4.2/upgrading_ruby_on_rails.html#responders -gem 'sidekiq', '4.2.10' +gem 'sidekiq', '4.2.10' # TODO, Ruby 2.7 need version 6.0.5 sidekiq gem 'sidekiq-status', '1.1.4' # TODO: latest is 3.0.3 @ 2023 gem 'sidekiq-unique-jobs', '4.0.18' gem 'redis-rails', '4.0.0' -gem 'whenever', '0.9.4', :require => false -gem 'httparty', '0.16.2' +gem 'whenever', '0.11.0', :require => false # TODO: latest version 1.0 @ 2019. Should migrate to sidekiq-cron. +gem 'httparty', '~> 0.21.0' # TODO: latest. gem 'sprockets', '2.12.5' # upgrading to 3 breaks handlebars/tilt gem 'ember-rails', '0.14.1' @@ -72,8 +72,8 @@ gem 'coffee-rails', '4.1.0' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby -gem 'uglifier', '2.7.2' -gem 'susy', '2.2.14' +gem 'uglifier', '2.7.2' # TODO: Only works with ES5. Latest version 4.2.0 @ 2019 + # To use ActiveModel has_secure_password @@ -141,22 +141,20 @@ group :test do gem 'capybara', '2.2.1' end -gem 'slim', '1.3.6' - -gem 'memcache-client', '1.8.5' - -gem 'jquery-ui-rails', '4.1.2' - -gem 'geoip', '1.3.5' +gem 'geoip', '1.3.5' # TODO: no change logs, no idea if safe to update. Latest version is 1.6.4 @ 2018 # track who created or edited a given object -gem 'clerk', '0.2.2' -gem 'paper_trail', '4.2.0' -gem 'request_store', '1.3.2' +gem 'clerk', '0.2.3' # TODO: Need update to 1.0.0 when upgrade to Rails 5. I would say should update our code and just use paper_trail. This gem last update at 2018. +gem 'paper_trail', '4.2.0' # TODO: latest is 15.1.0. Need upgrade to v5 for Rails 5. gem 'dotenv-rails', '2.0.1' -gem 'sitemap_generator', '5.1.0' +gem 'sitemap_generator', '~> 6.3' # TODO: latest gem 'appsignal', '1.3.3' gem 'test-unit', '3.1.5' # annoyingly, rails console won't start without it in staging / production + +# GEM for frontend. +gem 'jquery-ui-rails', '4.2.1' # TODO: some breaking change form v5. Latest version 6.0.1 @ 2016 +# gem 'slim', '1.3.6' # I believe not in-use as we do not have .slim file. +gem 'susy', '2.2.14' # TODO: Deprecated. 2.2.14 is the latest version @ 2018 diff --git a/Gemfile.lock b/Gemfile.lock index 67c8bd17ab..94402ac481 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -133,7 +133,7 @@ GEM chronic (0.10.2) chronic_duration (0.10.6) numerizer (~> 0.1.1) - clerk (0.2.2) + clerk (0.2.3) activerecord (> 3) railties (> 3.1) sentient_user (>= 0.3.3) @@ -236,7 +236,8 @@ GEM http-cookie (1.0.5) domain_name (~> 0.5) http_parser.rb (0.8.0) - httparty (0.16.2) + httparty (0.21.0) + mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) i18n (0.9.5) concurrent-ruby (~> 1.0) @@ -254,8 +255,8 @@ GEM jquery-rails (2.1.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (4.1.2) - railties (>= 3.1.0) + jquery-ui-rails (4.2.1) + railties (>= 3.2.16) jslint_on_rails (1.1.1) json (2.7.1) json_spec (1.1.5) @@ -288,7 +289,6 @@ GEM net-imap net-pop net-smtp - memcache-client (1.8.5) method_source (1.0.0) mime-types (2.99.3) mini_mime (1.1.2) @@ -494,14 +494,11 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sitemap_generator (5.1.0) - builder + sitemap_generator (6.3.0) + builder (~> 3.0) slackistrano (0.1.9) capistrano (>= 3.0.1) json - slim (1.3.6) - temple (~> 0.5.5) - tilt (~> 1.3.3) spring (3.1.1) sprockets (2.12.5) hike (~> 1.2) @@ -520,7 +517,6 @@ GEM susy (2.2.14) sass (>= 3.3.0, < 3.5) sync (0.5.0) - temple (0.5.5) term-ansicolor (1.7.1) tins (~> 1.0) test-unit (3.1.5) @@ -554,7 +550,7 @@ GEM railties (>= 4.0) sprockets-rails (>= 2.0, < 4.0) webrick (1.3.1) - whenever (0.9.4) + whenever (0.11.0) chronic (>= 0.6.3) wicked (1.3.3) railties (>= 3.0.7) @@ -592,7 +588,7 @@ DEPENDENCIES capybara (= 2.2.1) carrierwave (= 0.10.0) chartkick (= 1.3.2) - clerk (= 0.2.2) + clerk (= 0.2.3) codeclimate-test-reporter (= 0.1.1) coffee-rails (= 4.1.0) coveralls (= 0.7.1) @@ -612,17 +608,16 @@ DEPENDENCIES guard-bundler (= 1.0.0) guard-livereload (= 1.1.3) handlebars-source (= 1.0.12) - httparty (= 0.16.2) + httparty (~> 0.21.0) inherited_resources (= 1.7.2) jquery-cookie-rails (= 1.3.1.1) jquery-mousewheel-rails (= 0.0.9) jquery-rails (= 2.1.4) - jquery-ui-rails (= 4.1.2) + jquery-ui-rails (= 4.2.1) jslint_on_rails (= 1.1.1) json_spec (= 1.1.5) kaminari (= 1.2.2) launchy (= 2.4.3) - memcache-client (= 1.8.5) nested-hstore (= 0.1.2) nested_form (= 0.3.2) nokogiri (= 1.12.5) @@ -642,7 +637,6 @@ DEPENDENCIES rbnacl (= 4.0.2) rbnacl-libsodium (= 1.0.16) redis-rails (= 4.0.0) - request_store (= 1.3.2) responders (~> 2.0) rest-client (= 1.8.0) rspec-collection_matchers (= 1.1.3) @@ -655,9 +649,8 @@ DEPENDENCIES sidekiq-status (= 1.1.4) sidekiq-unique-jobs (= 4.0.18) simplecov (= 0.22.0) - sitemap_generator (= 5.1.0) + sitemap_generator (~> 6.3) slackistrano (= 0.1.9) - slim (= 1.3.6) spring sprockets (= 2.12.5) susy (= 2.2.14) @@ -667,7 +660,7 @@ DEPENDENCIES underscore-rails (= 1.4.3) web-console (~> 2.0) webrick (= 1.3.1) - whenever (= 0.9.4) + whenever (= 0.11.0) wicked (= 1.3.3) wkhtmltopdf-binary (= 0.9.9.3) From 1250a907af93fea8ff2cd40146309cc4ce6d71e3 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 13:08:11 +0000 Subject: [PATCH 049/334] review gems (wip) --- Gemfile | 17 ++++++++++------- Gemfile.lock | 27 ++++++++++++++------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index 93bf37d759..b0e63fdb31 100644 --- a/Gemfile +++ b/Gemfile @@ -19,18 +19,18 @@ gem 'pg_search', '1.0.6' # TODO: update to newer version when upgrade to Rails 5 gem 'oj', '3.14.2' # optimised JSON (picked by multi_json) # TODO: to upgrade to newer version, need >=Ruby 2.7 gem 'nokogiri', '1.12.5' # TODO: 1.12.5 is the last version support 2.5. New version need Ruby 2.6+ gem 'inherited_resources', '1.7.2' # TODO: need upgrade when upgrade to Rails 5 -gem 'traco', '2.0.0' +gem 'traco', '~> 5.3', '>= 5.3.3' # TODO: latest version @ 2021. Suggest migrate to Mobility gem. # gem 'strong_parameters' gem 'protected_attributes', '1.1.4' # TODO: Only support Rails version < 5 (https://github.com/rails/protected_attributes) gem 'devise', '4.4.3' # TODO: version 4.4.3 work under <=Rails 5.3 and <=Ruby 2.6 gem 'cancancan', '1.17.0' # TODO, need upgrade to 2.0 for Rails 5 gem 'ahoy_matey', '1.6.1' # TODO: latest 5.0.2. Can't upgrade to 2.0 until upgrade to Rails 5 gem 'browser', '2.5.3' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 -gem 'gon', '5.2.0' + gem 'wicked', '1.3.3' gem 'groupdate', '2.4.0' -gem "chartkick", '1.3.2' -gem 'rubyzip', '1.1.7' + +gem 'rubyzip', '~> 2.3', '>= 2.3.2' # TODO: latest gem 'responders', '~> 2.0' # https://guides.rubyonrails.org/v4.2/upgrading_ruby_on_rails.html#responders gem 'sidekiq', '4.2.10' # TODO, Ruby 2.7 need version 6.0.5 sidekiq @@ -50,9 +50,9 @@ gem 'jquery-rails', '2.1.4' # do not upgrade until https://github.com/jquery/jqu gem 'jquery-mousewheel-rails', '0.0.9' gem 'jquery-cookie-rails', '1.3.1.1' gem 'bootstrap-sass', '2.3.2.2' -gem 'kaminari', '1.2.2' +gem 'kaminari', '1.2.2' # TODO: latest @ 2021. Suggest migrate to pagy gem. gem 'select2-rails', '3.5.10' #initSelection deprecated on upgrade to version 4 -gem 'nested_form', '0.3.2' + gem 'acts-as-taggable-on', '4.0.0' gem 'carrierwave', '0.10.0' gem 'prawn', '0.13.2' @@ -62,7 +62,7 @@ gem 'wkhtmltopdf-binary', '0.9.9.3' gem 'underscore-rails', '1.4.3' gem "font-awesome-rails", '4.5.0.1' -gem 'aws-sdk', '~> 2' +gem 'aws-sdk', '~> 2' # TODO: v2 Deprecated, need to upgrade to v3 gem 'rails-observers', '0.1.5' # TODO: a feature that removed since Rails 4... # Gems used for assets @@ -158,3 +158,6 @@ gem 'test-unit', '3.1.5' # annoyingly, rails console won't start without it in s gem 'jquery-ui-rails', '4.2.1' # TODO: some breaking change form v5. Latest version 6.0.1 @ 2016 # gem 'slim', '1.3.6' # I believe not in-use as we do not have .slim file. gem 'susy', '2.2.14' # TODO: Deprecated. 2.2.14 is the latest version @ 2018 +gem 'gon', '~> 6.4' # TODO: latest +gem "chartkick", '2.3.5' # TODO: latest 5.0.5 @ 2023. Should upgrade to v4 once we upgrade to Rails 5.2+ and Ruby 2.6+ +gem 'nested_form', '0.3.2' # TODO: latest @ 2013. Project is public archived on github. No longer maintained. diff --git a/Gemfile.lock b/Gemfile.lock index 94402ac481..7c3fb65c57 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -129,7 +129,7 @@ GEM activesupport (>= 3.2.0) json (>= 1.7) mime-types (>= 1.16) - chartkick (1.3.2) + chartkick (2.3.5) chronic (0.10.2) chronic_duration (0.10.6) numerizer (~> 0.1.1) @@ -207,11 +207,11 @@ GEM geoip (1.3.5) globalid (0.4.2) activesupport (>= 4.2.0) - gon (5.2.0) - actionpack (>= 2.3.0) - json + gon (6.4.0) + actionpack (>= 3.0.20) + i18n (>= 0.7) multi_json - request_store (>= 1.0.5) + request_store (>= 1.0) groupdate (2.4.0) activesupport (>= 3) guard (1.8.3) @@ -424,7 +424,8 @@ GEM redis-store (1.1.7) redis (>= 2.2) referer-parser (0.3.0) - request_store (1.3.2) + request_store (1.5.1) + rack (>= 1.4) responders (2.4.1) actionpack (>= 4.2.0, < 6.0) railties (>= 4.2.0, < 6.0) @@ -463,7 +464,7 @@ GEM unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.13.0) ruby-rc4 (0.1.5) - rubyzip (1.1.7) + rubyzip (2.3.2) safely_block (0.3.0) errbase (>= 0.1.1) sass (3.4.25) @@ -527,8 +528,8 @@ GEM timeout (0.4.0) tins (1.32.1) sync - traco (2.0.0) - activerecord (>= 3.0) + traco (5.3.3) + activerecord (>= 4.2) ttfunk (1.0.3) tzinfo (1.2.11) thread_safe (~> 0.1) @@ -587,7 +588,7 @@ DEPENDENCIES capistrano-sidekiq (= 1.0.2) capybara (= 2.2.1) carrierwave (= 0.10.0) - chartkick (= 1.3.2) + chartkick (= 2.3.5) clerk (= 0.2.3) codeclimate-test-reporter (= 0.1.1) coffee-rails (= 4.1.0) @@ -603,7 +604,7 @@ DEPENDENCIES factory_girl_rails (= 4.2.1) font-awesome-rails (= 4.5.0.1) geoip (= 1.3.5) - gon (= 5.2.0) + gon (~> 6.4) groupdate (= 2.4.0) guard-bundler (= 1.0.0) guard-livereload (= 1.1.3) @@ -642,7 +643,7 @@ DEPENDENCIES rspec-collection_matchers (= 1.1.3) rspec-rails (= 3.9.1) rubocop (= 0.40.0) - rubyzip (= 1.1.7) + rubyzip (~> 2.3, >= 2.3.2) sass-rails (= 5.0.7) select2-rails (= 3.5.10) sidekiq (= 4.2.10) @@ -655,7 +656,7 @@ DEPENDENCIES sprockets (= 2.12.5) susy (= 2.2.14) test-unit (= 3.1.5) - traco (= 2.0.0) + traco (~> 5.3, >= 5.3.3) uglifier (= 2.7.2) underscore-rails (= 1.4.3) web-console (~> 2.0) From 18984e4eff20ae12f1bde387d1cf8d0e5eb24e56 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 13:12:03 +0000 Subject: [PATCH 050/334] update carrierwave gem --- Gemfile | 2 +- Gemfile.lock | 9 ++++----- app/uploaders/document_file_uploader.rb | 2 +- app/uploaders/trade/csv_source_file_uploader.rb | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index b0e63fdb31..48e996b701 100644 --- a/Gemfile +++ b/Gemfile @@ -54,7 +54,7 @@ gem 'kaminari', '1.2.2' # TODO: latest @ 2021. Suggest migrate to pagy gem. gem 'select2-rails', '3.5.10' #initSelection deprecated on upgrade to version 4 gem 'acts-as-taggable-on', '4.0.0' -gem 'carrierwave', '0.10.0' +gem 'carrierwave', '1.3.1' # TODO: latest is 3.0.5 @ 2023. v2 support Rails 5 gem 'prawn', '0.13.2' gem 'pdfkit', '0.8.4.2' gem 'wkhtmltopdf-binary', '0.9.9.3' diff --git a/Gemfile.lock b/Gemfile.lock index 7c3fb65c57..9a364a5aa4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -124,10 +124,9 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - carrierwave (0.10.0) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) - json (>= 1.7) + carrierwave (1.3.1) + activemodel (>= 4.0.0) + activesupport (>= 4.0.0) mime-types (>= 1.16) chartkick (2.3.5) chronic (0.10.2) @@ -587,7 +586,7 @@ DEPENDENCIES capistrano-rvm (= 0.1.2) capistrano-sidekiq (= 1.0.2) capybara (= 2.2.1) - carrierwave (= 0.10.0) + carrierwave (= 1.3.1) chartkick (= 2.3.5) clerk (= 0.2.3) codeclimate-test-reporter (= 0.1.1) diff --git a/app/uploaders/document_file_uploader.rb b/app/uploaders/document_file_uploader.rb index e2ba718c36..2175948a54 100644 --- a/app/uploaders/document_file_uploader.rb +++ b/app/uploaders/document_file_uploader.rb @@ -42,7 +42,7 @@ def cache_dir # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_white_list + def extension_whitelist %w(jpg jpeg gif png bmp tif tiff ppt pptx xls xlsx rtf txt doc docx pdf csv tsv odt ods odp) end diff --git a/app/uploaders/trade/csv_source_file_uploader.rb b/app/uploaders/trade/csv_source_file_uploader.rb index 193ec51c0a..59d1f72c27 100644 --- a/app/uploaders/trade/csv_source_file_uploader.rb +++ b/app/uploaders/trade/csv_source_file_uploader.rb @@ -73,7 +73,7 @@ def convert_to_utf8 # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_white_list + def extension_whitelist %w(csv) end From 10d6abe56f11bad0ecb73b5a981f383b09f44784 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 13:43:29 +0000 Subject: [PATCH 051/334] review gems (wip) --- Gemfile | 19 ++++++++++--------- Gemfile.lock | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/Gemfile b/Gemfile index 48e996b701..e9bd75c068 100644 --- a/Gemfile +++ b/Gemfile @@ -7,9 +7,9 @@ gem 'rails', '4.2.11.3' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' -gem 'actionpack-action_caching', '1.2.0' -gem 'actionpack-page_caching', '1.1.1' -gem 'active_model_serializers', '0.8.4' +gem 'actionpack-action_caching', '~> 1.2', '>= 1.2.2' # A feature that removed from core in Rails 4.0, maybe be better migrate away from this. +gem 'actionpack-page_caching', '1.1.1' # A feature that removed from core in Rails 4.0, maybe be better migrate away from this. # TODO, need update when upgrade to rails 5 +gem 'active_model_serializers', '0.8.4' # Deprecated gem 'activeresource', '4.1.0' # TODO: can be removed? Seems no place using this. gem 'dalli', '2.7.10' # TODO: latest is 3.2.6. I believe should be fine to upgrade but we have no way to test. gem 'pg', '0.21.0' # TODO: latest 1.5.4, need Rails 5 to upgrade to 1.0.0 @@ -27,16 +27,16 @@ gem 'cancancan', '1.17.0' # TODO, need upgrade to 2.0 for Rails 5 gem 'ahoy_matey', '1.6.1' # TODO: latest 5.0.2. Can't upgrade to 2.0 until upgrade to Rails 5 gem 'browser', '2.5.3' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 -gem 'wicked', '1.3.3' -gem 'groupdate', '2.4.0' +gem 'wicked', '~> 2.0' # TODO: latest +gem 'groupdate', '2.4.0' # TODO: seems only ApiRequest#recent_requests using this. Suggest rewrite and remove dependencies. gem 'rubyzip', '~> 2.3', '>= 2.3.2' # TODO: latest gem 'responders', '~> 2.0' # https://guides.rubyonrails.org/v4.2/upgrading_ruby_on_rails.html#responders gem 'sidekiq', '4.2.10' # TODO, Ruby 2.7 need version 6.0.5 sidekiq gem 'sidekiq-status', '1.1.4' # TODO: latest is 3.0.3 @ 2023 -gem 'sidekiq-unique-jobs', '4.0.18' -gem 'redis-rails', '4.0.0' +gem 'sidekiq-unique-jobs', '4.0.18' # TODO: latest is 8.0.5 @ 2023 +gem 'redis-rails', '5.0.2' # TODO: latest, may remove this Gem when upgrade to Rails 5.2. (https://github.com/redis-store/redis-rails/tree/master#a-quick-note-about-rails-52) gem 'whenever', '0.11.0', :require => false # TODO: latest version 1.0 @ 2019. Should migrate to sidekiq-cron. gem 'httparty', '~> 0.21.0' # TODO: latest. @@ -51,9 +51,9 @@ gem 'jquery-mousewheel-rails', '0.0.9' gem 'jquery-cookie-rails', '1.3.1.1' gem 'bootstrap-sass', '2.3.2.2' gem 'kaminari', '1.2.2' # TODO: latest @ 2021. Suggest migrate to pagy gem. -gem 'select2-rails', '3.5.10' #initSelection deprecated on upgrade to version 4 -gem 'acts-as-taggable-on', '4.0.0' + +gem 'acts-as-taggable-on', '5.0.0' # TODO: latest v10 @ 2023. Need upgrade when upgrade to Rails 5. gem 'carrierwave', '1.3.1' # TODO: latest is 3.0.5 @ 2023. v2 support Rails 5 gem 'prawn', '0.13.2' gem 'pdfkit', '0.8.4.2' @@ -161,3 +161,4 @@ gem 'susy', '2.2.14' # TODO: Deprecated. 2.2.14 is the latest version @ 2018 gem 'gon', '~> 6.4' # TODO: latest gem "chartkick", '2.3.5' # TODO: latest 5.0.5 @ 2023. Should upgrade to v4 once we upgrade to Rails 5.2+ and Ruby 2.6+ gem 'nested_form', '0.3.2' # TODO: latest @ 2013. Project is public archived on github. No longer maintained. +gem 'select2-rails', '3.5.10' # initSelection deprecated on upgrade to version 4 (https://github.com/select2/select2/blob/develop/CHANGELOG.md) diff --git a/Gemfile.lock b/Gemfile.lock index 9a364a5aa4..0697a9913f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,8 +15,8 @@ GEM rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionpack-action_caching (1.2.0) - actionpack (>= 4.0.0, < 6) + actionpack-action_caching (1.2.2) + actionpack (>= 4.0.0) actionpack-page_caching (1.1.1) actionpack (>= 4.0.0, < 6) actionview (4.2.11.3) @@ -46,8 +46,8 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - acts-as-taggable-on (4.0.0) - activerecord (>= 4.0) + acts-as-taggable-on (5.0.0) + activerecord (>= 4.2.8) addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) afm (0.2.2) @@ -406,22 +406,22 @@ GEM rbnacl-libsodium (1.0.16) rbnacl (>= 3.0.1) redis (3.3.5) - redis-actionpack (4.0.1) - actionpack (~> 4) - redis-rack (~> 1.5.0) - redis-store (~> 1.1.0) - redis-activesupport (4.1.5) - activesupport (>= 3, < 5) - redis-store (~> 1.1.0) - redis-rack (1.5.1) - rack (~> 1.5) - redis-store (~> 1.1.0) - redis-rails (4.0.0) - redis-actionpack (~> 4) - redis-activesupport (~> 4) - redis-store (~> 1.1.0) - redis-store (1.1.7) - redis (>= 2.2) + redis-actionpack (5.1.0) + actionpack (>= 4.0, < 7) + redis-rack (>= 1, < 3) + redis-store (>= 1.1.0, < 2) + redis-activesupport (5.3.0) + activesupport (>= 3, < 8) + redis-store (>= 1.3, < 2) + redis-rack (2.0.6) + rack (>= 1.5, < 3) + redis-store (>= 1.2, < 2) + redis-rails (5.0.2) + redis-actionpack (>= 5.0, < 6) + redis-activesupport (>= 5.0, < 6) + redis-store (>= 1.2, < 2) + redis-store (1.6.0) + redis (>= 2.2, < 5) referer-parser (0.3.0) request_store (1.5.1) rack (>= 1.4) @@ -552,7 +552,7 @@ GEM webrick (1.3.1) whenever (0.11.0) chronic (>= 0.6.3) - wicked (1.3.3) + wicked (2.0.0) railties (>= 3.0.7) wkhtmltopdf-binary (0.9.9.3) xpath (2.1.0) @@ -562,11 +562,11 @@ PLATFORMS ruby DEPENDENCIES - actionpack-action_caching (= 1.2.0) + actionpack-action_caching (~> 1.2, >= 1.2.2) actionpack-page_caching (= 1.1.1) active_model_serializers (= 0.8.4) activeresource (= 4.1.0) - acts-as-taggable-on (= 4.0.0) + acts-as-taggable-on (= 5.0.0) ahoy_matey (= 1.6.1) annotate (= 2.5.0) appsignal (= 1.3.3) @@ -636,7 +636,7 @@ DEPENDENCIES rails-observers (= 0.1.5) rbnacl (= 4.0.2) rbnacl-libsodium (= 1.0.16) - redis-rails (= 4.0.0) + redis-rails (= 5.0.2) responders (~> 2.0) rest-client (= 1.8.0) rspec-collection_matchers (= 1.1.3) @@ -661,7 +661,7 @@ DEPENDENCIES web-console (~> 2.0) webrick (= 1.3.1) whenever (= 0.11.0) - wicked (= 1.3.3) + wicked (~> 2.0) wkhtmltopdf-binary (= 0.9.9.3) RUBY VERSION From 6277e1a71fb821e48a298ed22d180f368aa13dcc Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 15:05:00 +0000 Subject: [PATCH 052/334] review gems --- Gemfile | 36 ++++++++++++++++++------------------ Gemfile.lock | 14 +++++++------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Gemfile b/Gemfile index e9bd75c068..787fdaaca6 100644 --- a/Gemfile +++ b/Gemfile @@ -42,32 +42,22 @@ gem 'whenever', '0.11.0', :require => false # TODO: latest version 1.0 @ 2019. S gem 'httparty', '~> 0.21.0' # TODO: latest. gem 'sprockets', '2.12.5' # upgrading to 3 breaks handlebars/tilt -gem 'ember-rails', '0.14.1' -gem 'ember-source', '1.6.1' -gem 'ember-data-source', '0.14' -gem 'handlebars-source', '1.0.12' -gem 'jquery-rails', '2.1.4' # do not upgrade until https://github.com/jquery/jquery/pull/1142 isd pulled into jquery-rails -gem 'jquery-mousewheel-rails', '0.0.9' -gem 'jquery-cookie-rails', '1.3.1.1' -gem 'bootstrap-sass', '2.3.2.2' gem 'kaminari', '1.2.2' # TODO: latest @ 2021. Suggest migrate to pagy gem. - gem 'acts-as-taggable-on', '5.0.0' # TODO: latest v10 @ 2023. Need upgrade when upgrade to Rails 5. gem 'carrierwave', '1.3.1' # TODO: latest is 3.0.5 @ 2023. v2 support Rails 5 -gem 'prawn', '0.13.2' -gem 'pdfkit', '0.8.4.2' -gem 'wkhtmltopdf-binary', '0.9.9.3' -gem 'underscore-rails', '1.4.3' -gem "font-awesome-rails", '4.5.0.1' +# PDF +gem 'prawn', '0.13.2' +gem 'pdfkit', '~> 0.8.7.3' +gem 'wkhtmltopdf-binary', '~> 0.12.6.6' gem 'aws-sdk', '~> 2' # TODO: v2 Deprecated, need to upgrade to v3 -gem 'rails-observers', '0.1.5' # TODO: a feature that removed since Rails 4... +gem 'rails-observers', '~> 0.1.5' # A feature that removed from core in Rails 4.0, maybe be better migrate away from this. # Gems used for assets -gem 'sass-rails', '5.0.7' -gem 'coffee-rails', '4.1.0' +gem 'sass-rails', '5.0.7' # TODO: may need to upgrade when upgrade to Rails 5 or 6 (https://github.com/rails/sass-rails/releases) +gem 'coffee-rails', '4.1.0' # TODO: v5 support Rails 6; 4.1.1 for Rails 5 # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby @@ -88,7 +78,7 @@ gem 'uglifier', '2.7.2' # TODO: Only works with ES5. Latest version 4.2.0 @ 2019 # To use debugger # gem 'ruby-debug19', :require => 'ruby-debug' -gem 'rest-client', '1.8.0', require: false +gem 'rest-client', '1.8.0', require: false # TODO, should upgrade for better compatibility with newer Ruby but breaking change. Seems not many place using it, worth a try. group :development do # Access an IRB console on exception pages or by using <%= console %> in views @@ -162,3 +152,13 @@ gem 'gon', '~> 6.4' # TODO: latest gem "chartkick", '2.3.5' # TODO: latest 5.0.5 @ 2023. Should upgrade to v4 once we upgrade to Rails 5.2+ and Ruby 2.6+ gem 'nested_form', '0.3.2' # TODO: latest @ 2013. Project is public archived on github. No longer maintained. gem 'select2-rails', '3.5.10' # initSelection deprecated on upgrade to version 4 (https://github.com/select2/select2/blob/develop/CHANGELOG.md) +gem 'jquery-rails', '2.1.4' # do not upgrade until https://github.com/jquery/jquery/pull/1142 isd pulled into jquery-rails +gem 'jquery-mousewheel-rails', '~> 0.0.9' # TODO: latest @ 2014 +gem 'jquery-cookie-rails', '~> 1.3', '>= 1.3.1.1' # TODO: latest @ 2013. No longer maintained. jquery-cookie is now superseded by js-cookie which can be added to your Rails pipeline with js_cookie_rails. +gem 'bootstrap-sass', '2.3.2.2' # TODO: latest 3.4.1 @ 2019. Can't upgrade unless we sure bootstrap v3 backward compatible with boostrap v2 +gem 'ember-rails', '0.14.1' # Not support Sprockets 3+ unless upgrade. Latest version support Rails 5.1 +gem 'ember-source', '1.6.1' # TODO: just a wrapwrapper. Any update will change the ember.js version. +gem 'ember-data-source', '0.14' # TODO: just a wrapwrapper. Any update will change the JS ember-data version. +gem 'handlebars-source', '1.0.12' # TODO: just a wrapwrapper. Any update will change the handlebars.js version. +gem 'underscore-rails', '1.4.3' # TODO, another wrapper +gem "font-awesome-rails", '4.5.0.1' # TODO, another wrapper diff --git a/Gemfile.lock b/Gemfile.lock index 0697a9913f..953d8cabdd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -335,7 +335,7 @@ GEM hashery (~> 2.0) ruby-rc4 ttfunk - pdfkit (0.8.4.2) + pdfkit (0.8.7.3) pg (0.21.0) pg_array_parser (0.0.9) pg_search (1.0.6) @@ -554,7 +554,7 @@ GEM chronic (>= 0.6.3) wicked (2.0.0) railties (>= 3.0.7) - wkhtmltopdf-binary (0.9.9.3) + wkhtmltopdf-binary (0.12.6.6) xpath (2.1.0) nokogiri (~> 1.3) @@ -610,8 +610,8 @@ DEPENDENCIES handlebars-source (= 1.0.12) httparty (~> 0.21.0) inherited_resources (= 1.7.2) - jquery-cookie-rails (= 1.3.1.1) - jquery-mousewheel-rails (= 0.0.9) + jquery-cookie-rails (~> 1.3, >= 1.3.1.1) + jquery-mousewheel-rails (~> 0.0.9) jquery-rails (= 2.1.4) jquery-ui-rails (= 4.2.1) jslint_on_rails (= 1.1.1) @@ -623,7 +623,7 @@ DEPENDENCIES nokogiri (= 1.12.5) oj (= 3.14.2) paper_trail (= 4.2.0) - pdfkit (= 0.8.4.2) + pdfkit (~> 0.8.7.3) pg (= 0.21.0) pg_array_parser (= 0.0.9) pg_search (= 1.0.6) @@ -633,7 +633,7 @@ DEPENDENCIES rack-cors (= 0.3.0) rack-livereload (= 0.3.11) rails (= 4.2.11.3) - rails-observers (= 0.1.5) + rails-observers (~> 0.1.5) rbnacl (= 4.0.2) rbnacl-libsodium (= 1.0.16) redis-rails (= 5.0.2) @@ -662,7 +662,7 @@ DEPENDENCIES webrick (= 1.3.1) whenever (= 0.11.0) wicked (~> 2.0) - wkhtmltopdf-binary (= 0.9.9.3) + wkhtmltopdf-binary (~> 0.12.6.6) RUBY VERSION ruby 2.5.9p229 From b2155fe6efc8c9aee264a6ce48e5dafd4ce2fd98 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 15:21:31 +0000 Subject: [PATCH 053/334] change to Rails.application --- Rakefile | 2 +- config/environments/staging.rb | 2 +- config/routes.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 6936e56107..fcf22053ec 100644 --- a/Rakefile +++ b/Rakefile @@ -6,4 +6,4 @@ require File.expand_path('../config/application', __FILE__) require 'jslint/tasks' if Rails.env.development? require 'sitemap_generator/tasks' -SAPI::Application.load_tasks +Rails.application.load_tasks diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 01c2298fc5..a01773eb7f 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -1,4 +1,4 @@ -SAPI::Application.configure do +Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb # Code is not reloaded between requests. diff --git a/config/routes.rb b/config/routes.rb index 2f37748e98..f2787adb47 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,4 @@ -SAPI::Application.routes.draw do +Rails.application.routes.draw do devise_for :users, :controllers => { :passwords => "passwords", :registrations => "registrations", :sessions => "sessions" } as :user do get 'users/edit' => 'registrations#edit', :as => 'edit_user_registratione' From b0734bddadb3f495ae2a14d8cd192237e505907e Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 15:23:45 +0000 Subject: [PATCH 054/334] remove test result --- rspec_result.txt | 24965 --------------------------------------------- 1 file changed, 24965 deletions(-) delete mode 100644 rspec_result.txt diff --git a/rspec_result.txt b/rspec_result.txt deleted file mode 100644 index 5f230f0f41..0000000000 --- a/rspec_result.txt +++ /dev/null @@ -1,24965 +0,0 @@ -^Croot@702dd4fc5a07:/SAPI# rspec -Version 2 of the Ruby SDK will enter maintenance mode as of November 20, 2020. To continue receiving service updates and new features, please upgrade to Version 3. More information can be found here: https://aws.amazon.com/blogs/developer/deprecation-schedule-for-aws-sdk-for-ruby-v2/ - -Admin::AhoyEventsController - index - GET index - assigns to @ahoy_events sorted by time DESC - -Admin::AhoyVisitsController - index - GET index - assigns to @ahoy_events sorted by time DESC - -Admin::ChangeTypesController - GET index - assigns @change_types sorted by designation and name - renders the index template - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::CitesAcsController - index - GET index - assigns @cites_acs sorted by name - renders the index template - -Admin::CitesCopsController - index - GET index - assigns @cites_cops sorted by name - renders the index template - -Admin::CitesExtraordinaryMeetingsController - index - GET index - assigns @cites_extraordinary_meetings sorted by name - renders the index template - -Admin::CitesHashAnnotationsController - index - GET index - assigns @annotations sorted by parent_symbol and symbol - renders the index template - -Admin::CitesPcsController - index - GET index - assigns @cites_pcs sorted by name - renders the index template - -Admin::CitesSuspensionNotificationsController - index - GET index - assigns @cites_suspension_notifications sorted by name - renders the index template - -Admin::CitesSuspensionsController - GET index - renders the index template - assigns @cites_suspensions - GET new - renders the new template - assigns @geo_entities (country and territory) with two objects - POST create - renders new when not successful - when successful - renders index - GET edit - renders the edit template - assigns @geo_entities (country and territory) with two objects - PUT update - renders edit when not successful - when successful - redirects to taxon_concepts cites suspensions page - DELETE destroy - redirects after delete - -Admin::CitesTcsController - index - GET index - assigns @cites_tcs sorted by name - renders the index template - -Admin::DesignationsController - GET index - GET index - assigns @designations sorted by name - renders the index template - XHR GET index JSON - renders json for dropdown - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::DistributionsController - XHR GET 'new' - returns http success and renders the new template - assigns @geo_entities (country and territory) with two objects - assigns the distribution variable - XHR POST 'create' - renders create when successful and has an existing reference - renders create when successful and is creating a reference - XHR GET edit - renders the new template - assigns the distribution variable - assigns @geo_entities (country and territory) with two objects - XHR PUT update - responds with 200 when successful - DELETE destroy - redirects after delete - -Admin::DocumentBatchesController - GET new - when no event - renders the new template - when event - renders the new template - POST create - when no event - creates a new Document - redirects to index when successful - does not create a new Document - renders new when not successful - when event - redirects to index when successful - renders new when not successful - -Admin::DocumentsController - index - GET index - assigns @documents sorted by time of creation - search - runs a full text search on title (FAILED - 1) - retrieves documents inclusive of the given start date - retrieves documents inclusive of the given end date - retrieves documents after the given date - retrieves documents before the given date - ignores invalid dates - retrieves documents for taxon concept - retrieves documents for geo entity - by proposal outcome - retrieves documents for tag - by document tags - retrieves documents for review_phase tag - retrieves documents for process_stage tag - when no event - renders the index template - when event - renders the event/documents/index template - assigns @documents for event, sorted by title - when secretariat is logged in - returns only public documents - GET edit - renders the edit template - PUT update - when no event - redirects to index when successful - renders new when not successful - when event - redirects to index when successful - renders new when not successful - with nested review_details attributes - assign review phase to Review - assign process stage to Review - assign recommended category to Review - with nested proposal_details attributes - assign outcome to Proposal - DELETE destroy - redirects after delete - XHR GET JSON autocomplete - When no event specified - returns properly formatted json - When an event is specified - returns properly formatted json - -Admin::EcSrgsController - index - GET index - assigns @ec_srgs sorted by name - renders the index template - -Admin::EuCouncilRegulationsController - index - GET index - assigns @eu_regulations sorted by effective_at - renders the index template - -Admin::EuHashAnnotationsController - index - GET index - assigns @annotations sorted by parent_symbol and symbol - renders the index template - -Admin::EuImplementingRegulationsController - index - GET index - assigns @eu_regulations sorted by effective_at - renders the index template - -Admin::EuOpinionsController - GET index - renders the index template - renders the taxon_concepts_layout - GET new - renders the new template - assigns @geo_entities (country and territory) with two objects - POST create - when successful - when intersessional document is present - redirects to the EU Opinions index - when event is present - redirects to the EU Opinions index - when not successful - renders new - GET edit - renders the edit template - assigns @geo_entities - PUT update - when successful - when eu decision type is present - renders taxon_concepts EU Opinions page - when eu decision type is not present - renders taxon_concepts EU Opinions page - when event is present - renders taxon_concepts EU Opinions page - when event is not present - renders taxon_concepts EU Opinions page - when not successful - when eu decision type is present - renders new - when eu decision type is not present - renders new - when both eu_decision_type and srg_history are empty - renders new - when event is present - renders new - when event is not present - renders new - when both event and intersessional doc are empty - renders new - when both event and intersessional doc are present - renders new - DELETE destroy - redirects after delete - -Admin::EuRegulationsController - index - GET index - assigns @eu_regulations sorted by effective_at - renders the index template - XHR POST activate - renders create when successful - -Admin::EuSuspensionRegulationsController - index - GET index - assigns @eu_suspension_regulations sorted by effective_at - renders the index template - XHR POST activate - renders create when successful - -Admin::EuSuspensionsController - GET index - renders the index template - renders the admin layout - DELETE destroy - redirects after delete - -Admin::EventDocumentsController - ordering - GET show_order - assigns @documents sorted by sort index - POST update_order - updates sort index for collection of documents (FAILED - 2) - -Admin::EventsController - index - GET index - assigns @events sorted by name - renders the index template - XHR GET new - renders the new template - assigns the event variable - XHR POST create - renders create when successful - renders new when not successful - XHR GET edit - renders the edit template - assigns the hybrid_relationship variable - XHR PUT update JSON - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::ExportsController - GET index - renders the index template - GET download with data_type=Names - all -sh: 1: psql: not found - returns taxon concepts names file (FAILED - 3) - redirects when no results - CITES_EU -sh: 1: psql: not found - returns CITES_EU taxon concepts names file (FAILED - 4) - redirects when no results - CMS -sh: 1: psql: not found - returns CMS taxon concepts names file (FAILED - 5) - redirects when no results - GET download with data_type=Distributions - all -sh: 1: psql: not found - returns taxon concepts distributions file (FAILED - 6) - redirects when no results - CITES_EU -sh: 1: psql: not found - returns CITES_EU taxon concepts distributions file (FAILED - 7) - redirects when no results - CMS -sh: 1: psql: not found - returns CMS taxon concepts distributions file (FAILED - 8) - redirects when no results - -Admin::GeoEntitiesController - index - GET index - assigns @geo_entities sorted by name - renders the index template - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update JSON - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::HybridRelationshipsController - XHR GET new - renders the new template - assigns the hybrid_relationship variable - XHR POST create - renders create when successful - renders new when not successful - XHR GET edit - renders the edit template - assigns the hybrid_relationship variable - XHR PUT update - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::InstrumentsController - GET index - GET index - assigns @instruments sorted by name - renders the index template - XHR GET index JSON - renders json for dropdown - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - fails to delete instrument because there are dependent objects - -Admin::LanguagesController - GET index - assigns @languages sorted by iso_code1 - renders the index template - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::ListingChangesController - GET index - assigns @listing_changes sorted by effective_at - renders the index template - renders the admin layout - DELETE destroy - redirects after delete - -Admin::NomenclatureChanges::LumpController - GET show - inputs - renders the inputs template - outputs - renders the outputs template - reassignments - renders the notes template - renders the summary template - when legislation present - renders the legislation template - when no legislation - redirects to next step - POST create - redirects to lump wizard - PUT update - when successful - redirects to next step - when unsuccessful - re-renders step - when last step - when user is secretariat - redirects to admin root path - when user is manager - redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) - Previous button - when step is legislation - renders notes step - when step is summary - when legislation - renders legislation step - when no legislation - redirects to notes step - -Admin::NomenclatureChanges::SplitController - GET show - inputs - renders the inputs template - outputs - renders the outputs template - reassignments - renders the notes template - renders the summary template - when children present - renders the children template - when no children - redirects to next step - when names present - renders the names template - when no names - redirects to next step - when distribution present - renders the distribution template - when no distribution - redirects to next step - when legislation present - renders the legislation template - when no legislation - redirects to next step - POST create - redirects to split wizard - PUT update - when successful - redirects to next step - when unsuccessful - re-renders step - when last step - when user is secretariat - redirects to admin root path - when user is manager - redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) - Previous button - when step is names - when children - renders children template - when no children - redirects to notes step - when step is distribution - when names - renders names template - when no names and no children - redirects to notes step - when step is legislation - when distribution - renders distribution template - when no distribution and no names - redirects to children step - when step is summary - when legislation - renders legislation template - when no legislation and no distribution - redirects to names step - -Admin::NomenclatureChanges::StatusSwapController - GET show - primary_output - renders the primary_output template - swap - renders the swap template - reassignments - when legislation present - renders the legislation template - when no legislation - redirects to next step - summary - renders the summary template - POST create - redirects to status_change wizard - PUT update - when successful - redirects to next step - when unsuccessful - re-renders step - when last step - when user is secretariat - redirects to admin root path - when user is manager - redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) - -Admin::NomenclatureChanges::StatusToAcceptedController - GET show - primary_output - renders the primary_output template - summary - renders the summary template - POST create - redirects to status_change wizard - PUT update - when successful - redirects to next step - when unsuccessful - re-renders step - when last step - when user is secretariat - redirects to admin root path - when user is manager - redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) - -Admin::NomenclatureChanges::StatusToSynonymController - GET show - primary_output - renders the primary_output template - relay - renders the relay template - summary - renders the summary template - POST create - redirects to status_change wizard - PUT update - when successful - redirects to next step - when unsuccessful - re-renders step - when last step - when user is secretariat - redirects to admin root path - when user is manager - redirects to nomenclature changes path (PENDING: Strange render mismatch after upgrading to Rails 4) - -Admin::NomenclatureChangesController - GET index - assigns @nomenclature_changes sorted by designation and name - renders the index template - DELETE destroy - redirects after delete - -Admin::RanksController - GET index - assigns @ranks sorted by taxonomic position - renders the index template - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::ReferencesController - index - GET index - assigns @references sorted by citation - renders the index template - XHR GET index JSON - renders json for dropdown - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update JSON - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::SpeciesListingsController - index - assigns @species_listings sorted by designation and name - renders the index template - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::SrgHistoriesController - GET index - renders the index template - POST create - when successful - renders the create js template - when not successful - renders new - PUT update - when successful - renders the create js template - when not successful - renders new - DELETE destroy - redirects after delete - -Admin::SynonymRelationshipsController - XHR GET new - renders the new template - assigns the synonym_relationship variable - XHR POST create - renders create when successful - renders new when not successful - XHR GET edit - renders the edit template - assigns the synonym_relationship variable - XHR PUT update - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::TagsController - GET index - renders the index template - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update - when JSON - responds with 200 when successful - responds with json error when not successful - DELETE destroy - redirects after delete - -Admin::TaxonCitesSuspensionsController - GET index - renders the index template - renders the taxon_concepts_layout - GET new - renders the new template - POST create - renders new when not successful - when successful - renders index - GET edit - renders the edit template - PUT update - renders edit when not successful - when successful - renders taxon_concepts cites suspensions page - DELETE destroy - redirects after delete - Authorization for contributors - GET index - renders the index template - renders the taxon_concepts_layout - DELETE destroy - fails to delete and redirects - -Admin::TaxonCommonsController - XHR GET 'new' - returns http success and renders the new template - XHR POST create - renders create when successful - renders new when not successful - XHR GET edit - renders the edit template - assigns the taxon common variable - XHR PUT update - renders create when successful - renders new when not successful - DELETE destroy - redirects after delete - ChangeObserver updates TaxonConcept's dependents_updated_at - when TaxonCommon is changed - updates associated @taxon_concept's - dependents_updated_at when taxon common is updated - updates associated @taxon_concept's - dependents_updated_at when taxon common is deleted - Authorization for contributors - DELETE destroy - fails to delete and redirects - -Admin::TaxonConceptCommentsController - GET index - renders the index template - POST create - redirects to index with notice when success - PUT update - redirects to index with notice when success - -Admin::TaxonConceptReferencesController - XHR POST create - renders create when successful - renders new when not successful - XHR GET edit - renders the edit template - assigns the taxon concept reference variable - XHR PUT update - renders create when successful - renders new when not successful - XHR GET 'new' - returns http success and renders the new template - DELETE destroy - redirects after delete - -Admin::TaxonConceptsController - GET index - renders the index template - redirects if 1 result - assigns taxa in taxonomic order - XHR POST create - renders create when successful - renders new when not successful - renders new_synonym when not successful S - renders new_hybrid when not successful H - renders new_synonym when not successful N - XHR PUT update - when JSON - responds with 200 when successful - responds with json error when not successful - when HTML - redirects to edit when successful - renders edit when not successful - DELETE destroy - redirects after delete - DELETE destroy doesn't work for non managers - redirects to admin root path and doesn't delete - when E-library Viewer - redirects to root path - redirects to root path and doesn't delete - XHR GET JSON autocomplete - returns properly formatted json - -Admin::TaxonEuSuspensionsController - GET index - renders the index template - renders the taxon_concepts_layout - GET new - renders the new template - assigns @geo_entities (country and territory) with two objects - POST create - when successful - redirects to the EU suspensions index - when not successful - renders new - GET edit - renders the edit template - assigns @geo_entities - PUT update - when successful - when eu_decision_type is present - renders taxon_concepts EU suspensions page - when eu_decision_type is not present - renders taxon_concepts EU suspensions page - when not successful - when eu_decision_type is present - renders new - when eu_decision_type is not present - renders new - when both eu_decision_type and srg_history are empty - renders new - DELETE destroy - redirects after delete - Authorization for contributors - GET index - renders the index template - renders the taxon_concepts_layout - DELETE destroy - fails to delete and redirects - -Admin::TaxonListingChangesController - GET index - assigns @listing_changes sorted by effective_at - renders the index template - renders the taxon_concepts_layout - GET new - renders the new template - assigns @listing_change - POST create - renders new when not successful - when successful - redirects to taxon_concept listing_changes page - GET edit - renders the edit template - assigns the listing_change variable - PUT update - renders edit when not successful - redirects to index page and removes annotation when fields cleared - when successful - redirects to taxon_concept listing_changes page - redirects to eu regulation listing changes page when param is set - DELETE destroy - redirects after delete - Authorization for contributors - GET index - renders the index template - renders the taxon_concepts_layout - DELETE destroy - fails to delete and redirects - -Admin::TaxonQuotasController - GET index - renders the index template - renders the taxon_concepts_layout - GET new - renders the new template - assigns @geo_entities (country and territory) with two objects - POST create - renders new when not successful - when successful - renders index - GET edit - renders the edit template - assigns @geo_entities (country and territory) with two objects - PUT update - renders new when not successful - when successful - renders taxon_concepts quotas page - DELETE destroy - redirects after delete - Authorization for contributors - GET index - renders the index template - renders the taxon_concepts_layout - DELETE destroy - fails to delete and redirects - -Admin::TaxonRelationshipsController - GET index - assigns @taxon_relationships - renders the index template - renders the taxon_concepts_layout - XHR POST create - renders create when successful - renders new when not successful - DELETE destroy - when relationship is bidirectional - destroys relationship for taxon concept - should change #count by -2 - destroys relationship for other taxon concept - should change #count by -2 - when relationship is not bidirectional - destroys relationship for taxon concept - should change #count by -1 - destroys relationship for other taxon concept - should change #count by -1 - -Admin::TaxonomiesController - index - GET index - assigns @taxonomies sorted by name - renders the index template - XHR GET index JSON - renders json for dropdown - XHR POST create - renders create when successful - renders new when not successful - XHR PUT update JSON - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - Authorization for contributors - GET index - redirects to admin root - DELETE destroy - fails to delete and redirects to admin_root_path - -Admin::TradeNameRelationshipsController - XHR GET new - renders the new template - assigns the trade_name_relationship variable - XHR POST create - renders create when successful - renders new when not successful - XHR GET edit - renders the edit template - assigns the trade_name_relationship variable - XHR PUT update - responds with 200 when successful - responds with json when not successful - DELETE destroy - redirects after delete - -Admin::UsersController - index - GET index - renders the index template - XHR POST create - renders create when successful - renders new when not successful - XHR GET edit - renders the edit template - assigns the hybrid_relationship variable - XHR PUT update JS - responds with 200 when successful - responds with template new when not successful - DELETE destroy -unknown OID 3802: failed to recognize type of 'validation_report'. It will be treated as String. - redirects after delete - -Api::V1::AutoCompleteTaxonConceptsController -Procedure: taxonomy - GET index - returns 1 result when searching for species name and filtering for rank SPECIES (FAILED - 9) - returns 3 results when searching for species name and not filtering by rank (FAILED - 10) - -Api::V1::DocumentGeoEntitiesController - when searching by taxon concept name -Procedure: taxonomy - returns Poland when searching by wolf (FAILED - 11) - returns 0 geo entities when no match for taxon name (FAILED - 12) - returns all geo entities when no taxon name given (FAILED - 13) - -Api::V1::DocumentsController - GET index returns all documents - GET index contributor - returns all documents - GET index manager - returns all documents - GET index returns only public documents - GET index api user - returns only public documents - GET index no user - returns only public documents - GET index returns only public documents for secretariat role - GET index api user - returns only public documents - show action fails - should return 403 status when permission denied - GET should retrieve documents with no event_type - returns documents with no event_type - download documents - single document selected - should return 404 if file is missing - should return zip file if file is found - multiple documents selected - should return 404 if all files are missing - should return zip file if at least a file is found - cascading documents logic - should get subspecies documents - -Api::V1::EventsController - GET index - returns only E-library events most recent first (FAILED - 14) - -Api::V1::GeoEntitiesController - GET index - returns regions - returns countries & territories - -Api::V1::PurposesController - GET index - returns purposes (FAILED - 15) - -Api::V1::SourcesController - GET index - returns sources (FAILED - 16) - -Api::V1::TaxonConceptsController - GET index - logs with Ahoy with different parameters (FAILED - 17) - -Api::V1::TermsController - GET index - returns terms (FAILED - 18) - -Api::V1::UnitsController - GET index - returns units (FAILED - 19) - -Checklist::GeoEntitiesController - GET index - returns regions - returns countries & territories - -Checklist::TaxonConceptsController - XHR GET JSON autocomplete -Procedure: taxonomy - when searching by accepted name - returns 1 result (FAILED - 20) - when query blank - returns 0 results (FAILED - 21) - -CitesTrade::ExportsController - GET download - raw format - returns count of shipments - comptab -sh: 1: psql: not found - returns comptab shipments file (FAILED - 22) -sh: 1: psql: not found - logs download information from public interface to the TradeDataDownload model (FAILED - 23) - when shipments cannot be retrieved - redirects to home page - -CitesTrade::ShipmentsController - GET index -Procedure: taxonomy - should return all comptab shipments (FAILED - 24) -Procedure: taxonomy - should return all gross_exports shipments (FAILED - 25) -Procedure: taxonomy - should return genus & species shipments when searching by genus (FAILED - 26) -Procedure: taxonomy - should return family, genus & species shipments when searching by family (FAILED - 27) -Procedure: taxonomy - should return genus shipments when searching by taxon (FAILED - 28) - serializer -Procedure: taxonomy - should return comptab export when report_type invalid (FAILED - 29) -Procedure: taxonomy - should return comptab export when report_type = comptab (FAILED - 30) -Procedure: taxonomy - should return gross net export when report_type = gross_exports (FAILED - 31) - -PagesController - GET eu_legislation - assigns annex regulations sorted by effective_at - assigns suspension regulations - -RegistrationsController - when editing own account -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:account_update, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) - should update name -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:account_update, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) - should update password -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:account_update, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) - should not update that account if not valid - when editing another user's account -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:account_update, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) - should not update that account - when signing up -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:account_update, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) -DEPRECATION WARNING: [Devise] Parameter sanitization through a "Devise::ParameterSanitizer#sign_up" method is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method on your sanitizer `initialize` method. - - class Devise::ParameterSanitizer < Devise::ParameterSanitizer - def initialize(*) - super - permit(:sign_up, keys: [:param1, :param2, :param3]) - end - end - (called from block (4 levels) in at /SAPI/spec/controllers/registrations_controller_spec.rb:51) - should create an account with the role set to api (FAILED - 32) - -Species::ExportsController - when data type and filters not given - returns unprocessable entity status - with ip address to csv separator conversion - sets separator to comma with local ip address - sets separator to comma with UK ip address - sets separator to semicolon with AF ip address - sets separator back to comma when a user overrides the encoded default - sets separator to comma when IP address is nil - sets separator to comma when IP address is unknown - -Trade::AnnualReportUploadsController - GET index -sh: 1: psql: not found - should return all annual report uploads (FAILED - 33) -sh: 1: psql: not found - should return annual report uploads in progress (FAILED - 34) - GET show -sh: 1: psql: not found - should return success (FAILED - 35) - POST create -sh: 1: psql: not found - should return success in jQuery File Upload way (FAILED - 36) - should return error in jQuery File Upload way - -Trade::EmberController - GET 'start' - returns http success - -Trade::ExportsController - GET download - raw format - returns count of shipments -sh: 1: psql: not found - does not log download information from the admin interface - when shipments cannot be retrieved - redirects to home page - -Trade::SandboxShipmentsController - PUT update -sh: 1: psql: not found - should return success when taxon_name not set (FAILED - 37) -sh: 1: psql: not found - should return success when taxon_name does not exist (FAILED - 38) - DELETE destroy -sh: 1: psql: not found - should return success (FAILED - 39) - POST update_batch -sh: 1: psql: not found - should return success (FAILED - 40) - POST destroy_batch -sh: 1: psql: not found - should return success (FAILED - 41) - -Trade::ShipmentsController - GET index -Procedure: taxonomy - should return all shipments (FAILED - 42) -Procedure: taxonomy - should return genus & species shipments when searching by genus (FAILED - 43) -Procedure: taxonomy - should return 1 shipment when searching for reporter_type I (FAILED - 44) - PUT update -Procedure: taxonomy - should auto resolve accepted taxon when blank (FAILED - 45) -Procedure: taxonomy - should not auto resolve accepted taxon when given (FAILED - 46) -Procedure: taxonomy - should delete orphaned permits (FAILED - 47) - POST update_batch -Procedure: taxonomy - should change reporter type from I to E (FAILED - 48) -Procedure: taxonomy - should change reporter type from E to I (FAILED - 49) -Procedure: taxonomy - should update year (FAILED - 50) -Procedure: taxonomy - should auto resolve accepted taxon when blank (FAILED - 51) -Procedure: taxonomy - should not auto resolve accepted taxon when given (FAILED - 52) -Procedure: taxonomy - should set permit number to blank and delete orphaned permits (FAILED - 53) - POST destroy_batch -Procedure: taxonomy - should delete 1 shipment (FAILED - 54) -Procedure: taxonomy - should delete 5 shipment (FAILED - 55) -Procedure: taxonomy - should delete 2 shipments (FAILED - 56) -Procedure: taxonomy - should delete 1 shipments (FAILED - 57) -Procedure: taxonomy - should delete all shipments (FAILED - 58) -Procedure: taxonomy - shouldn't delete any shipments (FAILED - 59) -Procedure: taxonomy - should delete 1 shipment (FAILED - 60) -Procedure: taxonomy - should delete 3 shipment (FAILED - 61) -Procedure: taxonomy - should delete 0 shipments (FAILED - 62) -Procedure: taxonomy - should delete 4 shipments (FAILED - 63) -Procedure: taxonomy - should delete orphaned permits (FAILED - 64) - DELETE destroy -Procedure: taxonomy - should delete 1 shipment (FAILED - 65) -Procedure: taxonomy - should delete orphaned permits (FAILED - 66) - -Trade::ValidationErrorsController - PUT update -sh: 1: psql: not found - should update is_ignored (FAILED - 67) - GET show -sh: 1: psql: not found - should return success (FAILED - 68) - -Trade::ValidationRulesController - GET index - should return success - -Admin::NomenclatureChangesHelper - split_blurb - split with input - should match "Genus1 lupus2465" - split with outputs - should match "Genus1 lupus2473" - split with output new taxon - should match "Genus1 lupus2488" - lump_blurb - lump with inputs - should match "Lupus2496 lupus2495" - lump with output - should match "Lupus2528 lupus2527" - lump with output new taxon - should match "Errorus fatalus" - status_change_blurb - status upgrade with primary output - should match "Ridiculus fatalus" - status upgrade with swap - should match "Confundus totalus" - -AdminHelper - edit_icon - ouputs pencil icon for edit - delete_icon - ouputs bin icon for delete - true_false_icon - outputs tick icon for true - outputs blank for false - -ListingChangesHelper - geo_entities_tooltip - outputs all geo entities comma separated - annotation_tooltip - outputs the regular annotation in both short and long English form - hash_annotation_tooltip - outputs the hash annotation in long English form - excluded_geo_entities_tooltip - no exclusions - should output blank exception - geographic exclusion - should list geographic exception - excluded_taxon_concepts_tooltip - no exclusions - should output blank exception - taxonomic exclusion - should list taxonomic exception - -Home page -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:account_update, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) - redirects Data Manager to admin root path -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:account_update, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) - redirects Data Contributor to admin root path -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:account_update, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) - redirects E-library Viewer to public root path -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:sign_up, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:43) -DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.1. -Please use the `permit` method to add or remove any key: - - To add any new key, use the `keys` keyword argument: - devise_parameter_sanitizer.permit(:account_update, keys: [:param1, :param2, :param3]) - - To remove any existing key, use the `except` keyword argument: - devise_parameter_sanitizer.permit(:account_update, except: [:email]) - (called from configure_permitted_parameters at /SAPI/app/controllers/application_controller.rb:44) - redirects API User to public root path - -Annotation - full_name - when parent_symbol given - example at ./spec/models/annotation_spec.rb:33 - when event given - example at ./spec/models/annotation_spec.rb:40 - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - when listing changes - should be falsey - when hashed listing changes - should be falsey - -ApiRequest - top_50_most_active_users - should eq 3398 - recent_requests - example at ./spec/models/api_request_spec.rb:63 (FAILED - 69) - requests_by_response_status - should eq {"200"=>1, "400"=>0, "401"=>0, "404"=>0, "422"=>0, "500"=>1} - requests_by_controller - should eq {"taxon_concepts"=>2, "distributions"=>0, "cites_legislation"=>0, "eu_legislation"=>0, "references"=>0} - -ChangeType - abbreviation - change type with single word name - should == "Wor" - change type with two words name - should == "Wor-Wor" - -Checklist -Procedure: taxonomy - ann_symbol - for species Caiman latirostris - example at ./spec/models/checklist/annotations_spec.rb:16 (FAILED - 70) - for species Panax ginseng - example at ./spec/models/checklist/annotations_spec.rb:20 (FAILED - 71) - -Checklist -Procedure: taxonomy - search by cites populations - when America - example at ./spec/models/checklist/appendix_population_and_region_spec.rb:14 (FAILED - 72) - when Mexico - example at ./spec/models/checklist/appendix_population_and_region_spec.rb:25 (FAILED - 73) - when Canada - example at ./spec/models/checklist/appendix_population_and_region_spec.rb:36 (FAILED - 74) - when Argentina - example at ./spec/models/checklist/appendix_population_and_region_spec.rb:47 (FAILED - 75) - when South America - example at ./spec/models/checklist/appendix_population_and_region_spec.rb:58 (FAILED - 76) - when North America - example at ./spec/models/checklist/appendix_population_and_region_spec.rb:69 (FAILED - 77) - when North America and Argentina - example at ./spec/models/checklist/appendix_population_and_region_spec.rb:81 (FAILED - 78) - -Checklist -Procedure: taxonomy - search by cites populations - when Nepal - example at ./spec/models/checklist/appendix_population_spec.rb:15 (FAILED - 79) - when Poland - example at ./spec/models/checklist/appendix_population_spec.rb:26 (FAILED - 80) - search by cites appendices - when App I - example at ./spec/models/checklist/appendix_population_spec.rb:40 (FAILED - 81) - when App II - example at ./spec/models/checklist/appendix_population_spec.rb:51 (FAILED - 82) - when App III - example at ./spec/models/checklist/appendix_population_spec.rb:62 (FAILED - 83) - search by cites populations and appendices - when Nepal - when App I - example at ./spec/models/checklist/appendix_population_spec.rb:78 (FAILED - 84) - when App II - example at ./spec/models/checklist/appendix_population_spec.rb:90 (FAILED - 85) - when Poland - when App I - example at ./spec/models/checklist/appendix_population_spec.rb:104 (FAILED - 86) - when App II - example at ./spec/models/checklist/appendix_population_spec.rb:116 (FAILED - 87) - when Poland or Nepal - when App I - example at ./spec/models/checklist/appendix_population_spec.rb:130 (FAILED - 88) - when App II - example at ./spec/models/checklist/appendix_population_spec.rb:142 (FAILED - 89) - when App I or II - when Poland - example at ./spec/models/checklist/appendix_population_spec.rb:156 (FAILED - 90) - when Nepal - example at ./spec/models/checklist/appendix_population_spec.rb:168 (FAILED - 91) - -Checklist -Procedure: taxonomy - when filtering by appendix - I - should return Cacatua goffiniana (FAILED - 92) - should not return Agapornis roseicollis (FAILED - 93) - -Checklist::Checklist - summarise_filters - when params empty - should == "All results" - when 1 region - should == "Results from 1 region" - when > 1 region - should == "Results from 2 regions" - -Checklist -Procedure: taxonomy - when common names displayed - should return all English names for Arctocephalus australis: 'South American Fur Seal, Southern Fur Seal' (FAILED - 94) - should return all Spanish names for Arctocephalus australis: 'Lobo fino sudamericano, Oso marino austral' (FAILED - 95) - should return all French names for Arctocephalus australis: 'Otarie à fourrure australe' (FAILED - 96) - should return all English names for Arctocephalus spp.: 'Fur seals, Southern fur seals' (FAILED - 97) - should return all Spanish names for Arctocephalus spp.: 'Osos marinos' (FAILED - 98) - should return all French names for Arctocephalus spp.: 'Arctocéphales du sud, Otaries à fourrure, Otaries à fourrure du sud' (FAILED - 99) - should include a species without any common names defined (FAILED - 100) - -Checklist::HigherTaxaInjector - run - when same phylum - when two species from different classes -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:122 (FAILED - 101) - when two species from different classes and expand_headers set -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:139 (FAILED - 102) - when same order - when two species from different families -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:158 (FAILED - 103) - when two species from different families and skip family set -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:171 (FAILED - 104) - higher_taxa_headers - when same genus - when one species -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:188 (FAILED - 105) - when one species and skip family set -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:201 (FAILED - 106) - when one species and expand headers set -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:213 (FAILED - 107) - when two species -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:228 (FAILED - 108) - when species and subspecies -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:241 (FAILED - 109) - when same family - when two species from different genera -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:256 (FAILED - 110) - when same order - when two species from different families -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:271 (FAILED - 111) - when two species from different families and expand headers set -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:286 (FAILED - 112) - when genus and different family -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:301 (FAILED - 113) - when family and genus in different family -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:316 (FAILED - 114) - when same class - when order and genus from different order -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:333 (FAILED - 115) - when order and genus from different order and expand headers set -Procedure: taxonomy - example at ./spec/models/checklist/higher_taxa_injector_spec.rb:348 (FAILED - 116) - -Checklist::HigherTaxaItem - ancestors_path - when animal - should == "Chordata,Reptilia,Crocodylia,Alligatoridae" - when plant - should == "Agavaceae" - -Checklist -Procedure: taxonomy - when taxonomic order - Plantae - should include Agave (Agavaceae) before Panax (Araliaceae) (FAILED - 117) - Animalia - should include birds after last mammal (FAILED - 118) - should include Falconiformes (Aves) before Psittaciformes (Aves) (FAILED - 119) - should include Cathartidae within Falconiformes (FAILED - 120) - should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) (FAILED - 121) - should include Cathartidae (Falconiformes) before Cacatuidae (Psittaciformes) (FAILED - 122) - should include Hirudo medicinalis at the very end (after all Chordata) (FAILED - 123) - when alphabetical order - should include Falconiformes (Aves) before Psittaciformes (Aves) (FAILED - 124) - should include Cathartidae before Falconiformes (FAILED - 125) - should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) (FAILED - 126) - should include Cathartidae (Falconiformes) after Cacatuidae (Psittaciformes) (FAILED - 127) - -Checklist::Pdf::HistoryAnnotationsKey - annotations_key - should == "\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in" - hash_annotations_key -Procedure: taxonomy - example at ./spec/models/checklist/pdf/history_annotations_key_spec.rb:59 (FAILED - 128) - -Checklist::Pdf::History - higher_taxon_name - when family -Procedure: taxonomy - example at ./spec/models/checklist/pdf/history_spec.rb:38 (FAILED - 129) - listed_taxon_name - when family -Procedure: taxonomy - example at ./spec/models/checklist/pdf/history_spec.rb:56 (FAILED - 130) - when genus -Procedure: taxonomy - example at ./spec/models/checklist/pdf/history_spec.rb:71 (FAILED - 131) - annotation_for_language - annotation with footnote -Procedure: taxonomy - example at ./spec/models/checklist/pdf/history_spec.rb:99 (FAILED - 132) - -Checklist::Pdf::IndexAnnotationsKey - annotations_key - should == "\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in" - hash_annotations_key -Procedure: taxonomy - example at ./spec/models/checklist/pdf/index_annotations_key_spec.rb:46 (FAILED - 133) - non_hash_annotations_key -Procedure: taxonomy - example at ./spec/models/checklist/pdf/index_annotations_key_spec.rb:102 (FAILED - 134) - -Checklist::Pdf::IndexFetcher - with common names -Procedure: taxonomy - example at ./spec/models/checklist/pdf/index_fetcher_spec.rb:49 (FAILED - 135) - with synonyms and authors -Procedure: taxonomy - example at ./spec/models/checklist/pdf/index_fetcher_spec.rb:77 (FAILED - 136) - -Checklist -Procedure: taxonomy - when filtering by name - by scientific name - example at ./spec/models/checklist/scientific_name_spec.rb:15 (FAILED - 137) - by common name - example at ./spec/models/checklist/scientific_name_spec.rb:28 (FAILED - 138) - -Checklist -Procedure: taxonomy - when synonyms displayed - should return Alligator cynocephalus as synonym for Caiman latirostris (FAILED - 139) - -Species::TaxonConceptPrefixMatcher -Procedure: taxonomy - results - when query in capital letters - example at ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:13 (FAILED - 140) - when match on accepted name - example at ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:22 (FAILED - 141) - when match on synonym - example at ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:31 (FAILED - 142) - when match on common name - example at ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:40 (FAILED - 143) - -Checklist::Timeline - when deleted -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:23 (FAILED - 144) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:24 (FAILED - 145) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:25 (FAILED - 146) - when deleted from III multiple times -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:83 (FAILED - 147) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:84 (FAILED - 148) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:85 (FAILED - 149) - when deleted and then readded -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:112 (FAILED - 150) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:113 (FAILED - 151) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:114 (FAILED - 152) - when reservation withdrawn -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:154 (FAILED - 153) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:155 (FAILED - 154) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:156 (FAILED - 155) - when reservation withdrawn and then readded -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:202 (FAILED - 156) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:203 (FAILED - 157) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:204 (FAILED - 158) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:205 (FAILED - 159) - when added multiple times -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:227 (FAILED - 160) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:231 (FAILED - 161) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:232 (FAILED - 162) - when automatic deletion from ancestor listing -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:256 (FAILED - 163) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:260 (FAILED - 164) -Procedure: taxonomy - example at ./spec/models/checklist/timeline_spec.rb:261 (FAILED - 165) - -Checklist::TimelinesForTaxonConcept - timelines - when Appendix I -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:25 (FAILED - 166) -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:26 (FAILED - 167) - when Appendix III -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:46 (FAILED - 168) -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:47 (FAILED - 169) - when Appendix III reservation -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:67 (FAILED - 170) -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:68 (FAILED - 171) -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:69 (FAILED - 172) - timeline_years - when in 1990 -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:81 (FAILED - 173) -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:82 (FAILED - 174) -Procedure: taxonomy - example at ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:83 (FAILED - 175) - -CitesCaptivityProcess - add some examples to (or delete) /SAPI/spec/models/cites_captivity_process_spec.rb (PENDING: Not yet implemented) - -CitesCop - create - when designation invalid - should be invalid - should have 1 error on :designation_id - when effective_at is blank - should be invalid - should have 1 error on :effective_at - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - when listing changes - should be falsey - -CitesSuspensionNotification - create - when designation invalid - should be invalid - should have 1 error on :designation_id - when effective_at is blank - should be invalid - should have 1 error on :effective_at - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - when start notification - should be falsey - when end notification - should be falsey - when confirmation notification, make sure it gets destroyed - example at ./spec/models/cites_suspension_notification_spec.rb:85 (FAILED - 176) - end_date_formatted - should == "10/05/2012" - bases_for_suspension - example at ./spec/models/cites_suspension_notification_spec.rb:103 - -CitesSuspension - touching taxa - create - when taxon specific suspension - should change result - when global suspension - should change result - when suspension at higher taxonomic level - should change result - update - when taxon specific suspension - should change result - when global suspension - should change result - should change result - when suspension at higher taxonomic level - should change result - destroy - when taxon specific suspension - should change result - when global suspension - should change result - when suspension at higher taxonomic level - should change result - validations - create - when start notification missing - should be invalid - should have 1 error on :start_notification_id - when start date greater than end date - should be invalid - should have 1 error on :start_date - when valid - should be valid - create - downloads cache should be populated - should not be empty - destroy - downloads cache should be cleared - should be empty - -CmsMapping - add some examples to (or delete) /SAPI/spec/models/cms_mapping_spec.rb (PENDING: Not yet implemented) - -CommonName - Generating PDF - english_to_pdf - should print last word before the first word, separated by comma - should print the last word before the other words, separated by comma - should print the single word, if the common name is composed of only one word - -DashboardStats - #new - takes three parameters and returns a DashboardStats object - #species -Procedure: taxonomy - has one results for argentina (FAILED - 177) - has no results for ghana (FAILED - 178) - -DashboardStats - #trade - when no time range specified -Procedure: taxonomy - argentina should have 40 exported animals and no imports (FAILED - 179) - when time range specified -Procedure: taxonomy - argentina should have no exports in 2012-2012 (FAILED - 180) - -Designation - create - when valid - should be valid - when name missing - should be invalid - should have 1 error on :name - when name duplicated - should be invalid - should have 1 error on :name - update - when updating a non-protected name - should be truthy - when updating a protected name - should be falsey - when updating taxonomy with no dependent objects attached - should be truthy - when updating taxonomy with dependent objects attached - should be falsey - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - should be falsey - when protected name - should be falsey - -DocumentBatch - save - when invalid - should be falsey - should not change result - when valid - should be truthy - should change result by 1 - -DocumentSearch - results - when searching by Swietenia macrophylla - should eq [645, 646, 647, 648, 649] - when searching by Brazil - should eq [654, 655, 656, 657] - when searching by Swietenia macrophylla in Brazil - should eq [661, 662] - when searching by Swietenia macrophylla in Brazil and Belize - should eq [667, 668, 669, 670] - documents_need_refreshing? - when no changes in last 5 minutes - should be falsey - when document created in last 5 minutes - should be truthy - when document destroyed in last 5 minutes - should be truthy - when document updated in last 5 minutes - should be truthy - citations_need_refreshing? - when no changes in last 5 minutes - should be falsey - when citation created in last 5 minutes - should be truthy - when citation destroyed in last 5 minutes - should be truthy - when citation updated in last 5 minutes - should be truthy - -Document - create - when date is blank - should be invalid - should have 1 error on :date - setting title from filename - should eq "Annual report upload exporter" - when specified designation conflicts with event - should eq # - when documents with same language and same primary document - should be invalid - should have 1 error on :primary_language_document_id - update - when primary document sort_index_updated - secondary document sort_index is in sync - when secondary document sort_index_updated - primary document sort_index is in sync - destroy - when secondary document destroyed - document count decreases by 1 - when primary document destroyed - document count decreases by 1 - secondary document becomes primary - -EuDecision - create - downloads cache should be populated -sh: 1: psql: not found - example at ./spec/models/eu_decision_spec.rb:68 (FAILED - 181) - save - Eu decision type and SRG history can't be blank at the same time - should be falsey - should have an error message - Eu decision creates correctly if only Eu decision type is populated - should be truthy - Eu decision creates correctly if only SRG history is populated - should be truthy - Eu decision creates correctly if both Eu decision type and SRG history are populated - should be truthy - destroy - downloads cache should be cleared - should be empty - -EuOpinion - create - when taxon concept missing - should be invalid - should have 1 error on :taxon_concept - when geo_entity missing - should be invalid - should have 1 error on :geo_entity - when start_date missing - should be invalid - should have 1 error on :start_date - when valid - should be valid - -EuRegulation - create - when eu_regulation to copy from given - should == 1 - when designation invalid - should be invalid - should have 1 error on :designation_id - when effective_at is blank - should be invalid - should have 1 error on :effective_at - activate - should be truthy - should == 1 - deactivate - should be falsey - should == 1 - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - when listing changes - should be truthy - -EuSuspension - create - when taxon concept missing - should be invalid - should have 1 error on :taxon_concept - when geo_entity missing - should be invalid - should have 1 error on :geo_entity - when valid - should be valid - is_current - when start_event and end_event not set - should be falsey - when start_event is set but date is in the future - should be falsey - when start_event is set but is not current - should be falsey - when start_event is set but date is in past or present - should be truthy - should be truthy - when end_event is set, but no start_event is set - should be falsey - when end_event is set, and start_event is set with date in future - should be falsey - when start_event is set, and end_event is set with date in the future - should be truthy - when start_event is set, and end_event is set with date in the past - should be falsey - start_date_formatted - when there's no start_event - should be empty - when there's start_event - should == "02/01/2024" - end_date_formatted - when there's no end_event - should be empty - when there's end_event - should == "02/01/2024" - -Event - create - when valid - should be valid - when name missing - should be invalid - should have 1 error on :name - when name duplicated - should be invalid - should have 1 error on :name - when url invalid - should be invalid - should have 1 error on :url - effective_at_formatted - should == "10/05/2012" - -GeoEntitySearch - results - when searching by geo entity types set - default set - default locale - should include # - should not include # - Checklist regions (1) - should include # - should eq 1 - Checklist countries & territories (2) - should not include # - should include # - should include # - should include # - should not include # - Species+ regions, countries & territories (3) - English locale - should include # - should not include # - should include # - should not include # - should eq 1 - should eq 2 - Spanish locale - should include # - should not include # - should include # - should not include # - should eq 2 - should eq 1 - Trade countries, territories and trade entities (4) - should not include # - should include # - should include # - should include # - should include # - cached_results - should not include # - -GeoEntity - nodes_and_descendants - Europe should contain Europe, Poland and Wolin - should include 2324, 2322, and 2323 - should == 3 - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - when distributions - should be falsey - when exported shipments - should be falsey - when imported shipments - should be falsey - when originated shipments - should be falsey - when connected geo entities - should be falsey - -HtmlToLatex - convert - when italics - when tag closed - should == "Text about \\textit{Foobarus lolus} and friends" - when tag not closed - should == "Text about \\textit{Foobarus lolus and friends}" - when paragraph - when tag closed - should == "Text, \\newline paragraph\\newline and some more text" - when tag not closed - should == "Text, \\newline paragraph and some more text" - when latex special characters - within tags - should == "\\textbf{Lolus \\& friends}" - outside of tags - should == "\\textbf{Lolus} \\& friends" - -TaxonRelationship - when hybrid - should include "Lolcatus lolatus x lolcatus" - should include "Lolcatus lolatus x lolcatus" - -ListingChange - validations - create - all fine with exception - should be valid - inclusion taxon concept is lower rank - should have 1 error on :inclusion_taxon_concept_id - species listing designation mismatch - should have 1 error on :species_listing_id - event designation mismatch - should have 1 error on :event_id - effective_at_formatted - should == "10/05/2012" - duplicates - example at ./spec/models/listing_change_spec.rb:103 - -NomenclatureChange::DeleteUnreassignedProcessor - run - delete unreassigned - should eq 1 - should eq 2 - should eq 1 - -NomenclatureChange::FullReassignment - process - when distributions present - should eq 1 - when references present - should eq 1 - when listing changes present - should eq 1 - when EU Opinions present - should eq 1 - when EU Suspensions present - should eq 1 - when CITES Quotas present - should eq 1 - when CITES Suspensions present - should eq 1 - when common names present - should eq 1 - when document citations present - should eq 1 - -NomenclatureChange::Input - validate - when nomenclature change not specified - should not be valid - when taxon concept not specified - should not be valid - -NomenclatureChange::Lump::Constructor - inputs - build_inputs - when previously no inputs in place - should not eq 0 - when previously inputs in place - should eq #, #]> - outputs - build_output - when previously no output in place - should not be nil - when previously output in place - should eq # - reassignments - build_input_and_output_notes - when previously no notes in place - should not be blank - should not be blank - when output = input - should be blank - when previously notes in place - should eq "blah" - should eq "blah" - build_parent_reassignments - when previously no reassignments in place - when no children - should eq 0 - when children - should eq 2 - when previously reassignments in place - should eq # - when output = input - should eq [#] - when previously reassignments in place - should eq # - build_name_reassignments - when previously no reassignments in place - when no names - should eq 0 - when names - should eq 2 - when previously reassignments in place - should eq # - when output = input - should eq [#] - build_distribution_reassignments - when previously no reassignments in place - when no distibutions - should eq 0 - when distributions - should eq 2 - when previously reassignments in place - should eq # - build_document_reassignments - when previously no reassignments in place - when no document citations - should eq 0 - when document citations - should eq 2 - build_legislation_reassignments - when previously no reassignments in place - when no CITES listings - should eq 0 - when CITES listings - should eq 1 - when previously reassignments in place - should eq # - build_common_names_reassignments - when previously no reassignments in place - when no common names - should eq 0 - when common names - should eq 1 - when previously reassignments in place - should eq #]> - build_references_reassignments - when previously no reassignments in place - when no references - should eq 0 - when references - should eq 1 - when previously reassignments in place - should eq #]> - -NomenclatureChange::OutputTaxonConceptProcessor - run - when output is existing taxon - should be nil - when output is new taxon - should eq "Errorus fatalus" - when output is existing taxon with new status - should be nil - should eq "A" - when output is existing taxon with new name - should eq "Errorus fatalus fatalus" - should eq "A" - should eq "Errorus lolcatus" - -NomenclatureChange::Lump::Processor - run - when outputs are existing taxa - should not change #count - should not change #full_name - relationships and trade - should be is synonym - should include # "SPECIES", "kingdom_id" => "24848", "kingdom_name" => "Lupus4801", "phylum_id" => "24849", "phylum_name" => "Lupus4800", "class_id" => "24850", "class_name" => "Lupus4799", "order_id" => "24851", "order_name" => "Lupus4798", "family_id" => "24852", "family_name" => "Lupus4797", "subfamily_id" => "24853", "subfamily_name" => "Lupus4796", "genus_id" => "24854", "genus_name" => "Lupus4795", "species_id" => "24855", "species_name" => "Lupus4794"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus4795 lupus4794", name_status: "A", created_at: "2024-01-04 16:46:10", updated_at: "2024-01-04 16:46:10", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3752, created_by_id: 3752, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should be empty - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2369, importer_id: 2368, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 24887, year: 2013, created_at: "2024-01-04 16:46:12", updated_at: "2024-01-04 16:46:12", sandbox_id: nil, reported_taxon_concept_id: 24887, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3754, created_by_id: 3754, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2371, importer_id: 2370, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 24911, year: 2013, created_at: "2024-01-04 16:46:13", updated_at: "2024-01-04 16:46:13", sandbox_id: nil, reported_taxon_concept_id: 24911, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3755, created_by_id: 3755, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - when output is new taxon - should change #count by 1 - relationships and trade - should be is synonym - should include # "25018", "genus_id" => "25022", "order_id" => "25019", "family_id" => "25020", "phylum_id" => "25017", "rank_name" => "SPECIES", "class_name" => "Lupus4961", "genus_name" => "Errorus", "kingdom_id" => "25016", "order_name" => "Lupus4960", "species_id" => "25023", "family_name" => "Lupus4959", "phylum_name" => "Lupus4962", "kingdom_name" => "Lupus4963", "species_name" => "Fatalus", "subfamily_id" => "25021", "subfamily_name" => "Lupus4958"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Errorus fatalus", name_status: "A", created_at: "2024-01-04 16:46:17", updated_at: "2024-01-04 16:46:17", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3758, created_by_id: 3758, dependents_updated_at: nil, nomenclature_note_en: " ", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2379, importer_id: 2378, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 25031, year: 2013, created_at: "2024-01-04 16:46:18", updated_at: "2024-01-04 16:46:18", sandbox_id: nil, reported_taxon_concept_id: 25031, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3759, created_by_id: 3759, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - when output is existing taxon with new status - should not change #count - should not change #full_name - relationships and trade - should be is synonym - should include # "SPECIES", "kingdom_id" => "25144", "kingdom_name" => "Lupus5089", "phylum_id" => "25145", "phylum_name" => "Lupus5088", "class_id" => "25146", "class_name" => "Lupus5087", "order_id" => "25147", "order_name" => "Lupus5086", "family_id" => "25148", "family_name" => "Lupus5085", "subfamily_id" => "25149", "subfamily_name" => "Lupus5084", "genus_id" => "25150", "genus_name" => "Lupus5083", "species_id" => "25151", "species_name" => "Lupus5082"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus5083 lupus5082", name_status: "A", created_at: "2024-01-04 16:46:22", updated_at: "2024-01-04 16:46:22", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3763, created_by_id: 3763, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2389, importer_id: 2388, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 25159, year: 2013, created_at: "2024-01-04 16:46:23", updated_at: "2024-01-04 16:46:23", sandbox_id: nil, reported_taxon_concept_id: 25159, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3764, created_by_id: 3764, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - when output is existing taxon with new name - should change #count by 1 - should not change #full_name - relationships and trade - should be is synonym - should eq #"GENUS", "kingdom_id"=>"25278", "kingdom_name"=>"Lupus5210", "phylum_id"=>"25279", "phylum_name"=>"Lupus5209", "class_id"=>"25280", "class_name"=>"Lupus5208", "order_id"=>"25281", "order_name"=>"Lupus5207", "family_id"=>"25282", "family_name"=>"Lupus5206", "subfamily_id"=>"25283", "subfamily_name"=>"Lupus5205", "genus_id"=>"25284", "genus_name"=>"Lupus5204"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus5204", name_status: "A", created_at: "2024-01-04 16:46:28", updated_at: "2024-01-04 16:46:28", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3768, created_by_id: 3768, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should include # "25330", "genus_id" => "25334", "order_id" => "25331", "family_id" => "25332", "phylum_id" => "25329", "rank_name" => "SPECIES", "class_name" => "Lupus5253", "genus_name" => "Errorus", "kingdom_id" => "25328", "order_name" => "Lupus5252", "species_id" => "25345", "family_name" => "Lupus5251", "phylum_name" => "Lupus5254", "kingdom_name" => "Lupus5255", "species_name" => "Lolcatus", "subfamily_id" => "25333", "subfamily_name" => "Lupus5250"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Errorus lolcatus", name_status: "A", created_at: "2024-01-04 16:46:30", updated_at: "2024-01-04 16:46:30", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3769, created_by_id: 3769, dependents_updated_at: nil, nomenclature_note_en: " ", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2401, importer_id: 2400, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 25353, year: 2013, created_at: "2024-01-04 16:46:31", updated_at: "2024-01-04 16:46:31", sandbox_id: nil, reported_taxon_concept_id: 25353, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3770, created_by_id: 3770, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - when input with children that don't change name - input / output species has public nomenclature note set - child of input / output species does not inherit public nomenclature note - input / output species has internal nomenclature note set - child of input / output species does not inherit internal nomenclature note - child of input / output species does not have legislation nomenclature note - when input with children that change name - input species has public nomenclature note set - child of input species inherits public nomenclature note - input species has internal nomenclature note set - child of input species inherits internal nomenclature note - output species has public nomenclature note set - child of output species inherits public nomenclature note from input - output species has internal nomenclature note set - child of output species inherits internal nomenclature note from input - output species child has listing changes from input species child transferred - child of output species has legislation nomenclature note copied from input species - original output species child retains higher taxa intact - new output species child has higher taxa set correctly - original input species child retains higher taxa intact - original input species child is a synonym - when input is genus and parent ressignments occur - input genus child is a synonym - input genus child is a synonym of output genus child - input genus child's child is a synonym - input genus child's child's name did not change - output genus should have child with resolved name - output genus child should have child with resolved name - output genus child should have input genus citations - input genus child has no quotas - input genus child's accepted name has 1 quota - input genus child's document citations retained - summary - should be a kind of Array - -NomenclatureChange::Lump - validate - when required inputs missing - when inputs - should have 1 errors on :inputs - when submitting - should have 1 errors on :inputs - when required outputs missing - when outputs - should have 1 errors on :output - when submitting - should have 1 errors on :output - when only 1 input - should have 1 errors on :inputs - new_output_rank - should eq "SPECIES" - -NomenclatureChange::OutputReassignment - validate - when output not specified - should not be valid - when reassignable_type not specified - should not be valid - -NomenclatureChange::Output - validate - when nomenclature change not specified - should not be valid - when taxon concept not specified and new taxon concept attributes not specified - should have 1 errors on :new_scientific_name - should have 1 errors on :new_parent_id - should have 1 errors on :new_rank_id - should have 1 errors on :new_name_status - should have 1 errors on :new_taxon_concept - when new taxon concept invalid - should have 1 error on :new_parent_id - when taxon concept specified - should eq 26184 - should eq 14848 - should eq "Lupus6035 lupus6034" - should eq nil - should eq "A" - expected_parent_name - when genus - should be nil - when species - should eq "Canis" - when subspecies - should eq "Canis lupus" - when variety - should eq "Magnolia liliifera" - -NomenclatureChange::ReassignmentCopyProcessor - run - when children - should eq #"SPECIES", "kingdom_id"=>"26251", "kingdom_name"=>"Lupus6087", "phylum_id"=>"26252", "phylum_name"=>"Lupus6086", "class_id"=>"26253", "class_name"=>"Lupus6085", "order_id"=>"26254", "order_name"=>"Lupus6084", "family_id"=>"26255", "family_name"=>"Lupus6083", "subfamily_id"=>"26256", "subfamily_name"=>"Lupus6082", "genus_id"=>"26257", "genus_name"=>"Genus1", "species_id"=>"26258", "species_name"=>"Lupus6088"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1 lupus6088", name_status: "A", created_at: "2024-01-04 16:47:21", updated_at: "2024-01-04 16:47:21", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3829, created_by_id: 3829, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should eq "S" - should eq 0 - should include # "26286", "genus_id" => "26290", "order_id" => "26287", "family_id" => "26288", "phylum_id" => "26285", "rank_name" => "SUBSPECIES", "class_name" => "Lupus6112", "genus_name" => "Genus1", "kingdom_id" => "26284", "order_name" => "Lupus6111", "species_id" => "26292", "family_name" => "Lupus6110", "phylum_name" => "Lupus6113", "kingdom_name" => "Lupus6114", "species_name" => "Lupus6116", "subfamily_id" => "26289", "subspecies_id" => "26294", "subfamily_name" => "Lupus6109", "subspecies_name" => "Lupus6117"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Genus1 lupus6116 lupus6117", name_status: "A", created_at: "2024-01-04 16:47:23", updated_at: "2024-01-04 16:47:23", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3832, created_by_id: 3832, dependents_updated_at: "2024-01-04 16:47:23", nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: 3832, kew_id: nil> - when names - should include # - should include # - when distribution - should eq 4 - should not be nil - should eq [] - should contain exactly "extinct" and "reintroduced" - should eq [] - should eq 2 - should eq 4 - when legislation - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:101 (FAILED - 182) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:102 (FAILED - 183) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:108 (FAILED - 184) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:115 (FAILED - 185) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:122 (FAILED - 186) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:129 (FAILED - 187) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:136 (FAILED - 188) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:142 (FAILED - 189) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:149 (FAILED - 190) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:150 (FAILED - 191) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:156 (FAILED - 192) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:163 (FAILED - 193) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:170 (FAILED - 194) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:177 (FAILED - 195) - example at ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:26 (FAILED - 196) - example at ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:27 (FAILED - 197) - example at ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:28 (FAILED - 198) - when common names - should eq 2 - should eq 2 - when references - should eq 2 - should eq 2 - when document citations - should eq 1 - when output species had no citations in place - should eq 1 - when output species had an identical citation in place - should eq 1 - when shipments - should eq 2 - should be empty - -NomenclatureChange::Reassignment - validate - when input not specified - should not be valid - when reassignable_type not specified - should not be valid - -NomenclatureChange::ReassignmentTarget - validate - when reassignment not specified - should not be valid - when output not specified - should not be valid - -NomenclatureChange::ReassignmentTransferProcessor - run - input reassignments - when children - should eq #"SPECIES", "kingdom_id"=>"26659", "kingdom_name"=>"Lupus6452", "phylum_id"=>"26660", "phylum_name"=>"Lupus6451", "class_id"=>"26661", "class_name"=>"Lupus6450", "order_id"=>"26662", "order_name"=>"Lupus6449", "family_id"=>"26663", "family_name"=>"Lupus6448", "subfamily_id"=>"26664", "subfamily_name"=>"Lupus6447", "genus_id"=>"26665", "genus_name"=>"Genus1", "species_id"=>"26666", "species_name"=>"Lupus6453"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1 lupus6453", name_status: "A", created_at: "2024-01-04 16:47:47", updated_at: "2024-01-04 16:47:47", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3875, created_by_id: 3875, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should eq "S" - should eq 0 - should include # "26718", "genus_id" => "26722", "order_id" => "26719", "family_id" => "26720", "phylum_id" => "26717", "rank_name" => "SUBSPECIES", "class_name" => "Lupus6498", "genus_name" => "Genus1", "kingdom_id" => "26716", "order_name" => "Lupus6497", "species_id" => "26724", "family_name" => "Lupus6496", "phylum_name" => "Lupus6499", "kingdom_name" => "Lupus6500", "species_name" => "Lupus6502", "subfamily_id" => "26721", "subspecies_id" => "26734", "subfamily_name" => "Lupus6495", "subspecies_name" => "Lupus6510"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Genus1 lupus6502 lupus6510", name_status: "A", created_at: "2024-01-04 16:47:50", updated_at: "2024-01-04 16:47:50", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3878, created_by_id: 3878, dependents_updated_at: "2024-01-04 16:47:50", nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: 3878, kew_id: nil> - when names - should include # - should be empty - when distribution - should eq 4 - should not be nil - should eq [] - should contain exactly "extinct" and "reintroduced" - should eq [] - should eq 2 - should be empty - when legislation - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:101 (FAILED - 199) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:102 (FAILED - 200) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:108 (FAILED - 201) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:115 (FAILED - 202) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:122 (FAILED - 203) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:129 (FAILED - 204) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:136 (FAILED - 205) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:142 (FAILED - 206) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:149 (FAILED - 207) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:150 (FAILED - 208) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:156 (FAILED - 209) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:163 (FAILED - 210) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:170 (FAILED - 211) - example at ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:177 (FAILED - 212) - example at ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:26 (FAILED - 213) - example at ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:27 (FAILED - 214) - example at ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:28 (FAILED - 215) - when common names - should eq 2 - should be empty - when references - should eq 2 - should be empty - when document citations - should be empty (PENDING: No reason given) - when output species had no citations in place - should eq 1 - when output species had an identical citation in place - should eq 1 - when shipments - should eq 2 - should be empty - output reassignments - when names - should include # - should be empty - when distribution - should eq 2 - should not be nil - should eq ["extinct"] - should eq 1 - should be empty - when legislation - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:70 (FAILED - 216) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:71 (FAILED - 217) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:77 (FAILED - 218) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:84 (FAILED - 219) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:91 (FAILED - 220) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:98 (FAILED - 221) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:104 (FAILED - 222) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:111 (FAILED - 223) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:112 (FAILED - 224) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:118 (FAILED - 225) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:125 (FAILED - 226) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:132 (FAILED - 227) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:139 (FAILED - 228) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:140 (FAILED - 229) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:141 (FAILED - 230) - example at ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:142 (FAILED - 231) - when common names - should eq 2 - should be empty - when references - should eq 2 - should be empty - when document citations - should eq 1 - should be empty - when shipments - should eq 2 - should be empty - -NomenclatureChange::Split::Constructor - inputs - build_input - when previously no input in place - should not be nil - when previously input in place - should eq # - outputs - build_outputs - when previously no outputs in place - should not eq 0 - when previously output in place - should eq #, #]> - reassignments - build_input_and_output_notes - when previously no notes in place - should not be blank - should not be blank - when output = input - should be blank - when previously notes in place - should eq "blah" - should eq "blah" - build_parent_reassignments - when previously no reassignments in place - when no children - should eq 0 - when children - should eq 2 - when previously reassignments in place - should eq #]> - when output = input - should eq [#] - when previously reassignments in place - should eq #]> - build_name_reassignments - when previously no reassignments in place - when no names - should eq 0 - when names - should eq 2 - when previously reassignments in place - should eq #]> - when output = input - should eq [#] - build_distribution_reassignments - when previously no reassignments in place - when no distibutions - should eq 0 - when distributions - should eq 2 - when previously reassignments in place - should eq #]> - build_documents_reassignments - when previously no reassignments in place - when no document citations - should eq 0 - when document citations - should eq 2 - when geo_entity citations mismatch distribution - should not include 1141 - build_legislation_reassignments - when previously no reassignments in place - when no CITES listings - should eq 0 - when CITES listings - should eq 1 - when previously reassignments in place - should eq #]> - build_common_names_reassignments - when previously no reassignments in place - when no common names - should eq 0 - when common names - should eq 1 - when previously reassignments in place - should eq #]> - build_references_reassignments - when previously no reassignments in place - when no references - should eq 0 - when references - should eq 1 - when previously reassignments in place - should eq #]> - -NomenclatureChange::OutputTaxonConceptProcessor - run - when output is existing taxon - should be nil - when output is new taxon - should eq "Errorus fatalus" - when output is existing taxon with new status - should be nil - should eq "A" - when output is existing taxon with new name - should eq "Errorus fatalus fatalus" - should eq "A" - should eq "Errorus lolcatus" - -NomenclatureChange::Split::Processor - run - when outputs are existing taxa - should not change #count - should not change #full_name - should not change #full_name - relationships and trade - should be is synonym - should include # "SPECIES", "kingdom_id" => "28730", "kingdom_name" => "Lupus8199", "phylum_id" => "28731", "phylum_name" => "Lupus8198", "class_id" => "28732", "class_name" => "Lupus8197", "order_id" => "28733", "order_name" => "Lupus8196", "family_id" => "28734", "family_name" => "Lupus8195", "subfamily_id" => "28735", "subfamily_name" => "Lupus8194", "genus_id" => "28736", "genus_name" => "Genus1", "species_id" => "28738", "species_name" => "Lupus8201"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1 lupus8201", name_status: "A", created_at: "2024-01-04 16:49:19", updated_at: "2024-01-04 16:49:19", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3992, created_by_id: 3992, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should be empty - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2685, importer_id: 2684, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28771, year: 2013, created_at: "2024-01-04 16:49:21", updated_at: "2024-01-04 16:49:21", sandbox_id: nil, reported_taxon_concept_id: 28771, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3994, created_by_id: 3994, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2687, importer_id: 2686, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28788, year: 2013, created_at: "2024-01-04 16:49:22", updated_at: "2024-01-04 16:49:22", sandbox_id: nil, reported_taxon_concept_id: 28788, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 3995, created_by_id: 3995, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - when output is new taxon - should change #count by 1 - relationships and trade - should be is synonym - should include # "28843", "genus_id" => "28847", "order_id" => "28844", "family_id" => "28845", "phylum_id" => "28842", "rank_name" => "SPECIES", "class_name" => "Lupus8293", "genus_name" => "Errorus", "kingdom_id" => "28841", "order_name" => "Lupus8292", "species_id" => "28848", "family_name" => "Lupus8291", "phylum_name" => "Lupus8294", "kingdom_name" => "Lupus8295", "species_name" => "Fatalus", "subfamily_id" => "28846", "subfamily_name" => "Lupus8290"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Errorus fatalus", name_status: "A", created_at: "2024-01-04 16:49:25", updated_at: "2024-01-04 16:49:25", touched_at: nil, legacy_trade_code: nil, updated_by_id: 3998, created_by_id: 3998, dependents_updated_at: nil, nomenclature_note_en: " ", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> - should be empty - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2697, importer_id: 2696, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28873, year: 2013, created_at: "2024-01-04 16:49:26", updated_at: "2024-01-04 16:49:26", sandbox_id: nil, reported_taxon_concept_id: 28873, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4000, created_by_id: 4000, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2699, importer_id: 2698, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28890, year: 2013, created_at: "2024-01-04 16:49:27", updated_at: "2024-01-04 16:49:27", sandbox_id: nil, reported_taxon_concept_id: 28890, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4001, created_by_id: 4001, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - when output is existing taxon with new status - should not change #count - should not change #full_name - should not change #full_name - relationships and trade - should be is synonym - should include # "SPECIES", "kingdom_id" => "28968", "kingdom_name" => "Lupus8399", "phylum_id" => "28969", "phylum_name" => "Lupus8398", "class_id" => "28970", "class_name" => "Lupus8397", "order_id" => "28971", "order_name" => "Lupus8396", "family_id" => "28972", "family_name" => "Lupus8395", "subfamily_id" => "28973", "subfamily_name" => "Lupus8394", "genus_id" => "28974", "genus_name" => "Genus1", "species_id" => "28976", "species_name" => "Lupus8401"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1 lupus8401", name_status: "A", created_at: "2024-01-04 16:49:31", updated_at: "2024-01-04 16:49:31", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4006, created_by_id: 4006, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2711, importer_id: 2710, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 28992, year: 2013, created_at: "2024-01-04 16:49:32", updated_at: "2024-01-04 16:49:32", sandbox_id: nil, reported_taxon_concept_id: 28992, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4007, created_by_id: 4007, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - when output is existing taxon with new name - should change #count by 1 - should not change #full_name - should not change #full_name - relationships and trade - should be is synonym - should eq #"GENUS", "kingdom_id"=>"29087", "kingdom_name"=>"Lupus8492", "phylum_id"=>"29088", "phylum_name"=>"Lupus8491", "class_id"=>"29089", "class_name"=>"Lupus8490", "order_id"=>"29090", "order_name"=>"Lupus8489", "family_id"=>"29091", "family_name"=>"Lupus8488", "subfamily_id"=>"29092", "subfamily_name"=>"Lupus8487", "genus_id"=>"29093", "genus_name"=>"Genus1"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Genus1", name_status: "A", created_at: "2024-01-04 16:49:37", updated_at: "2024-01-04 16:49:37", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4012, created_by_id: 4012, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should include # "29117", "genus_id" => "29121", "order_id" => "29118", "family_id" => "29119", "phylum_id" => "29116", "rank_name" => "SPECIES", "class_name" => "Lupus8512", "genus_name" => "Errorus", "kingdom_id" => "29115", "order_name" => "Lupus8511", "species_id" => "29124", "family_name" => "Lupus8510", "phylum_name" => "Lupus8513", "kingdom_name" => "Lupus8514", "species_name" => "Lolcatus", "subfamily_id" => "29120", "subfamily_name" => "Lupus8509"}, listing: nil, notes: nil, taxonomic_position: "0", full_name: "Errorus lolcatus", name_status: "A", created_at: "2024-01-04 16:49:38", updated_at: "2024-01-04 16:49:38", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4013, created_by_id: 4013, dependents_updated_at: nil, nomenclature_note_en: " ", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2725, importer_id: 2724, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 29132, year: 2013, created_at: "2024-01-04 16:49:39", updated_at: "2024-01-04 16:49:39", sandbox_id: nil, reported_taxon_concept_id: 29132, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4014, created_by_id: 4014, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - when input with children that don't change name - input / output species has public nomenclature note set - child of input / output species does not inherit public nomenclature note - input / output species has internal nomenclature note set - child of input / output species does not inherit internal nomenclature note - child of input / output species does not have legislation nomenclature note - when input with children that change name - input species has public nomenclature note set - child of input species inherits public nomenclature note - input species has internal nomenclature note set - child of input species inherits internal nomenclature note - output species has public nomenclature note set - child of output species inherits public nomenclature note from output - output species has internal nomenclature note set - child of output species inherits internal nomenclature note from output - output species child has listing changes from input species child transferred - output species child has legislation nomenclature note copied from output species - original output species child retains higher taxa intact - new output species child has higher taxa set correctly - original input species child retains higher taxa intact - original input species child is a synonym - when input is genus and parent ressignments occur - input genus child is a synonym - input genus child is a synonym of output genus child - input genus child's child is a synonym - input genus child's child's name did not change - output genus should have child with resolved name - output genus child should have child with resolved name - output genus child should have input genus citations - input genus child has no quotas - input genus child's accepted name has 1 quota - input genus child's document citations retained - summary - should be a kind of Array - -NomenclatureChange::Split - validate - when required inputs missing - when inputs - should have 1 errors on :input - when submitting - should have 1 errors on :input - when required outputs missing - when outputs - should have 1 errors on :outputs - when submitting - should have 1 errors on :outputs - when output has different rank than input - should have 1 errors on :outputs - -NomenclatureChange::StatusSwap::Constructor - build_primary_output - when previously no primary output in place - should not be nil - when previously primary output in place - should eq # - build_secondary_output - downgrade - when previously no secondary output in place - should not be nil - when previously secondary output in place - should eq # - build_secondary_output_note - when previously no notes in place - should be blank - should not be blank - when previously notes in place - should eq "blah" - should eq "blah" - -NomenclatureChange::StatusSwap::Processor - run - from accepted name - should be is synonym - should eq #"GENUS", "kingdom_id"=>"29999", "kingdom_name"=>"Lupus9252", "phylum_id"=>"30000", "phylum_name"=>"Lupus9251", "class_id"=>"30001", "class_name"=>"Lupus9250", "order_id"=>"30002", "order_name"=>"Lupus9249", "family_id"=>"30003", "family_name"=>"Lupus9248", "subfamily_id"=>"30004", "subfamily_name"=>"Lupus9247", "genus_id"=>"30005", "genus_name"=>"Lupus9246"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus9246", name_status: "A", created_at: "2024-01-04 16:50:30", updated_at: "2024-01-04 16:50:30", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4062, created_by_id: 4062, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should eq "A" - should include # "SPECIES", "kingdom_id" => "30064", "kingdom_name" => "Lupus9311", "phylum_id" => "30065", "phylum_name" => "Lupus9310", "class_id" => "30066", "class_name" => "Lupus9309", "order_id" => "30067", "order_name" => "Lupus9308", "family_id" => "30068", "family_name" => "Lupus9307", "subfamily_id" => "30069", "subfamily_name" => "Lupus9306", "genus_id" => "30070", "genus_name" => "Confundus", "species_id" => "30063", "species_name" => "Totalus"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Confundus totalus", name_status: "A", created_at: "2024-01-04 16:50:32", updated_at: "2024-01-04 16:50:32", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4064, created_by_id: 4064, dependents_updated_at: nil, nomenclature_note_en: " public", nomenclature_note_es: " ", nomenclature_note_fr: " ", dependents_updated_by_id: nil, kew_id: nil> - public nomenclature note is set - internal nomenclature note is set - summary - should be a kind of Array - -NomenclatureChange::StatusToAccepted::Processor - run - from trade name - should eq "A" - should be empty - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2813, importer_id: 2812, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30182, year: 2013, created_at: "2024-01-04 16:50:38", updated_at: "2024-01-04 16:50:38", sandbox_id: nil, reported_taxon_concept_id: 30183, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4071, created_by_id: 4071, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2815, importer_id: 2814, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30198, year: 2013, created_at: "2024-01-04 16:50:38", updated_at: "2024-01-04 16:50:38", sandbox_id: nil, reported_taxon_concept_id: 30199, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4072, created_by_id: 4072, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should be empty - -NomenclatureChange::StatusToAccepted - validate - when required primary output missing - when primary_output - should have 1 error on :primary_output - when submitting - should have 1 error on :primary_output - when primary output has invalid name status - when primary_output - should have 1 error on :primary_output - when primary output has valid name status - when primary_output - should have 0 errors on :primary_output - -NomenclatureChange::StatusToSynonym::Constructor - build_input - when previously no input in place - should not be nil - when previously input in place - should eq # - -NomenclatureChange::OutputTaxonConceptProcessor - run - when output is existing taxon - should be nil - -NomenclatureChange::StatusToSynonym::Processor - run - from N name - should be is synonym - should eq #"GENUS", "kingdom_id"=>"30281", "kingdom_name"=>"Lupus9512", "phylum_id"=>"30282", "phylum_name"=>"Lupus9511", "class_id"=>"30283", "class_name"=>"Lupus9510", "order_id"=>"30284", "order_name"=>"Lupus9509", "family_id"=>"30285", "family_name"=>"Lupus9508", "subfamily_id"=>"30286", "subfamily_name"=>"Lupus9507", "genus_id"=>"30287", "genus_name"=>"Lupus9506"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus9506", name_status: "A", created_at: "2024-01-04 16:50:42", updated_at: "2024-01-04 16:50:42", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4086, created_by_id: 4086, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should include # "30307", "genus_id" => "30311", "order_id" => "30308", "family_id" => "30309", "phylum_id" => "30306", "rank_name" => "SPECIES", "class_name" => "Lupus9535", "genus_name" => "Lupus9531", "kingdom_id" => "30305", "order_name" => "Lupus9534", "species_id" => "30312", "family_name" => "Lupus9533", "phylum_name" => "Lupus9536", "kingdom_name" => "Lupus9537", "species_name" => "Lupus9530", "subfamily_id" => "30310", "subfamily_name" => "Lupus9532"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus9531 lupus9530", name_status: "A", created_at: "2024-01-04 16:50:43", updated_at: "2024-01-04 16:50:43", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4087, created_by_id: 4087, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should be empty - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2827, importer_id: 2826, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30336, year: 2013, created_at: "2024-01-04 16:50:45", updated_at: "2024-01-04 16:50:45", sandbox_id: nil, reported_taxon_concept_id: 30336, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4089, created_by_id: 4089, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2829, importer_id: 2828, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30352, year: 2013, created_at: "2024-01-04 16:50:46", updated_at: "2024-01-04 16:50:46", sandbox_id: nil, reported_taxon_concept_id: 30352, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4090, created_by_id: 4090, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - from trade name - should be is synonym - should include # "30372", "genus_id" => "30376", "order_id" => "30373", "family_id" => "30374", "phylum_id" => "30371", "rank_name" => "SPECIES", "class_name" => "Lupus9599", "genus_name" => "Lupus9595", "kingdom_id" => "30370", "order_name" => "Lupus9598", "species_id" => "30377", "family_name" => "Lupus9597", "phylum_name" => "Lupus9600", "kingdom_name" => "Lupus9601", "species_name" => "Lupus9594", "subfamily_id" => "30375", "subfamily_name" => "Lupus9596"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus9595 lupus9594", name_status: "A", created_at: "2024-01-04 16:50:47", updated_at: "2024-01-04 16:50:47", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4092, created_by_id: 4092, dependents_updated_at: "2024-01-04 16:50:47", nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: 4092, kew_id: nil> - should be empty - should be empty - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2839, importer_id: 2838, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30404, year: 2013, created_at: "2024-01-04 16:50:49", updated_at: "2024-01-04 16:50:49", sandbox_id: nil, reported_taxon_concept_id: 30405, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4095, created_by_id: 4095, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2841, importer_id: 2840, country_of_origin_id: nil, reported_by_exporter: true, taxon_concept_id: 30413, year: 2013, created_at: "2024-01-04 16:50:50", updated_at: "2024-01-04 16:50:50", sandbox_id: nil, reported_taxon_concept_id: 30414, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4096, created_by_id: 4096, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - -NomenclatureChange::StatusToSynonym - validate - when required primary output missing - when primary_output - should have 1 error on :primary_output - when submitting - should have 1 error on :primary_output - when primary output has invalid name status - when primary_output - should have 1 error on :primary_output - when primary output has valid name status - when primary_output - should have 0 errors on :primary_output - when required secondary output missing - when relay - should have 1 error on :secondary_output - when submitting - should have 1 error on :secondary_output - -NomenclatureChange - validate - when status not specified - should not be valid - when previous status=submitted - should not be valid - when previous status=closed - should not be valid - submitting? - when new object with status=submitted - should be submitting - when updating object with status new -> submitted - should be submitting - when updating object with status submitted -> closed - should not be submitting - when updating object with status closed -> submitted - should not be submitting - -PresetTag - create - when valid - should be valid - when name missing - should be invalid - should have 1 error on :name - when model (type) incorrect - should be invalid - should have 1 error on :model - -Purpose - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - when CITES suspension - should be falsey - when shipments - should be falsey - -Quota - create - downloads cache should be populated - should not be empty - destroy - downloads cache should be cleared - should be empty - validations - create - doesn't save a quota without a unit (PENDING: No reason given) - when valid - should be valid - when quota missing - should be invalid - should have 2 error on :quota - when publication date missing - should be invalid - should have 1 error on :publication_date - when start date greater than end date - should be invalid - should have 1 error on :start_date - -Rank - parent_rank_lower_bound - obligatory rank - should == "0" - optional rank - should == "5" - create - when taxonomic position malformed - should have 1 error on :taxonomic_position - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - should be falsey - when protected name - should be falsey - in_range - when no bounds specified - should == ["KINGDOM", "PHYLUM", "CLASS", "ORDER", "FAMILY", "SUBFAMILY", "GENUS", "SPECIES", "SUBSPECIES", "VARIETY"] - when lower bound specified - should == ["KINGDOM", "PHYLUM", "CLASS"] - when lower and upper bound specified - should == ["FAMILY", "SUBFAMILY", "GENUS"] - -Sapi::GeoIP - resolve - should == "Bogotá" - -Source - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - when CITES suspension - should be falsey - when CITES quota - should be falsey - when shipments - should be falsey - -Species::CommonNamesExport - path - should == "public/downloads/common_names/" - export - when no results - should be falsey - when results - when file not cached -sh: 1: psql: not found - example at ./spec/models/species/common_names_export_spec.rb:32 (FAILED - 232) - when file cached - example at ./spec/models/species/common_names_export_spec.rb:38 - -Species::DocumentsExport - path - should == "public/downloads/documents/" - export - when no results - when file not cached it should not be generated - when results - when file not cached it should be generated (PENDING: No reason given) - when file cached it should not be generated (PENDING: No reason given) - -Species::TaxonConceptPrefixMatcher -Procedure: taxonomy - results - when searching for hybrid - when trade visibility - example at ./spec/models/species/hybrid_prefix_matcher_spec.rb:14 (FAILED - 233) - when trade internal visibility - example at ./spec/models/species/hybrid_prefix_matcher_spec.rb:24 (FAILED - 234) - when speciesplus visibility - example at ./spec/models/species/hybrid_prefix_matcher_spec.rb:33 (FAILED - 235) - -Species::Search -Procedure: taxonomy - results - when searching by scientific name - when subspecies never listed - example at ./spec/models/species/invisible_subspecies_search_spec.rb:8 (FAILED - 236) - example at ./spec/models/species/invisible_subspecies_search_spec.rb:9 (FAILED - 237) - -Species::ListingsExport -Procedure: taxonomy - path - example at ./spec/models/species/listings_export_spec.rb:10 (FAILED - 238) - export - when no results - example at ./spec/models/species/listings_export_spec.rb:21 (FAILED - 239) - when results - when file not cached - example at ./spec/models/species/listings_export_spec.rb:42 (FAILED - 240) - when file cached - example at ./spec/models/species/listings_export_spec.rb:48 (FAILED - 241) - query - when CITES - when Appendix I - example at ./spec/models/species/listings_export_spec.rb:65 (FAILED - 242) - when Poland - example at ./spec/models/species/listings_export_spec.rb:75 (FAILED - 243) - when Nepal - example at ./spec/models/species/listings_export_spec.rb:86 (FAILED - 244) - when higher taxon ids - example at ./spec/models/species/listings_export_spec.rb:96 (FAILED - 245) - when implicitly listed subspecies present - example at ./spec/models/species/listings_export_spec.rb:111 (FAILED - 246) - when EU - when Annex A - example at ./spec/models/species/listings_export_spec.rb:122 (FAILED - 247) - when Spain - example at ./spec/models/species/listings_export_spec.rb:132 (FAILED - 248) - when Nepal - example at ./spec/models/species/listings_export_spec.rb:143 (FAILED - 249) - when higher taxon ids - example at ./spec/models/species/listings_export_spec.rb:153 (FAILED - 250) - -Species::OrphanedTaxonConceptsExport - path - should == "public/downloads/orphaned_taxon_concepts/" - export - when no results - should be falsey - when results - when file not cached -sh: 1: psql: not found - example at ./spec/models/species/orphaned_taxon_concepts_export_spec.rb:33 (FAILED - 251) - when file cached - example at ./spec/models/species/orphaned_taxon_concepts_export_spec.rb:39 - -Species::Search -Procedure: taxonomy - results - when searching by scientific name - when regular query - example at ./spec/models/species/search_spec.rb:8 (FAILED - 252) - when malicious query - example at ./spec/models/species/search_spec.rb:12 (FAILED - 253) - when leading whitespace - example at ./spec/models/species/search_spec.rb:16 (FAILED - 254) - when trailing whitespace - example at ./spec/models/species/search_spec.rb:20 (FAILED - 255) - -Species::SpeciesReferenceOutputExport - path - should == "public/downloads/species_reference_output/" - export - when no results - should be falsey - when results - when file not cached -sh: 1: psql: not found - example at ./spec/models/species/species_reference_output_spec.rb:32 (FAILED - 256) - when file cached - example at ./spec/models/species/species_reference_output_spec.rb:38 - -Species::StandardReferenceOutputExport - path - should == "public/downloads/standard_reference_output/" - export - when no results - should be falsey - when results - when file not cached -sh: 1: psql: not found - example at ./spec/models/species/standard_reference_output_spec.rb:32 (FAILED - 257) - when file cached - example at ./spec/models/species/standard_reference_output_spec.rb:38 - -Species::SynonymsAndTradeNamesExport - path - should == "public/downloads/synonyms_and_trade_names/" - export - when no results - should be falsey - when results - when file not cached -sh: 1: psql: not found - example at ./spec/models/species/synonyms_and_trade_names_export_spec.rb:38 (FAILED - 258) - when file cached - example at ./spec/models/species/synonyms_and_trade_names_export_spec.rb:44 - -Species::TaxonConceptPrefixMatcher -Procedure: taxonomy - results - when searching by common name - when searching by hyphenated common name - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:14 (FAILED - 259) - when searching by hyphenated common name without hyphens - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:23 (FAILED - 260) - when searching by part of hyphenated common name - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:32 (FAILED - 261) - when searching by scientific name - when regular query - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:43 (FAILED - 262) - when malicious query - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:52 (FAILED - 263) - when leading whitespace - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:61 (FAILED - 264) - when trailing whitespace - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:70 (FAILED - 265) - when implicitly listed subspecies - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:79 (FAILED - 266) - when explicitly listed subspecies - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:88 (FAILED - 267) - when implicitly listed higher taxon (without an explicitly listed ancestor) - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:97 (FAILED - 268) - when explicitly listed higher taxon - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:106 (FAILED - 269) - when explicitly listed higher taxon but ranks expected FAMILY - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:117 (FAILED - 270) - when explicitly listed higher taxon but ranks expected SPECIES - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:127 (FAILED - 271) - when searching for name that matches Species and Subspecies but ranks expected SUBSPECIES - example at ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:137 (FAILED - 272) - -Species::TaxonConceptsNamesExport - path - should == "public/downloads/taxon_concepts_names/" - export - when no results - should be falsey - when results - when file not cached -sh: 1: psql: not found - example at ./spec/models/species/taxon_concepts_export_spec.rb:32 (FAILED - 273) - when file cached - example at ./spec/models/species/taxon_concepts_export_spec.rb:38 - -Species::TaxonConceptPrefixMatcher - results - when searching for status N species - when trade visibility -Procedure: taxonomy - example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:39 (FAILED - 274) - when trade internal visibility -Procedure: taxonomy - example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:49 (FAILED - 275) - when speciesplus visibility -Procedure: taxonomy - example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:58 (FAILED - 276) - when searching for trade name - when trade visibility -Procedure: taxonomy - example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:70 (FAILED - 277) -Procedure: taxonomy - example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:71 (FAILED - 278) - when trade internal visibility -Procedure: taxonomy - example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:81 (FAILED - 279) -Procedure: taxonomy - example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:82 (FAILED - 280) - when speciesplus visibility -Procedure: taxonomy - example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:91 (FAILED - 281) -Procedure: taxonomy - example at ./spec/models/species/trade_name_prefix_matcher_spec.rb:92 (FAILED - 282) - -Species::Search -Procedure: taxonomy - results - when searching by scientific name - when subspecies previously listed - example at ./spec/models/species/visible_subspecies_search_spec.rb:8 (FAILED - 283) - -TaxonRelationship - when synonymy - should include "Lolcatus lolus" - should include "Lolcatus lolus" - -TaxonCommon - update - when common name changed - should include "Lolcat" - -TaxonConcept - Agalychnis -Procedure: taxonomy - REFERENCES - cites_accepted - for class Amphibia - example at ./spec/models/taxon_concept/agalychnis_spec.rb:10 (FAILED - 284) - for family Hylidae - example at ./spec/models/taxon_concept/agalychnis_spec.rb:13 (FAILED - 285) - for genus Agalychnis - example at ./spec/models/taxon_concept/agalychnis_spec.rb:16 (FAILED - 286) - standard_taxon_concept_references - for class Amphibia - example at ./spec/models/taxon_concept/agalychnis_spec.rb:21 (FAILED - 287) - for family Hylidae - example at ./spec/models/taxon_concept/agalychnis_spec.rb:24 (FAILED - 288) - for genus Agalychnis - example at ./spec/models/taxon_concept/agalychnis_spec.rb:27 (FAILED - 289) - LISTING - cites_listing - for genus Agalychnis - example at ./spec/models/taxon_concept/agalychnis_spec.rb:34 (FAILED - 290) - eu_listing - for genus Agalychnis - example at ./spec/models/taxon_concept/agalychnis_spec.rb:40 (FAILED - 291) - cites_listed - for family Hylidae - example at ./spec/models/taxon_concept/agalychnis_spec.rb:46 (FAILED - 292) - for genus Agalychnis - example at ./spec/models/taxon_concept/agalychnis_spec.rb:49 (FAILED - 293) - eu_listed - for family Hylidae - example at ./spec/models/taxon_concept/agalychnis_spec.rb:55 (FAILED - 294) - for genus Agalychnis - example at ./spec/models/taxon_concept/agalychnis_spec.rb:58 (FAILED - 295) - -TaxonConcept - Agave -Procedure: taxonomy - LISTING - cites_listing - for species Agave parviflora - example at ./spec/models/taxon_concept/agave_spec.rb:10 (FAILED - 296) - for species Agave arizonica - example at ./spec/models/taxon_concept/agave_spec.rb:13 (FAILED - 297) - cites_listed - for species Agave parviflora - example at ./spec/models/taxon_concept/agave_spec.rb:19 (FAILED - 298) - for species Agave arizonica - example at ./spec/models/taxon_concept/agave_spec.rb:22 (FAILED - 299) - cites_show - for species Agave parviflora - example at ./spec/models/taxon_concept/agave_spec.rb:28 (FAILED - 300) - for species Agave arizonica - example at ./spec/models/taxon_concept/agave_spec.rb:31 (FAILED - 301) - eu_listing - for species Agave parviflora - example at ./spec/models/taxon_concept/agave_spec.rb:37 (FAILED - 302) - for species Agave arizonica - example at ./spec/models/taxon_concept/agave_spec.rb:40 (FAILED - 303) - eu_listed - for species Agave parviflora - example at ./spec/models/taxon_concept/agave_spec.rb:46 (FAILED - 304) - for species Agave arizonica - example at ./spec/models/taxon_concept/agave_spec.rb:49 (FAILED - 305) - eu_show - for species Agave parviflora - example at ./spec/models/taxon_concept/agave_spec.rb:55 (FAILED - 306) - for species Agave arizonica - example at ./spec/models/taxon_concept/agave_spec.rb:58 (FAILED - 307) - -TaxonConcept - Ailuropoda -Procedure: taxonomy - LISTING - cites_listing - for species Ailuropoda melanoleuca - example at ./spec/models/taxon_concept/ailuropoda_spec.rb:10 (FAILED - 308) - for genus level Ailuropoda - example at ./spec/models/taxon_concept/ailuropoda_spec.rb:13 (FAILED - 309) - eu_listing - for species Ailuropoda melanoleuca - example at ./spec/models/taxon_concept/ailuropoda_spec.rb:19 (FAILED - 310) - for genus level Ailuropoda - example at ./spec/models/taxon_concept/ailuropoda_spec.rb:22 (FAILED - 311) - cites_listed - for genus Ailuropoda - example at ./spec/models/taxon_concept/ailuropoda_spec.rb:28 (FAILED - 312) - for species Ailuropoda melanoleuca - example at ./spec/models/taxon_concept/ailuropoda_spec.rb:31 (FAILED - 313) - eu_listed - for genus Ailuropoda - example at ./spec/models/taxon_concept/ailuropoda_spec.rb:37 (FAILED - 314) - for species Ailuropoda melanoleuca - example at ./spec/models/taxon_concept/ailuropoda_spec.rb:40 (FAILED - 315) - -TaxonConcept - Arctocephalus -Procedure: taxonomy - LISTING - cites_listing - should be II at species level Arctocephalus australis (FAILED - 316) - should be I at species level Arctocephalus townsendi (FAILED - 317) - should be I/II at genus level Arctocephalus (FAILED - 318) - cites_listed - should be true for genus Arctocephalus (FAILED - 319) - should be true for species Arctocephalus townsendi (FAILED - 320) - should be false for species Arctocephalus australis (inclusion in higher taxa listing) (FAILED - 321) - eu_listed - should be true for genus Arctocephalus (FAILED - 322) - should be true for species Arctocephalus townsendi (FAILED - 323) - should be false for species Arctocephalus australis (inclusion in higher taxa listing) (FAILED - 324) - -TaxonConcept - Boa constrictor -Procedure: taxonomy - TAXONOMY - full_name - for subspecies Boa constrictor occidentalis - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:9 (FAILED - 325) - for species Boa constrictor - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:12 (FAILED - 326) - for genus Boa - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:15 (FAILED - 327) - ancestors - family - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:21 (FAILED - 328) - order - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:24 (FAILED - 329) - class - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:27 (FAILED - 330) - LISTING - cites_listing - for subspecies Boa constrictor occidentalis - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:35 (FAILED - 331) - for subspecies Boa constrictor constrictor - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:38 (FAILED - 332) - for species Boa constrictor - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:41 (FAILED - 333) - eu_listing - for subspecies Boa constrictor occidentalis - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:47 (FAILED - 334) - for subspecies Boa constrictor constrictor - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:50 (FAILED - 335) - for species Boa constrictor - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:53 (FAILED - 336) - cites_listed - for family Boidae - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:59 (FAILED - 337) - for genus Boa - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:62 (FAILED - 338) - for species Boa constrictor (inclusion in higher taxa listing) - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:65 (FAILED - 339) - for subspecies Boa constrictor occidentalis - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:68 (FAILED - 340) - for subspecies Boa constrictor constrictor - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:71 (FAILED - 341) - cites_show - for family Boidae - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:77 (FAILED - 342) - for genus Boa - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:80 (FAILED - 343) - for species Boa constrictor (inclusion in higher taxa listing) - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:83 (FAILED - 344) - for subspecies Boa constrictor occidentalis - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:86 (FAILED - 345) - for subspecies Boa constrictor constrictor - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:89 (FAILED - 346) - cites_listed_descendants - for family Boidae - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:95 (FAILED - 347) - for genus Boa - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:98 (FAILED - 348) - for species Boa constrictor (inclusion in higher taxa listing) - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:101 (FAILED - 349) - for subspecies Boa constrictor occidentalis - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:104 (FAILED - 350) - eu_listed - for family Boidae - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:110 (FAILED - 351) - for genus Boa - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:113 (FAILED - 352) - for species Boa constrictor (inclusion in higher taxa listing) - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:116 (FAILED - 353) - for subspecies Boa constrictor occidentalis - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:119 (FAILED - 354) - show_in_species_plus_ac - for family Boidae - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:125 (FAILED - 355) - for genus Boa - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:128 (FAILED - 356) - for species Boa constrictor (inclusion in higher taxa listing) - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:131 (FAILED - 357) - for subspecies Boa constrictor occidentalis - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:134 (FAILED - 358) - for subspecies Boa constrictor constrictor - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:137 (FAILED - 359) - show_in_checklist_ac - for family Boidae - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:143 (FAILED - 360) - for genus Boa - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:146 (FAILED - 361) - for species Boa constrictor (inclusion in higher taxa listing) - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:149 (FAILED - 362) - for subspecies Boa constrictor occidentalis - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:152 (FAILED - 363) - for subspecies Boa constrictor constrictor - example at ./spec/models/taxon_concept/boa_constrictor_spec.rb:155 (FAILED - 364) - -TaxonConcept - Caiman latirostris -Procedure: taxonomy - TAXONOMY - full_name - for species synonym Alligator cynocephalus - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:10 (FAILED - 365) - rank_name - for species synonym Alligator cynocephalus - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:15 (FAILED - 366) - REFERENCES - cites_accepted - for species Caiman latirostris - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:23 (FAILED - 367) - for synonym species Alligator cynocephalus - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:26 (FAILED - 368) - standard_taxon_concept_references - for species Caiman latirostris - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:31 (FAILED - 369) - LISTING - cites_listing - for species Caiman latirostris - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:38 (FAILED - 370) - eu_listing - for species Caiman latirostris - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:44 (FAILED - 371) - cites_listed - for order Crocodylia - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:50 (FAILED - 372) - for family Alligatoridae - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:53 (FAILED - 373) - for genus Caiman - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:56 (FAILED - 374) - for species Caiman latoristris - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:59 (FAILED - 375) - eu_listed - for order Crocodylia - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:65 (FAILED - 376) - for family Alligatoridae - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:68 (FAILED - 377) - for genus Caiman - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:71 (FAILED - 378) - for species Caiman latoristris - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:74 (FAILED - 379) - cites_show - for order Crocodylia - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:80 (FAILED - 380) - for family Alligatoridae - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:83 (FAILED - 381) - for genus Caiman - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:86 (FAILED - 382) - for species Caiman latoristris - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:89 (FAILED - 383) - for synonym species Alligator cynocephalus - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:92 (FAILED - 384) - ann_symbol - for species Caiman latirostris - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:98 (FAILED - 385) - hash_ann_symbol - for species Caiman latirostris - example at ./spec/models/taxon_concept/caiman_latirostris_spec.rb:104 (FAILED - 386) - -TaxonConcept - before validate - taxonomic position not given for fixed order rank - should eq "1.1" - taxonomic position given for fixed order rank - should eq "1.2" - taxonomic position not given for fixed order root rank - should eq "1" - after save - data should be populated when creating a child - should eq "Derp" - should eq "SPECIES" - -TaxonConcept - Canis lupus -Procedure: taxonomy - LISTING - cites_listing - for species Canis lupus (population split listing) - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:9 (FAILED - 387) - eu_listing - for species Canis lupus (population split listing) - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:15 (FAILED - 388) - cites_listed - for species Canis lupus - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:21 (FAILED - 389) - for subspecies Canis lupus crassodon - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:24 (FAILED - 390) - eu_listed - for species Canis lupus - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:30 (FAILED - 391) - show_in_species_plus_ac - for species Canis lupus - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:36 (FAILED - 392) - for subspecies Canis lupus crassodon - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:39 (FAILED - 393) - show_in_checklist_ac - for species Canis lupus - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:45 (FAILED - 394) - for subspecies Canis lupus crassodon - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:48 (FAILED - 395) - show_in_species_plus - for species Canis lupus - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:54 (FAILED - 396) - for subspecies Canis lupus crassodon - example at ./spec/models/taxon_concept/canis_lupus_spec.rb:57 (FAILED - 397) - -TaxonConcept - Caretta caretta CMS -Procedure: taxonomy - LISTING - cms_listing - for family Cheloniidae - example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:10 (FAILED - 398) - for species Caretta caretta - example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:13 (FAILED - 399) - cms_listed - for family Cheloniidae - example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:19 (FAILED - 400) - for species Caretta caretta - example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:22 (FAILED - 401) - CASCADING LISTING - current_cms_additions - for family Cheloniidae - example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:30 (FAILED - 402) - for species Caretta caretta - example at ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:35 (FAILED - 403) - -TaxonConcept - Cedrela montana -Procedure: taxonomy - LISTING - cites_listing - for species Cedrela montana - example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:10 (FAILED - 404) - cites_listed - for species Cedrela montana - example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:16 (FAILED - 405) - cites_show - for species Cedrela montana - example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:22 (FAILED - 406) - eu_listing - for species Cedrela montana - example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:28 (FAILED - 407) - eu_listed - for species Cedrela montana - example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:34 (FAILED - 408) - eu_show - for species Cedrela montana - example at ./spec/models/taxon_concept/cedrela_montana_spec.rb:40 (FAILED - 409) - -TaxonConcept - Cervus elphus CMS -Procedure: taxonomy - LISTING - cms_listing - for species Cervus elaphus - example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:10 (FAILED - 410) - for subspecies Cervus elaphus bactrianus - example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:13 (FAILED - 411) - for subspecies Cervus elaphus barbarus - example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:16 (FAILED - 412) - show_in_species_plus_ac - for subspecies Cervus elaphus bactrianus (instrument) - example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:22 (FAILED - 413) - for subspecies Cervus elaphus barbarus (listing) - example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:25 (FAILED - 414) - show_in_species_plus - for subspecies Cervus elaphus bactrianus (instrument) - example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:31 (FAILED - 415) - for subspecies Cervus elaphus barbarus (listing) - example at ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:34 (FAILED - 416) - -TaxonConcept - Cervus elaphus -Procedure: taxonomy - TAXONOMY - full_name - for subspecies Cervus elaphus bactrianus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:10 (FAILED - 417) - for species Cervus elaphus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:13 (FAILED - 418) - for genus Cervus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:16 (FAILED - 419) - LISTING - cites_listing - for species Cervus elaphus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:24 (FAILED - 420) - for subspecies Cervus elaphus bactrianus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:27 (FAILED - 421) - for subspecies Cervus elaphus barbarus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:30 (FAILED - 422) - for subspecies Cervus elaphus hanglu - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:33 (FAILED - 423) - for subspecies Cervus elaphus canadensis - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:36 (FAILED - 424) - eu_listing - for species Cervus elaphus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:42 (FAILED - 425) - for subspecies Cervus elaphus bactrianus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:45 (FAILED - 426) - for subspecies Cervus elaphus barbarus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:48 (FAILED - 427) - for subspecies Cervus elaphus hanglu - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:51 (FAILED - 428) - for subspecies Cervus elaphus canadensis - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:54 (FAILED - 429) - cites_listed - for order Artiodactyla - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:60 (FAILED - 430) - for family Cervidae - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:63 (FAILED - 431) - for genus Cervus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:66 (FAILED - 432) - for species Cervus elaphus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:69 (FAILED - 433) - for subspecies Cervus elaphus bactrianus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:72 (FAILED - 434) - for subspecies Cervus elaphus barbarus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:75 (FAILED - 435) - for subspecies Cervus elaphus hanglu - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:78 (FAILED - 436) - for subspecies Cervus elaphus canadensis - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:81 (FAILED - 437) - eu_listed - for order Artiodactyla - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:87 (FAILED - 438) - for family Cervidae - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:90 (FAILED - 439) - for genus Cervus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:93 (FAILED - 440) - for species Cervus elaphus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:96 (FAILED - 441) - for subspecies Cervus elaphus bactrianus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:99 (FAILED - 442) - for subspecies Cervus elaphus barbarus - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:102 (FAILED - 443) - for subspecies Cervus elaphus hanglu - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:105 (FAILED - 444) - for subspecies Cervus elaphus canadensis - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:108 (FAILED - 445) - cites_show - for subspecies Cervus elaphus hanglu - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:114 (FAILED - 446) - for subspecies Cervus elaphus canadensis - example at ./spec/models/taxon_concept/cervus_elaphus_spec.rb:117 (FAILED - 447) - -TaxonConcept - Colophon -Procedure: taxonomy - LISTING - cites_listing - for genus Colophon - example at ./spec/models/taxon_concept/colophon_spec.rb:10 (FAILED - 448) - for species Colophon barnardi - example at ./spec/models/taxon_concept/colophon_spec.rb:13 (FAILED - 449) - eu_listing - for genus Colophon - example at ./spec/models/taxon_concept/colophon_spec.rb:19 (FAILED - 450) - for species Colophon barnardi - example at ./spec/models/taxon_concept/colophon_spec.rb:22 (FAILED - 451) - cites_listed - for genus Colophon - example at ./spec/models/taxon_concept/colophon_spec.rb:28 (FAILED - 452) - for species Colophon barnardi - example at ./spec/models/taxon_concept/colophon_spec.rb:31 (FAILED - 453) - eu_listed - for genus Colophon - example at ./spec/models/taxon_concept/colophon_spec.rb:37 (FAILED - 454) - for species Colophon barnardi - example at ./spec/models/taxon_concept/colophon_spec.rb:40 (FAILED - 455) - cites_show - for order Coleoptera - example at ./spec/models/taxon_concept/colophon_spec.rb:46 (FAILED - 456) - for family Lucanidae - example at ./spec/models/taxon_concept/colophon_spec.rb:49 (FAILED - 457) - current_party_ids - for genus Colophon - example at ./spec/models/taxon_concept/colophon_spec.rb:55 (FAILED - 458) - for species Colophon barnardi - example at ./spec/models/taxon_concept/colophon_spec.rb:58 (FAILED - 459) - -TaxonConcept - Dalbergia -Procedure: taxonomy - LISTING - cites_listing - for species Dalbergia abbreviata - example at ./spec/models/taxon_concept/dalbergia_spec.rb:10 (FAILED - 460) - for species Dalbergia abrahamii - example at ./spec/models/taxon_concept/dalbergia_spec.rb:13 (FAILED - 461) - cites_listed - for species Dalbergia abbreviata - example at ./spec/models/taxon_concept/dalbergia_spec.rb:19 (FAILED - 462) - for species Dalbergia abrahamii - example at ./spec/models/taxon_concept/dalbergia_spec.rb:22 (FAILED - 463) - cites_show - for species Dalbergia abbreviata - example at ./spec/models/taxon_concept/dalbergia_spec.rb:28 (FAILED - 464) - for species Dalbergia abrahamii - example at ./spec/models/taxon_concept/dalbergia_spec.rb:31 (FAILED - 465) - -TaxonConcept - destroy - general - when no dependent objects attached - should be truthy - when distributions - should be truthy - when common names - should be truthy - when references - should be truthy - when document citations - should be falsey - CMS - when taxon instruments - should be falsey - CITES / EU - when listing changes - should be falsey - when CITES quotas - should be falsey - when CITES suspensions - should be falsey - when EU opinions - should be falsey - when EU suspensions - should be falsey - when shipments - should be falsey - when reported shipments - should be falsey - -TaxonConcept - Diospyros -Procedure: taxonomy - LISTING - cites_listing - for species Diospyros aculeata - example at ./spec/models/taxon_concept/diospyros_spec.rb:10 (FAILED - 466) - for species Diospyros acuta - example at ./spec/models/taxon_concept/diospyros_spec.rb:13 (FAILED - 467) - cites_listed - for species Diospyros aculeata - example at ./spec/models/taxon_concept/diospyros_spec.rb:19 (FAILED - 468) - for species Diospyros acuta - example at ./spec/models/taxon_concept/diospyros_spec.rb:22 (FAILED - 469) - cites_show - for species Diospyros aculeata - example at ./spec/models/taxon_concept/diospyros_spec.rb:28 (FAILED - 470) - for species Diospyros acuta - example at ./spec/models/taxon_concept/diospyros_spec.rb:31 (FAILED - 471) - eu_listing - for species Diospyros aculeata - example at ./spec/models/taxon_concept/diospyros_spec.rb:37 (FAILED - 472) - for species Diospyros acuta - example at ./spec/models/taxon_concept/diospyros_spec.rb:40 (FAILED - 473) - eu_listed - for species Diospyros aculeata - example at ./spec/models/taxon_concept/diospyros_spec.rb:46 (FAILED - 474) - for species Diospyros acuta - example at ./spec/models/taxon_concept/diospyros_spec.rb:49 (FAILED - 475) - eu_show - for species Diospyros aculeata - example at ./spec/models/taxon_concept/diospyros_spec.rb:55 (FAILED - 476) - for species Diospyros acuta - example at ./spec/models/taxon_concept/diospyros_spec.rb:58 (FAILED - 477) - -TaxonConcept - Falconiformes -Procedure: taxonomy - TAXONOMY - rank_name - for Falco hybrid - example at ./spec/models/taxon_concept/falconiformes_spec.rb:10 (FAILED - 478) - LISTING - cites_listing - for order Falconiformes - example at ./spec/models/taxon_concept/falconiformes_spec.rb:18 (FAILED - 479) - for species Falco araea - example at ./spec/models/taxon_concept/falconiformes_spec.rb:21 (FAILED - 480) - for species Falco alopex (H) - example at ./spec/models/taxon_concept/falconiformes_spec.rb:24 (FAILED - 481) - for species Gymnogyps californianus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:27 (FAILED - 482) - for species Sarcoramphus papa - example at ./spec/models/taxon_concept/falconiformes_spec.rb:30 (FAILED - 483) - for species Vultur atratus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:33 (FAILED - 484) - eu_listing - for order Falconiformes - example at ./spec/models/taxon_concept/falconiformes_spec.rb:39 (FAILED - 485) - for species Falco araea - example at ./spec/models/taxon_concept/falconiformes_spec.rb:42 (FAILED - 486) - for species Falco alopex (H) - example at ./spec/models/taxon_concept/falconiformes_spec.rb:45 (FAILED - 487) - for species Gymnogyps californianus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:48 (FAILED - 488) - for species Sarcoramphus papa - example at ./spec/models/taxon_concept/falconiformes_spec.rb:51 (FAILED - 489) - for species Vultur atratus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:54 (FAILED - 490) - cites_status - for genus Vultur - example at ./spec/models/taxon_concept/falconiformes_spec.rb:60 (FAILED - 491) - for species Vultur atratus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:63 (FAILED - 492) - cites_listed - for order Falconiformes - example at ./spec/models/taxon_concept/falconiformes_spec.rb:69 (FAILED - 493) - for family Falconidae (inclusion in higher taxa listing) - example at ./spec/models/taxon_concept/falconiformes_spec.rb:72 (FAILED - 494) - for genus Falco - example at ./spec/models/taxon_concept/falconiformes_spec.rb:75 (FAILED - 495) - for species Falco araea - example at ./spec/models/taxon_concept/falconiformes_spec.rb:78 (FAILED - 496) - for species Falco alopex - example at ./spec/models/taxon_concept/falconiformes_spec.rb:81 (FAILED - 497) - for species Vultur atratus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:84 (FAILED - 498) - for subspecies Falco peregrinus peregrinus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:87 (FAILED - 499) - eu_listed - for order Falconiformes - example at ./spec/models/taxon_concept/falconiformes_spec.rb:93 (FAILED - 500) - for family Falconidae (inclusion in higher taxa listing) - example at ./spec/models/taxon_concept/falconiformes_spec.rb:96 (FAILED - 501) - for genus Falco - example at ./spec/models/taxon_concept/falconiformes_spec.rb:99 (FAILED - 502) - for species Falco araea - example at ./spec/models/taxon_concept/falconiformes_spec.rb:102 (FAILED - 503) - for species Falco alopex - example at ./spec/models/taxon_concept/falconiformes_spec.rb:105 (FAILED - 504) - for species Vultur atratus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:108 (FAILED - 505) - for subspecies Falco peregrinus peregrinus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:111 (FAILED - 506) - cites_show - for order Falconiformes - example at ./spec/models/taxon_concept/falconiformes_spec.rb:117 (FAILED - 507) - for family Falconidae - example at ./spec/models/taxon_concept/falconiformes_spec.rb:120 (FAILED - 508) - for Falco hybrid - example at ./spec/models/taxon_concept/falconiformes_spec.rb:123 (FAILED - 509) - show_in_checklist_ac - for subspecies Falco peregrinus peregrinus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:129 (FAILED - 510) - show_in_species_plus_ac - for subspecies Falco peregrinus peregrinus - example at ./spec/models/taxon_concept/falconiformes_spec.rb:135 (FAILED - 511) - -TaxonConcept - create - when new - should be truthy - should be truthy - should be truthy - should == "Lolcatus lolcatus x lolatus" - when duplicate - should change #count by 0 - when duplicate but author name different - should change #count by 1 - -TaxonConcept - Loxodonta africana CMS -Procedure: taxonomy - TAXONOMY - full_name - for species Loxodonta africana - example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:9 (FAILED - 512) - for genus Loxodonta - example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:12 (FAILED - 513) - rank - for species Loxodonta africana - example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:17 (FAILED - 514) - ancestors - family - example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:22 (FAILED - 515) - order - example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:25 (FAILED - 516) - class - example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:28 (FAILED - 517) - LISTING - cms_listing - for species Loxodonta africana - example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:36 (FAILED - 518) - cms_listed - for species Loxodonta africana - example at ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:42 (FAILED - 519) - -TaxonConcept - Loxodonta africana -Procedure: taxonomy - TAXONOMY - full_name - for species Loxodonta africana - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:9 (FAILED - 520) - for genus Loxodonta - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:12 (FAILED - 521) - rank - for species Loxodonta africana - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:17 (FAILED - 522) - ancestors - family - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:22 (FAILED - 523) - order - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:25 (FAILED - 524) - class - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:28 (FAILED - 525) - LISTING - cites_listing - for species Loxodonta africana (population split listing) - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:36 (FAILED - 526) - eu_listing - for species Loxodonta africana (population split listing) - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:42 (FAILED - 527) - cites_listed - for species Loxodonta africana - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:48 (FAILED - 528) - for family Elephantidae - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:51 (FAILED - 529) - eu_listed - for species Loxodonta africana - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:57 (FAILED - 530) - for family Elephantidae - example at ./spec/models/taxon_concept/loxodonta_africana_spec.rb:60 (FAILED - 531) - -TaxonConcept - Mellivora capensis -Procedure: taxonomy - LISTING - cites_listing - for species Mellivora capensis - example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:9 (FAILED - 532) - eu_listing - for species Mellivora capensis - example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:15 (FAILED - 533) - cites_listed - for family Mustelinae - example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:21 (FAILED - 534) - for genus Mellivora - example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:24 (FAILED - 535) - for species Mellivora capensis - example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:27 (FAILED - 536) - eu_listed - for family Mustelinae - example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:33 (FAILED - 537) - for genus Mellivora - example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:36 (FAILED - 538) - for species Mellivora capensis - example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:39 (FAILED - 539) - current_party_ids - for species Mellivora capensis - example at ./spec/models/taxon_concept/mellivora_capensis_spec.rb:45 (FAILED - 540) - -TaxonConcept - Moschus -Procedure: taxonomy - LISTING - cites_listing - for genus Moschus - example at ./spec/models/taxon_concept/moschus_spec.rb:10 (FAILED - 541) - for species Moschus leucogaster - example at ./spec/models/taxon_concept/moschus_spec.rb:13 (FAILED - 542) - for species Moschus moschiferus - example at ./spec/models/taxon_concept/moschus_spec.rb:16 (FAILED - 543) - for subspecies Moschus moschiferus moschiferus - example at ./spec/models/taxon_concept/moschus_spec.rb:19 (FAILED - 544) - cites_listed - for genus Moschus - example at ./spec/models/taxon_concept/moschus_spec.rb:25 (FAILED - 545) - for species Moschus leucogaster - example at ./spec/models/taxon_concept/moschus_spec.rb:28 (FAILED - 546) - for species Moschus moschiferus - example at ./spec/models/taxon_concept/moschus_spec.rb:31 (FAILED - 547) - for subspecies Moschus moschiferus moschiferus - example at ./spec/models/taxon_concept/moschus_spec.rb:34 (FAILED - 548) - CASCADING LISTING - current_cites_additions - for species Moschus leucogaster - example at ./spec/models/taxon_concept/moschus_spec.rb:42 (FAILED - 549) - for species Moschus moschiferus - example at ./spec/models/taxon_concept/moschus_spec.rb:51 (FAILED - 550) - for subspecies Moschus moschiferus moschiferus - example at ./spec/models/taxon_concept/moschus_spec.rb:60 (FAILED - 551) - -TaxonConcept - Natator depressus -Procedure: taxonomy - LISTING - cites_listing - for family Cheloniidae - example at ./spec/models/taxon_concept/natator_depressus_spec.rb:10 (FAILED - 552) - for species Natator depressus - example at ./spec/models/taxon_concept/natator_depressus_spec.rb:13 (FAILED - 553) - -TaxonConcept - Notomys aquilo -Procedure: taxonomy - LISTING - cites_listing - for genus Notomys - example at ./spec/models/taxon_concept/notomys_aquilo_spec.rb:10 (FAILED - 554) - for species Notomys aquilo - example at ./spec/models/taxon_concept/notomys_aquilo_spec.rb:13 (FAILED - 555) - cites_show - for genus Notomys - example at ./spec/models/taxon_concept/notomys_aquilo_spec.rb:19 (FAILED - 556) - for species Notomys aquilo - example at ./spec/models/taxon_concept/notomys_aquilo_spec.rb:22 (FAILED - 557) - -TaxonConcept - Panax ginseng -Procedure: taxonomy - LISTING - cites_listed - for species Panax ginseng - example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:11 (FAILED - 558) - for genus Panax - example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:14 (FAILED - 559) - eu_listed - for species Panax ginseng - example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:20 (FAILED - 560) - for genus Panax - example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:23 (FAILED - 561) - cites_listing - for species Panax ginseng - example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:29 (FAILED - 562) - eu_listing - for species Panax ginseng - example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:35 (FAILED - 563) - ann_symbol - for species Panax ginseng - example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:41 (FAILED - 564) - hash_ann_symbol - for species Panax ginseng - example at ./spec/models/taxon_concept/panax_ginseng_spec.rb:47 (FAILED - 565) - -TaxonConcept - Pereskia -Procedure: taxonomy - LISTING - cites_listing - for genus Pereskia (not listed, shown) - example at ./spec/models/taxon_concept/pereskia_spec.rb:10 (FAILED - 566) - for genus Ariocarpus - example at ./spec/models/taxon_concept/pereskia_spec.rb:13 (FAILED - 567) - for family Cactaceae - example at ./spec/models/taxon_concept/pereskia_spec.rb:16 (FAILED - 568) - eu_listing - for genus Pereskia (not listed, shown) - example at ./spec/models/taxon_concept/pereskia_spec.rb:22 (FAILED - 569) - for genus Ariocarpus - example at ./spec/models/taxon_concept/pereskia_spec.rb:25 (FAILED - 570) - for family Cactaceae - example at ./spec/models/taxon_concept/pereskia_spec.rb:28 (FAILED - 571) - cites_listed - for family Cactaceae - example at ./spec/models/taxon_concept/pereskia_spec.rb:34 (FAILED - 572) - for genus Pereskia - example at ./spec/models/taxon_concept/pereskia_spec.rb:37 (FAILED - 573) - eu_listed - for family Cactaceae - example at ./spec/models/taxon_concept/pereskia_spec.rb:43 (FAILED - 574) - for genus Pereskia - example at ./spec/models/taxon_concept/pereskia_spec.rb:46 (FAILED - 575) - cites_status - for genus Pereskia - example at ./spec/models/taxon_concept/pereskia_spec.rb:52 (FAILED - 576) - cites_show - for genus Pereskia - example at ./spec/models/taxon_concept/pereskia_spec.rb:58 (FAILED - 577) - -TaxonConcept - Platysternon megacephalum -Procedure: taxonomy - LISTING - cites_listing - for family Platysternidae - example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:10 (FAILED - 578) - for species Platysternon megacephalum - example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:13 (FAILED - 579) - cites_listed - for species Platysternon megacephalum - example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:19 (FAILED - 580) - cites_show - for species Platysternon megacephalum - example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:25 (FAILED - 581) - eu_listing - for family Platysternidae - example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:31 (FAILED - 582) - for species Platysternon megacephalum - example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:34 (FAILED - 583) - eu_listed - for species Platysternon megacephalum - example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:40 (FAILED - 584) - eu_show - for species Platysternon megacephalum - example at ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:46 (FAILED - 585) - -TaxonConcept - Pristis microdon -Procedure: taxonomy - LISTING - cites_listing - for family Pristidae - example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:10 (FAILED - 586) - for species Pristis microdon - example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:13 (FAILED - 587) - cites_listed - for species Pristis microdon - example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:19 (FAILED - 588) - cites_show - for species Pristis microdon - example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:25 (FAILED - 589) - eu_listing - for family Pristidae - example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:31 (FAILED - 590) - for species Pristis microdon - example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:34 (FAILED - 591) - eu_listed - for species Pristis microdon - example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:40 (FAILED - 592) - eu_show - for species Pristis microdon - example at ./spec/models/taxon_concept/pristis_microdon_spec.rb:46 (FAILED - 593) - -TaxonConcept - Pseudomys fieldi -Procedure: taxonomy - LISTING - cites_listing - for subspecies Pseudomys fieldi preaconis - example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:10 (FAILED - 594) - for species Pseudomys fieldi - example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:13 (FAILED - 595) - eu_listing - for subspecies Pseudomys fieldi preaconis - example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:19 (FAILED - 596) - for species Pseudomys fieldi - example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:22 (FAILED - 597) - cites_show - for subspecies Pseudomys fieldi preaconis - example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:28 (FAILED - 598) - for species Pseudomys fieldi - example at ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:31 (FAILED - 599) - -TaxonConcept - Psittaciformes -Procedure: taxonomy - LISTING - cites_listing - for order Psittaciformes - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:10 (FAILED - 600) - for species Cacatua goffiniana - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:13 (FAILED - 601) - for species Cacatua ducorpsi (H) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:16 (FAILED - 602) - for species Probosciger aterrimus - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:19 (FAILED - 603) - for species Amazona aestiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:22 (FAILED - 604) - for species Agapornis roseicollis (DEL II, not listed, not shown) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:25 (FAILED - 605) - for species Psittacula krameri (DEL III, not listed, not shown) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:28 (FAILED - 606) - for subspecies Amazona festiva festiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:31 (FAILED - 607) - eu_listing - for order Psittaciformes - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:37 (FAILED - 608) - for species Cacatua goffiniana - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:40 (FAILED - 609) - for species Cacatua ducorpsi (H) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:43 (FAILED - 610) - for species Probosciger aterrimus - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:46 (FAILED - 611) - for species Amazona aestiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:49 (FAILED - 612) - for species Agapornis roseicollis (DEL II, not listed, not shown) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:52 (FAILED - 613) - for species Psittacula krameri (DEL III, not listed, not shown) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:55 (FAILED - 614) - for subspecies Amazona festiva festiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:58 (FAILED - 615) - cites_listed - for order Psittaciformes - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:64 (FAILED - 616) - for family Cacatuidae - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:67 (FAILED - 617) - for genus Cacatua - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:70 (FAILED - 618) - for species Cacatua goffiniana - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:73 (FAILED - 619) - for species Cacatua ducorpsi - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:76 (FAILED - 620) - for subspecies Amazona festiva festiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:79 (FAILED - 621) - eu_listed - for order Psittaciformes - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:85 (FAILED - 622) - for family Cacatuidae - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:88 (FAILED - 623) - for genus Cacatua - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:91 (FAILED - 624) - for species Cacatua goffiniana - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:94 (FAILED - 625) - for species Cacatua ducorpsi - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:97 (FAILED - 626) - for subspecies Amazona festiva festiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:100 (FAILED - 627) - cites_show - for species Agapornis roseicollis (DEL II) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:106 (FAILED - 628) - for species Amazona aestiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:109 (FAILED - 629) - for species Psittacula krameri (DEL III) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:112 (FAILED - 630) - cites_status - for species Agapornis roseicollis (DEL II) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:118 (FAILED - 631) - for species Psittacula krameri (DEL III) - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:121 (FAILED - 632) - show_in_checklist_ac - for subspecies Amazona festiva festiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:127 (FAILED - 633) - show_in_species_plus_ac - for subspecies Amazona festiva festiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:133 (FAILED - 634) - show_in_species_plus - for subspecies Amazona festiva festiva - example at ./spec/models/taxon_concept/psittaciformes_spec.rb:139 (FAILED - 635) - -TaxonConcept - create - when new - should be truthy - should be truthy - should be truthy - should == "Lolcatus lolus" - when duplicate - should change #count by 0 - when duplicate but author name different - should change #count by 1 - when has accepted parent - should == "Lolcatus lolus furiatus" - overnight calculations -Procedure: taxonomy - example at ./spec/models/taxon_concept/synonyms_spec.rb:93 (FAILED - 636) - -TaxonConcept - Tapiridae -Procedure: taxonomy - TAXONOMY - full_name - for family Tapiridae - example at ./spec/models/taxon_concept/tapiridae_spec.rb:9 (FAILED - 637) - rank - for family Tapiridae - example at ./spec/models/taxon_concept/tapiridae_spec.rb:14 (FAILED - 638) - ancestors - order - example at ./spec/models/taxon_concept/tapiridae_spec.rb:19 (FAILED - 639) - class - example at ./spec/models/taxon_concept/tapiridae_spec.rb:22 (FAILED - 640) - LISTING - cites_listing - for family Tapiridae - example at ./spec/models/taxon_concept/tapiridae_spec.rb:30 (FAILED - 641) - for species Tapirus terrestris - example at ./spec/models/taxon_concept/tapiridae_spec.rb:33 (FAILED - 642) - eu_listing - for family Tapiridae - example at ./spec/models/taxon_concept/tapiridae_spec.rb:39 (FAILED - 643) - for species Tapirus terrestris - example at ./spec/models/taxon_concept/tapiridae_spec.rb:42 (FAILED - 644) - cites_listed - for family Tapiridae - example at ./spec/models/taxon_concept/tapiridae_spec.rb:48 (FAILED - 645) - for genus Tapirus - example at ./spec/models/taxon_concept/tapiridae_spec.rb:51 (FAILED - 646) - for species Tapirus terrestris - example at ./spec/models/taxon_concept/tapiridae_spec.rb:54 (FAILED - 647) - eu_listed - for family Tapiridae - example at ./spec/models/taxon_concept/tapiridae_spec.rb:60 (FAILED - 648) - for genus Tapirus - example at ./spec/models/taxon_concept/tapiridae_spec.rb:63 (FAILED - 649) - for species Tapirus terrestris - example at ./spec/models/taxon_concept/tapiridae_spec.rb:66 (FAILED - 650) - -TaxonConcept - create - when new - should be truthy - should be truthy - should be truthy - should == "Lolcatus lolus" - when duplicate - should change #count by 0 - when duplicate but author name different - should change #count by 1 - when has accepted parent - should == "Lolcatus lolus furiatus" - overnight calculations -Procedure: taxonomy - example at ./spec/models/taxon_concept/trade_names_spec.rb:93 (FAILED - 651) - -TaxonConcept - Uroplatus -Procedure: taxonomy - REFERENCES - cites_accepted - for genus Uroplatus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:10 (FAILED - 652) - for species Uroplatus alluaudi - example at ./spec/models/taxon_concept/uroplatus_spec.rb:13 (FAILED - 653) - for species Uroplatus giganteus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:16 (FAILED - 654) - standard_taxon_concept_references - for family Gekkonidae - example at ./spec/models/taxon_concept/uroplatus_spec.rb:21 (FAILED - 655) - for genus Uroplatus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:24 (FAILED - 656) - for species Uroplatus alluaudi - example at ./spec/models/taxon_concept/uroplatus_spec.rb:27 (FAILED - 657) - for species Uroplatus giganteus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:30 (FAILED - 658) - LISTING - cites_listing - for genus Uroplatus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:37 (FAILED - 659) - for species Uroplatus giganteus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:40 (FAILED - 660) - eu_listing - for genus Uroplatus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:46 (FAILED - 661) - for species Uroplatus giganteus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:49 (FAILED - 662) - cites_listed - for family Gekkonidae - example at ./spec/models/taxon_concept/uroplatus_spec.rb:55 (FAILED - 663) - for genus Uroplatus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:58 (FAILED - 664) - for species Uroplatus giganteus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:61 (FAILED - 665) - eu_listed - for family Gekkonidae - example at ./spec/models/taxon_concept/uroplatus_spec.rb:67 (FAILED - 666) - for genus Uroplatus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:70 (FAILED - 667) - for species Uroplatus giganteus - example at ./spec/models/taxon_concept/uroplatus_spec.rb:73 (FAILED - 668) - -TaxonConcept - create - all fine - should be truthy - taxonomy does not match parent - should have 1 error on :parent_id - parent is not an accepted name - should have 1 error on :parent_id - parent rank is too high above child rank - should have 1 error on :parent_id - parent rank is below child rank - should have 1 error on :parent_id - scientific name is not given - should have 1 error on :taxon_name_id - when taxonomic position malformed - should have 1 error on :taxonomic_position - when full name is already given - should have 1 error on :full_name - update - taxonomy - cannot change taxonomy when dependents present - scientific name - cannot change species scientific name - cannot change genus scientific name - parent - cannot change A species parent - can change S species parent - can change A genus parent - rank - cannot change A species rank - can change S species rank - -TaxonConcept - Varanidae -Procedure: taxonomy - REFERENCES - cites_accepted - for species Varanus bengalensis - example at ./spec/models/taxon_concept/varanidae_spec.rb:10 (FAILED - 669) - standard_taxon_concept_references - for order Sauria - example at ./spec/models/taxon_concept/varanidae_spec.rb:15 (FAILED - 670) - for family Varanidae - example at ./spec/models/taxon_concept/varanidae_spec.rb:18 (FAILED - 671) - for species Varanus bengalensis - example at ./spec/models/taxon_concept/varanidae_spec.rb:21 (FAILED - 672) - for species Varanus bushi - example at ./spec/models/taxon_concept/varanidae_spec.rb:24 (FAILED - 673) - example at ./spec/models/taxon_concept/varanidae_spec.rb:25 (FAILED - 674) - LISTING - cites_listing - for genus Varanus - example at ./spec/models/taxon_concept/varanidae_spec.rb:32 (FAILED - 675) - for species Varanus bengalensis - example at ./spec/models/taxon_concept/varanidae_spec.rb:35 (FAILED - 676) - eu_listing - for genus Varanus - example at ./spec/models/taxon_concept/varanidae_spec.rb:41 (FAILED - 677) - for species Varanus bengalensis - example at ./spec/models/taxon_concept/varanidae_spec.rb:44 (FAILED - 678) - cites_listed - for family Varanidae - example at ./spec/models/taxon_concept/varanidae_spec.rb:50 (FAILED - 679) - for genus Varanus - example at ./spec/models/taxon_concept/varanidae_spec.rb:53 (FAILED - 680) - for species Varanus bengalensis - example at ./spec/models/taxon_concept/varanidae_spec.rb:56 (FAILED - 681) - eu_listed - for family Varanidae - example at ./spec/models/taxon_concept/varanidae_spec.rb:62 (FAILED - 682) - for genus Varanus - example at ./spec/models/taxon_concept/varanidae_spec.rb:65 (FAILED - 683) - for species Varanus bengalensis - example at ./spec/models/taxon_concept/varanidae_spec.rb:68 (FAILED - 684) - -TaxonConceptData - to_h - when regular accepted name - should eq "Canidae" - when N accepted name - should eq "Canidae" - when hybrid - should eq "Canidae" - when synonym - should eq "Canidae" - when trade name - should eq "Canidae" - -TaxonConceptPrefixMatcher - when name status not specified - should include # "GENUS", "kingdom_id" => "31604", "kingdom_name" => "Lupus10352", "phylum_id" => "31605", "phylum_name" => "Lupus10351", "class_id" => "31606", "class_name" => "Lupus10350", "order_id" => "31607", "order_name" => "Aaa", "family_id" => "31608", "family_name" => "Aac", "subfamily_id" => "31609", "subfamily_name" => "Aab", "genus_id" => "31610", "genus_name" => "Abb"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Abb", name_status: "A", created_at: "2024-01-04 16:51:59", updated_at: "2024-01-04 16:51:59", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4305, created_by_id: 4305, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should not include # "GENUS", "kingdom_id" => "31613", "kingdom_name" => "Lupus10355", "phylum_id" => "31614", "phylum_name" => "Lupus10354", "class_id" => "31615", "class_name" => "Lupus10353", "order_id" => "31616", "order_name" => "Aaa", "family_id" => "31617", "family_name" => "Aac", "subfamily_id" => "31618", "subfamily_name" => "Aab", "genus_id" => "31621", "genus_name" => "Abc"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Abc", name_status: "H", created_at: "2024-01-04 16:51:59", updated_at: "2024-01-04 16:51:59", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4306, created_by_id: 4306, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - when name status H - should not include # "GENUS", "kingdom_id" => "31622", "kingdom_name" => "Lupus10358", "phylum_id" => "31623", "phylum_name" => "Lupus10357", "class_id" => "31624", "class_name" => "Lupus10356", "order_id" => "31625", "order_name" => "Aaa", "family_id" => "31626", "family_name" => "Aac", "subfamily_id" => "31627", "subfamily_name" => "Aab", "genus_id" => "31628", "genus_name" => "Abb"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Abb", name_status: "A", created_at: "2024-01-04 16:52:00", updated_at: "2024-01-04 16:52:00", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4307, created_by_id: 4307, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - should include # "GENUS", "kingdom_id" => "31631", "kingdom_name" => "Lupus10361", "phylum_id" => "31632", "phylum_name" => "Lupus10360", "class_id" => "31633", "class_name" => "Lupus10359", "order_id" => "31634", "order_name" => "Aaa", "family_id" => "31635", "family_name" => "Aac", "subfamily_id" => "31636", "subfamily_name" => "Aab", "genus_id" => "31639", "genus_name" => "Abc"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Abc", name_status: "H", created_at: "2024-01-04 16:52:00", updated_at: "2024-01-04 16:52:00", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4308, created_by_id: 4308, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - when rank scope applied - should == ["Aab", "Aac"] - should == ["Aaa"] - should == ["Aaa", "Aaab"] - when taxon concept scope applied - should == ["Aaa", "Aab", "Aac"] - should == ["Aaab", "Aab", "Abb"] - -TaxonRelationship - has_opposite? - a relationship with no opposite - should == false - with an opposite - should == true - after_create_create_opposite - when creating a bidirectional relationship - should == true - when creating a non bidirectional relationship - should == false - validate_uniqueness_taxon_concept_id - adding a duplicate relationship between the same taxon_concepts - example at ./spec/models/taxon_relationship_spec.rb:66 - validate_intertaxonomic_relationship_uniqueness - adding an intertaxonomic relationship between taxon concepts that are already related (A -> B) - should == false - adding an intertaxonomic relationship between taxon concepts that are already related in the opposite direction (B -> A) - should == false - adding an intertaxonomic relationship between taxon concepts that are not already related - should == true - -Taxonomy - create - when valid - should be valid - when name missing - should be invalid - should have 1 error on :name - when name duplicated - should be invalid - should have 1 error on :name - update - when updating a non-protected name - should be truthy - when updating a protected name - should be falsey - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - should be falsey - when protected name - should be falsey - -Term - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - when CITES suspension - should be falsey - when CITES quota - should be falsey - when shipments - should be falsey - -Trade::AnnualReportUpload - valid? - when uploaded file as exporter with exporter column headers - example at ./spec/models/trade/annual_report_upload_spec.rb:54 (FAILED - 685) - when uploaded file as importer with exporter column headers - example at ./spec/models/trade/annual_report_upload_spec.rb:64 (FAILED - 686) - when uploaded file as importer with importer column headers - example at ./spec/models/trade/annual_report_upload_spec.rb:74 (FAILED - 687) - when uploaded file as exporter with importer column headers - example at ./spec/models/trade/annual_report_upload_spec.rb:84 (FAILED - 688) - validation_errors - example at ./spec/models/trade/annual_report_upload_spec.rb:99 (FAILED - 689) - create - when blank lines in import file - example at ./spec/models/trade/annual_report_upload_spec.rb:112 (FAILED - 690) - destroy - example at ./spec/models/trade/annual_report_upload_spec.rb:127 (FAILED - 691) - submit - it calls submission worker - -Trade::DistinctValuesValidationRule - validation_errors_for_aru - exporter should not equal importer (E) - example at ./spec/models/trade/distinct_values_validation_rule_spec.rb:52 (FAILED - 692) - exporter should not equal importer (I) - example at ./spec/models/trade/distinct_values_validation_rule_spec.rb:69 (FAILED - 693) - exporter should not equal country of origin - example at ./spec/models/trade/distinct_values_validation_rule_spec.rb:82 (FAILED - 694) - -Trade::Filter - results - when searching by taxon concepts ids - in the public interface - at GENUS rank -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:15 (FAILED - 695) -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:16 (FAILED - 696) -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:17 (FAILED - 697) - at FAMILY rank -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:25 (FAILED - 698) - in the admin interface - at GENUS rank -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:34 (FAILED - 699) -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:35 (FAILED - 700) -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:36 (FAILED - 701) - at FAMILY rank -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:43 (FAILED - 702) -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:44 (FAILED - 703) -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:45 (FAILED - 704) - at mixed ranks -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:54 (FAILED - 705) -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:55 (FAILED - 706) -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:56 (FAILED - 707) - when status N shipments present -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:68 (FAILED - 708) - when subspecies shipments present -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:79 (FAILED - 709) - when synonym subspecies shipments present - when searching by taxonomic parent -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:95 (FAILED - 710) - when searching by accepted name -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:103 (FAILED - 711) - when searching by reported taxon concepts ids - when trade names shipments present -Procedure: taxonomy - example at ./spec/models/trade/filter_spec.rb:122 (FAILED - 712) - when searching by appendices - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2947, importer_id: 2946, country_of_origin_id: 2946, reported_by_exporter: true, taxon_concept_id: 32280, year: 2012, created_at: "2024-01-04 16:52:31", updated_at: "2024-01-04 16:52:31", sandbox_id: nil, reported_taxon_concept_id: 32280, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4371, created_by_id: 4371, import_permits_ids: [1254], export_permits_ids: [1255, 1256], origin_permits_ids: [1257], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 1 - when searching for terms_ids - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2951, importer_id: 2950, country_of_origin_id: 2950, reported_by_exporter: true, taxon_concept_id: 32334, year: 2012, created_at: "2024-01-04 16:52:33", updated_at: "2024-01-04 16:52:33", sandbox_id: nil, reported_taxon_concept_id: 32334, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4373, created_by_id: 4373, import_permits_ids: [1268], export_permits_ids: [1269, 1270], origin_permits_ids: [1271], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 3 - when searching for units_ids - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2955, importer_id: 2954, country_of_origin_id: 2954, reported_by_exporter: true, taxon_concept_id: 32388, year: 2012, created_at: "2024-01-04 16:52:35", updated_at: "2024-01-04 16:52:35", sandbox_id: nil, reported_taxon_concept_id: 32388, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4375, created_by_id: 4375, import_permits_ids: [1282], export_permits_ids: [1283, 1284], origin_permits_ids: [1285], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 3 - when searching for purposes_ids - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2959, importer_id: 2958, country_of_origin_id: 2958, reported_by_exporter: true, taxon_concept_id: 32442, year: 2012, created_at: "2024-01-04 16:52:38", updated_at: "2024-01-04 16:52:38", sandbox_id: nil, reported_taxon_concept_id: 32442, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4377, created_by_id: 4377, import_permits_ids: [1296], export_permits_ids: [1297, 1298], origin_permits_ids: [1299], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 7 - when searching for sources_ids - when code - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2963, importer_id: 2962, country_of_origin_id: 2962, reported_by_exporter: true, taxon_concept_id: 32496, year: 2012, created_at: "2024-01-04 16:52:40", updated_at: "2024-01-04 16:52:40", sandbox_id: nil, reported_taxon_concept_id: 32496, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4379, created_by_id: 4379, import_permits_ids: [1310], export_permits_ids: [1311, 1312], origin_permits_ids: [1313], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 2 - when blank - should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2966, importer_id: 2967, country_of_origin_id: nil, reported_by_exporter: false, taxon_concept_id: 32553, year: 2013, created_at: "2024-01-04 16:52:43", updated_at: "2024-01-04 16:52:43", sandbox_id: nil, reported_taxon_concept_id: 32553, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4381, created_by_id: 4381, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 1 - when both code and blank - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2971, importer_id: 2970, country_of_origin_id: 2970, reported_by_exporter: true, taxon_concept_id: 32604, year: 2012, created_at: "2024-01-04 16:52:45", updated_at: "2024-01-04 16:52:45", sandbox_id: nil, reported_taxon_concept_id: 32604, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4383, created_by_id: 4383, import_permits_ids: [1338], export_permits_ids: [1339, 1340], origin_permits_ids: [1341], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 3 - when wild - should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2974, importer_id: 2975, country_of_origin_id: nil, reported_by_exporter: false, taxon_concept_id: 32661, year: 2013, created_at: "2024-01-04 16:52:47", updated_at: "2024-01-04 16:52:47", sandbox_id: nil, reported_taxon_concept_id: 32661, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4385, created_by_id: 4385, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 5 - when wild and internal - should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2978, importer_id: 2979, country_of_origin_id: nil, reported_by_exporter: false, taxon_concept_id: 32715, year: 2013, created_at: "2024-01-04 16:52:49", updated_at: "2024-01-04 16:52:49", sandbox_id: nil, reported_taxon_concept_id: 32715, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4387, created_by_id: 4387, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 4 - when searching for importers_ids - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2983, importer_id: 2982, country_of_origin_id: 2982, reported_by_exporter: true, taxon_concept_id: 32766, year: 2012, created_at: "2024-01-04 16:52:52", updated_at: "2024-01-04 16:52:52", sandbox_id: nil, reported_taxon_concept_id: 32766, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4389, created_by_id: 4389, import_permits_ids: [1380], export_permits_ids: [1381, 1382], origin_permits_ids: [1383], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 2 - when searching for exporters_ids - should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2986, importer_id: 2987, country_of_origin_id: 2987, reported_by_exporter: false, taxon_concept_id: 32823, year: 2013, created_at: "2024-01-04 16:52:54", updated_at: "2024-01-04 16:52:54", sandbox_id: nil, reported_taxon_concept_id: 32823, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4391, created_by_id: 4391, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 5 - when searching for countries_of_origin_ids - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 2991, importer_id: 2990, country_of_origin_id: 2990, reported_by_exporter: true, taxon_concept_id: 32874, year: 2012, created_at: "2024-01-04 16:52:57", updated_at: "2024-01-04 16:52:57", sandbox_id: nil, reported_taxon_concept_id: 32874, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4393, created_by_id: 4393, import_permits_ids: [1408], export_permits_ids: [1409, 1410], origin_permits_ids: [1411], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 2 - when searching by year - when time range specified - should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 2994, importer_id: 2995, country_of_origin_id: 2995, reported_by_exporter: false, taxon_concept_id: 32931, year: 2013, created_at: "2024-01-04 16:52:59", updated_at: "2024-01-04 16:52:59", sandbox_id: nil, reported_taxon_concept_id: 32931, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4395, created_by_id: 4395, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 6 - when time range specified incorrectly - should == 0 - when time range start specified - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3001, importer_id: 3000, country_of_origin_id: 3000, reported_by_exporter: true, taxon_concept_id: 33009, year: 2012, created_at: "2024-01-04 16:53:03", updated_at: "2024-01-04 16:53:03", sandbox_id: nil, reported_taxon_concept_id: 33009, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4398, created_by_id: 4398, import_permits_ids: [1443], export_permits_ids: [1444, 1445], origin_permits_ids: [1446], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 7 - when time range end specified - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3005, importer_id: 3004, country_of_origin_id: 3004, reported_by_exporter: true, taxon_concept_id: 33063, year: 2012, created_at: "2024-01-04 16:53:05", updated_at: "2024-01-04 16:53:05", sandbox_id: nil, reported_taxon_concept_id: 33063, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4400, created_by_id: 4400, import_permits_ids: [1457], export_permits_ids: [1458, 1459], origin_permits_ids: [1460], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 1 - when searching by reporter_type - when reporter type is not I or E - should == 7 - when reporter type is I - should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 3010, importer_id: 3011, country_of_origin_id: 3011, reported_by_exporter: false, taxon_concept_id: 33147, year: 2013, created_at: "2024-01-04 16:53:08", updated_at: "2024-01-04 16:53:08", sandbox_id: nil, reported_taxon_concept_id: 33147, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4403, created_by_id: 4403, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 5 - when reporter type is E - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3015, importer_id: 3014, country_of_origin_id: 3014, reported_by_exporter: true, taxon_concept_id: 33198, year: 2012, created_at: "2024-01-04 16:53:11", updated_at: "2024-01-04 16:53:11", sandbox_id: nil, reported_taxon_concept_id: 33198, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4405, created_by_id: 4405, import_permits_ids: [1492], export_permits_ids: [1493, 1494], origin_permits_ids: [1495], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 2 - when searching by permit - when permit number - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3019, importer_id: 3018, country_of_origin_id: 3018, reported_by_exporter: true, taxon_concept_id: 33252, year: 2012, created_at: "2024-01-04 16:53:13", updated_at: "2024-01-04 16:53:13", sandbox_id: nil, reported_taxon_concept_id: 33252, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4407, created_by_id: 4407, import_permits_ids: [1506], export_permits_ids: [1507, 1508], origin_permits_ids: [1509], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 1 - when blank - should include #, appendix: "II", trade_annual_report_upload_id: nil, exporter_id: 3022, importer_id: 3023, country_of_origin_id: 3023, reported_by_exporter: false, taxon_concept_id: 33309, year: 2013, created_at: "2024-01-04 16:53:15", updated_at: "2024-01-04 16:53:15", sandbox_id: nil, reported_taxon_concept_id: 33309, import_permit_number: nil, export_permit_number: nil, origin_permit_number: nil, legacy_shipment_number: nil, updated_by_id: 4409, created_by_id: 4409, import_permits_ids: nil, export_permits_ids: nil, origin_permits_ids: nil, epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 5 - when both permit number and blank - should == 6 - when searching by quantity - should include #, appendix: "I", trade_annual_report_upload_id: nil, exporter_id: 3029, importer_id: 3028, country_of_origin_id: 3028, reported_by_exporter: true, taxon_concept_id: 33387, year: 2012, created_at: "2024-01-04 16:53:19", updated_at: "2024-01-04 16:53:19", sandbox_id: nil, reported_taxon_concept_id: 33387, import_permit_number: "AAA", export_permit_number: "BBB;CCC", origin_permit_number: "EEE", legacy_shipment_number: nil, updated_by_id: 4412, created_by_id: 4412, import_permits_ids: [1541], export_permits_ids: [1542, 1543], origin_permits_ids: [1544], epix_created_at: nil, epix_updated_at: nil, epix_created_by_id: nil, epix_updated_by_id: nil> - should == 1 - total_cnt - when none matches - should == 0 - when one matches - should == 1 - when two match - should == 7 - -Trade::InclusionValidationRule - matching_records_for_aru_and_error - example at ./spec/models/trade/inclusion_validation_rule_spec.rb:65 (FAILED - 713) - refresh_errors_if_needed - when no updates - example at ./spec/models/trade/inclusion_validation_rule_spec.rb:104 (FAILED - 714) - when updates and error fixed for all records - error record is destroyed (FAILED - 715) - when updates and error fixed for some records - error record is updated to reflect new error_count (FAILED - 716) - validation_errors_for_aru - species name may have extra whitespace between name segments - example at ./spec/models/trade/inclusion_validation_rule_spec.rb:148 (FAILED - 717) - trading partner should be a valid iso code - example at ./spec/models/trade/inclusion_validation_rule_spec.rb:175 (FAILED - 718) - term can only be paired with unit as defined by term_trade_codes_pairs table - when invalid combination - example at ./spec/models/trade/inclusion_validation_rule_spec.rb:202 (FAILED - 719) - when required unit blank - example at ./spec/models/trade/inclusion_validation_rule_spec.rb:214 (FAILED - 720) - term can only be paired with purpose as defined by term_trade_codes_pairs table - example at ./spec/models/trade/inclusion_validation_rule_spec.rb:234 (FAILED - 721) - taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table - when accepted name - example at ./spec/models/trade/inclusion_validation_rule_spec.rb:255 (FAILED - 722) - when hybrid - example at ./spec/models/trade/inclusion_validation_rule_spec.rb:272 (FAILED - 723) - -Trade::PermitMatcher - results - when searching by permit number - when regular query - should include # - when wildcard query - should include # - when malicious query - should be empty - when leading whitespace - should include # - when trailing whitespace - should include # - -Trade::InclusionValidationRule - validation_errors_for_aru - when W source and country of origin blank and exporter doesn't match distribution (E) - example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:74 (FAILED - 724) - when W source and country of origin blank and exporter doesn't match distribution (I) - example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:97 (FAILED - 725) - when W source and country XX - example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:120 (FAILED - 726) - when W source and country doesn't match distribution of higher taxa - example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:143 (FAILED - 727) - when invalid scope specified - example at ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:160 (FAILED - 728) - -Trade::ReportedTaxonConceptResolver - resolving trade names - should include # "SPECIES", "kingdom_id" => "33512", "kingdom_name" => "Lupus11571", "phylum_id" => "33513", "phylum_name" => "Lupus11570", "class_id" => "33514", "class_name" => "Lupus11569", "order_id" => "33515", "order_name" => "Lupus11568", "family_id" => "33516", "family_name" => "Lupus11567", "subfamily_id" => "33517", "subfamily_name" => "Lupus11566", "genus_id" => "33518", "genus_name" => "Lupus11565", "species_id" => "33519", "species_name" => "Lupus11564"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus11565 lupus11564", name_status: "A", created_at: "2024-01-04 16:53:25", updated_at: "2024-01-04 16:53:25", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4442, created_by_id: 4442, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - resolving synonyms - should include # "SPECIES", "kingdom_id" => "33521", "kingdom_name" => "Lupus11580", "phylum_id" => "33522", "phylum_name" => "Lupus11579", "class_id" => "33523", "class_name" => "Lupus11578", "order_id" => "33524", "order_name" => "Lupus11577", "family_id" => "33525", "family_name" => "Lupus11576", "subfamily_id" => "33526", "subfamily_name" => "Lupus11575", "genus_id" => "33527", "genus_name" => "Lupus11574", "species_id" => "33528", "species_name" => "Lupus11573"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus11574 lupus11573", name_status: "A", created_at: "2024-01-04 16:53:26", updated_at: "2024-01-04 16:53:26", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4443, created_by_id: 4443, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - resolving accepted names - should include # "SPECIES", "kingdom_id" => "33530", "kingdom_name" => "Lupus11589", "phylum_id" => "33531", "phylum_name" => "Lupus11588", "class_id" => "33532", "class_name" => "Lupus11587", "order_id" => "33533", "order_name" => "Lupus11586", "family_id" => "33534", "family_name" => "Lupus11585", "subfamily_id" => "33535", "subfamily_name" => "Lupus11584", "genus_id" => "33536", "genus_name" => "Lupus11583", "species_id" => "33537", "species_name" => "Lupus11582"}, listing: nil, notes: nil, taxonomic_position: "1", full_name: "Lupus11583 lupus11582", name_status: "A", created_at: "2024-01-04 16:53:26", updated_at: "2024-01-04 16:53:26", touched_at: nil, legacy_trade_code: nil, updated_by_id: 4444, created_by_id: 4444, dependents_updated_at: nil, nomenclature_note_en: nil, nomenclature_note_es: nil, nomenclature_note_fr: nil, dependents_updated_by_id: nil, kew_id: nil> - -Trade::SandboxFilter - results -sh: 1: psql: not found - example at ./spec/models/trade/sandbox_filter_spec.rb:64 (FAILED - 729) -sh: 1: psql: not found - example at ./spec/models/trade/sandbox_filter_spec.rb:65 (FAILED - 730) - -Trade::Sandbox - destroy - example at ./spec/models/trade/sandbox_spec.rb:47 (FAILED - 731) - -Trade::SandboxTemplate - update - example at ./spec/models/trade/sandbox_template_spec.rb:56 (FAILED - 732) - update_batch - example at ./spec/models/trade/sandbox_template_spec.rb:78 (FAILED - 733) - -Trade::InclusionValidationRule - validation_errors - when W source and country of origin matches distribution -Procedure: taxonomy - example at ./spec/models/trade/scoped_inclusion_validation_rule_spec.rb:21 (FAILED - 734) - when W source and country of origin blank - example at ./spec/models/trade/scoped_inclusion_validation_rule_spec.rb:48 (FAILED - 735) - -Trade::Shipment - create - when reporter_type not given - should have 2 error on :reporter_type - when appendix valid - should be valid - when appendix not valid - should have 1 error on :appendix - when permit numbers given - when export permit - should == "A" - when import permit - should == "B" - when origin permit - should == "C" - secondary validations - when species name + appendix + year - invalid -Procedure: taxonomy - example at ./spec/models/trade/shipment_spec.rb:123 (FAILED - 736) - invalid -Procedure: taxonomy - example at ./spec/models/trade/shipment_spec.rb:132 (FAILED - 737) - valid -Procedure: taxonomy - example at ./spec/models/trade/shipment_spec.rb:141 (FAILED - 738) - when species name + appendix N + year - valid -Procedure: taxonomy - example at ./spec/models/trade/shipment_spec.rb:163 (FAILED - 739) - when species name + appendix N + year - not CITES listed and not EU listed -Procedure: taxonomy - example at ./spec/models/trade/shipment_spec.rb:184 (FAILED - 740) - when term + unit - invalid - should not be empty - valid - should be empty - blank unit is valid - should be empty - blank unit is invalid - should not be empty - when term + purpose - invalid - should not be empty - valid - should be empty - when species name + term - invalid - should not be empty - valid - should be empty - when species name + country of origin - invalid - should not be empty - valid - should be empty - blank - should be empty - when species name + exporter - invalid - should not be empty - valid - should be empty - valid with XX - should be empty - when exporter + country of origin - invalid - should not be empty - valid - should be empty - when exporter + importer - invalid - should not be empty - valid - should be empty - when species name + source code - invalid -Procedure: taxonomy - example at ./spec/models/trade/shipment_spec.rb:445 (FAILED - 741) - valid -Procedure: taxonomy - example at ./spec/models/trade/shipment_spec.rb:455 (FAILED - 742) - -Trade::ShipmentsComptabExport - total_cnt - when internal - example at ./spec/models/trade/shipments_comptab_export_spec.rb:12 (FAILED - 743) - when public - example at ./spec/models/trade/shipments_comptab_export_spec.rb:16 (FAILED - 744) - query - when internal - example at ./spec/models/trade/shipments_comptab_export_spec.rb:23 (FAILED - 745) - when public - example at ./spec/models/trade/shipments_comptab_export_spec.rb:27 (FAILED - 746) - -Trade::ShipmentsExport - total_cnt - when internal - should == 4 - when public - should == 4 - query - when internal - example at ./spec/models/trade/shipments_export_spec.rb:23 (FAILED - 747) - when public - example at ./spec/models/trade/shipments_export_spec.rb:27 (FAILED - 748) - -Trade::ShipmentsGrossExportsExport - total_cnt - when internal - example at ./spec/models/trade/shipments_gross_exports_export_spec.rb:12 (FAILED - 749) - when public - example at ./spec/models/trade/shipments_gross_exports_export_spec.rb:16 (FAILED - 750) - query - when internal - example at ./spec/models/trade/shipments_gross_exports_export_spec.rb:23 (FAILED - 751) - when public - example at ./spec/models/trade/shipments_gross_exports_export_spec.rb:27 (FAILED - 752) - when invalid date range - This fails on Travis. It started failing after new version of some packages (like PG) have been installed (PENDING: No reason given) - -Trade::ShipmentsGrossImportsExport - total_cnt - when internal - example at ./spec/models/trade/shipments_gross_imports_export_spec.rb:12 (FAILED - 753) - when public - example at ./spec/models/trade/shipments_gross_imports_export_spec.rb:16 (FAILED - 754) - query - when internal - example at ./spec/models/trade/shipments_gross_imports_export_spec.rb:23 (FAILED - 755) - when public - example at ./spec/models/trade/shipments_gross_imports_export_spec.rb:27 (FAILED - 756) - when invalid date range - This fails on Travis. It started failing after new version of some packages (like PG) have been installed (PENDING: No reason given) - -Trade::ShipmentsNetExportsExport - total_cnt - when internal - example at ./spec/models/trade/shipments_net_exports_export_spec.rb:12 (FAILED - 757) - when public - example at ./spec/models/trade/shipments_net_exports_export_spec.rb:16 (FAILED - 758) - query - when internal - example at ./spec/models/trade/shipments_net_exports_export_spec.rb:23 (FAILED - 759) - when public - example at ./spec/models/trade/shipments_net_exports_export_spec.rb:27 (FAILED - 760) - when invalid date range - This fails on Travis. It started failing after new version of some packages (like PG) have been installed (PENDING: No reason given) - -Trade::ShipmentsNetImportsExport - total_cnt - when internal - example at ./spec/models/trade/shipments_net_imports_export_spec.rb:12 (FAILED - 761) - when public - example at ./spec/models/trade/shipments_net_imports_export_spec.rb:16 (FAILED - 762) - query - when internal - example at ./spec/models/trade/shipments_net_imports_export_spec.rb:23 (FAILED - 763) - when public - example at ./spec/models/trade/shipments_net_imports_export_spec.rb:27 (FAILED - 764) - when invalid date range - This fails on Travis. It started failing after new version of some packages (like PG) have been installed (PENDING: No reason given) - -Trade::TaxonConceptAppendixYearValidationRule - validation_errors_for_aru - when CITES listed - when split listing - example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:77 (FAILED - 765) - when old listing - example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:94 (FAILED - 766) - example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:98 (FAILED - 767) - when appendix N and CITES listed - example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:113 (FAILED - 768) - example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:117 (FAILED - 769) - when reported under a synonym, but otherwise fine - example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:132 (FAILED - 770) - when hybrid - example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:169 (FAILED - 771) - when not CITES listed but EU listed -Procedure: taxonomy - example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:185 (FAILED - 772) - when not CITES listed and not EU listed - example at ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:200 (FAILED - 773) - -Trade::TaxonConceptSourceValidationRule - validation_errors_for_aru - when species name is from Kingdom Animalia, source_code can't be A - example at ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:42 (FAILED - 774) - example at ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:46 (FAILED - 775) - when species name is from Kingdom Plantae, source_code can't be C or R - example at ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:63 (FAILED - 776) - -Trade::ValidationRule - matching_records_for_aru_and_error - example at ./spec/models/trade/validation_rule_spec.rb:56 (FAILED - 777) - refresh_errors_if_needed - when no updates - example at ./spec/models/trade/validation_rule_spec.rb:94 (FAILED - 778) - when updates and error fixed for all records - error record is destroyed (FAILED - 779) - when updates and error fixed for some records - error record is updated to reflect new error_count (FAILED - 780) - Trade::PresenceValidationRule - validation_errors_for_aru - trading_partner should not be blank - example at ./spec/models/trade/validation_rule_spec.rb:136 (FAILED - 781) - Trade::NumericalityValidationRule - validation_errors_for_aru - quantity should be a number - example at ./spec/models/trade/validation_rule_spec.rb:157 (FAILED - 782) - Trade::FormatValidationRule - validation_errors_for_aru - year should be a 4 digit value - example at ./spec/models/trade/validation_rule_spec.rb:174 (FAILED - 783) - -TradeRestriction - export trade restrictions in csv - filter_is_current - should return @quota1 if filter set to current - should return both @quota1 and @quota2 if filter set to "all" - filter_geo_entities - should get all quotas if geo_entities filter not set - should return quota1 and quota3 if geo_entities filter set to @geo_entity1 - should return quota1, quota3, and quota4 if geo_entities filter set to @geo_entity1 and @geo_entity3 - filter_years - should get all quotas if years filter not set - should return quota1 and quota3 if years filter set to 2012 - should return quota1, quota3, and quota4 if years filter set to 2012 and 2013 - -Unit - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - when quotas - should be falsey - when shipments - should be falsey - -User - create - when organisation not given - should not be valid - destroy - when no dependent objects attached - should be truthy - when dependent objects attached - should be falsey - abilities - when is a Data Manager - should be able to :manage and :all - when is a Data Contributor - should be able to :create and TaxonConcept(id: integer, taxonomy_id: integer, parent_id: integer, rank_id: integer, taxon_name_id: integer, author_year: string, legacy_id: integer, legacy_type: string, data: hstore, listing: hstore, notes: text, taxonomic_position: string, full_name: string, name_status: string, created_at: datetime, updated_at: datetime, touched_at: datetime, legacy_trade_code: string, updated_by_id: integer, created_by_id: integer, dependents_updated_at: datetime, nomenclature_note_en: text, nomenclature_note_es: text, nomenclature_note_fr: text, dependents_updated_by_id: integer, kew_id: integer) - should not be able to :destroy and TaxonConcept(id: integer, taxonomy_id: integer, parent_id: integer, rank_id: integer, taxon_name_id: integer, author_year: string, legacy_id: integer, legacy_type: string, data: hstore, listing: hstore, notes: text, taxonomic_position: string, full_name: string, name_status: string, created_at: datetime, updated_at: datetime, touched_at: datetime, legacy_trade_code: string, updated_by_id: integer, created_by_id: integer, dependents_updated_at: datetime, nomenclature_note_en: text, nomenclature_note_es: text, nomenclature_note_fr: text, dependents_updated_by_id: integer, kew_id: integer) - when is a E-library Viewer - should not be able to :manage and TaxonConcept(id: integer, taxonomy_id: integer, parent_id: integer, rank_id: integer, taxon_name_id: integer, author_year: string, legacy_id: integer, legacy_type: string, data: hstore, listing: hstore, notes: text, taxonomic_position: string, full_name: string, name_status: string, created_at: datetime, updated_at: datetime, touched_at: datetime, legacy_trade_code: string, updated_by_id: integer, created_by_id: integer, dependents_updated_at: datetime, nomenclature_note_en: text, nomenclature_note_es: text, nomenclature_note_fr: text, dependents_updated_by_id: integer, kew_id: integer) - when is an API User - should not be able to :manage and TaxonConcept(id: integer, taxonomy_id: integer, parent_id: integer, rank_id: integer, taxon_name_id: integer, author_year: string, legacy_id: integer, legacy_type: string, data: hstore, listing: hstore, notes: text, taxonomic_position: string, full_name: string, name_status: string, created_at: datetime, updated_at: datetime, touched_at: datetime, legacy_trade_code: string, updated_by_id: integer, created_by_id: integer, dependents_updated_at: datetime, nomenclature_note_en: text, nomenclature_note_es: text, nomenclature_note_fr: text, dependents_updated_by_id: integer, kew_id: integer) - when is a Secretariat - should not be able to :create and :all - should not be able to :update and :all - should not be able to :destroy and :all - when is not active - should not be able to :create and :all - should not be able to :update and :all - should not be able to :destroy and :all - -Species::ShowTaxonConceptSerializer - when species is output of recent nomenclature changes (PENDING: No reason given) - when new species is output of recent nomenclature changes (PENDING: No reason given) - when species is output of old nomenclature changes - should eq false - when species is not output of nomenclature changes - should eq false - when nomenclature changes is not yet submitted - should eq false - -EuRegulationActivationWorker - Set new EU regulation to true - example at ./spec/workers/eu_regulation_activation_worker_spec.rb:32 (FAILED - 784) - example at ./spec/workers/eu_regulation_activation_worker_spec.rb:33 (FAILED - 785) - Set old EU regulation to false - example at ./spec/workers/eu_regulation_activation_worker_spec.rb:40 (FAILED - 786) - example at ./spec/workers/eu_regulation_activation_worker_spec.rb:41 (FAILED - 787) - -EventListingChangesCopyWorker - when copy into non-current regulation - example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:42 (FAILED - 788) - example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:43 (FAILED - 789) - when copy into current regulation - example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:48 (FAILED - 790) - example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:49 (FAILED - 791) - when exclusion - example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:70 (FAILED - 792) - example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:71 (FAILED - 793) - example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:72 (FAILED - 794) - example at ./spec/workers/event_listing_changes_copy_worker_spec.rb:73 (FAILED - 795) - -QuotasCopyWorker - Copy single quota, for a given year - example at ./spec/workers/quotas_copy_worker_spec.rb:47 (FAILED - 796) - example at ./spec/workers/quotas_copy_worker_spec.rb:48 (FAILED - 797) - example at ./spec/workers/quotas_copy_worker_spec.rb:49 (FAILED - 798) - example at ./spec/workers/quotas_copy_worker_spec.rb:50 (FAILED - 799) - Try to copy quota from wrong year - example at ./spec/workers/quotas_copy_worker_spec.rb:59 (FAILED - 800) - example at ./spec/workers/quotas_copy_worker_spec.rb:60 (FAILED - 801) - example at ./spec/workers/quotas_copy_worker_spec.rb:61 (FAILED - 802) - Copy quota when there are no current quotas - example at ./spec/workers/quotas_copy_worker_spec.rb:70 (FAILED - 803) - example at ./spec/workers/quotas_copy_worker_spec.rb:71 (FAILED - 804) - example at ./spec/workers/quotas_copy_worker_spec.rb:72 (FAILED - 805) - When multiple quotas copy quota for given country - example at ./spec/workers/quotas_copy_worker_spec.rb:90 (FAILED - 806) - example at ./spec/workers/quotas_copy_worker_spec.rb:91 (FAILED - 807) - example at ./spec/workers/quotas_copy_worker_spec.rb:92 (FAILED - 808) - example at ./spec/workers/quotas_copy_worker_spec.rb:93 (FAILED - 809) - example at ./spec/workers/quotas_copy_worker_spec.rb:94 (FAILED - 810) - When multiple quotas copy quota for both countries - example at ./spec/workers/quotas_copy_worker_spec.rb:112 (FAILED - 811) - example at ./spec/workers/quotas_copy_worker_spec.rb:113 (FAILED - 812) - example at ./spec/workers/quotas_copy_worker_spec.rb:114 (FAILED - 813) - example at ./spec/workers/quotas_copy_worker_spec.rb:115 (FAILED - 814) - example at ./spec/workers/quotas_copy_worker_spec.rb:116 (FAILED - 815) - When multiple quotas don't copy quota for given country - example at ./spec/workers/quotas_copy_worker_spec.rb:134 (FAILED - 816) - example at ./spec/workers/quotas_copy_worker_spec.rb:135 (FAILED - 817) - example at ./spec/workers/quotas_copy_worker_spec.rb:136 (FAILED - 818) - example at ./spec/workers/quotas_copy_worker_spec.rb:137 (FAILED - 819) - example at ./spec/workers/quotas_copy_worker_spec.rb:138 (FAILED - 820) - When multiple quotas copy quota for given taxon_concept - example at ./spec/workers/quotas_copy_worker_spec.rb:155 (FAILED - 821) - example at ./spec/workers/quotas_copy_worker_spec.rb:156 (FAILED - 822) - example at ./spec/workers/quotas_copy_worker_spec.rb:157 (FAILED - 823) - example at ./spec/workers/quotas_copy_worker_spec.rb:158 (FAILED - 824) - example at ./spec/workers/quotas_copy_worker_spec.rb:159 (FAILED - 825) - When multiple quotas copy quota for both taxon_concepts - example at ./spec/workers/quotas_copy_worker_spec.rb:177 (FAILED - 826) - example at ./spec/workers/quotas_copy_worker_spec.rb:178 (FAILED - 827) - example at ./spec/workers/quotas_copy_worker_spec.rb:179 (FAILED - 828) - example at ./spec/workers/quotas_copy_worker_spec.rb:180 (FAILED - 829) - example at ./spec/workers/quotas_copy_worker_spec.rb:181 (FAILED - 830) - When multiple quotas don't copy quota for given taxon_concept - example at ./spec/workers/quotas_copy_worker_spec.rb:198 (FAILED - 831) - example at ./spec/workers/quotas_copy_worker_spec.rb:199 (FAILED - 832) - example at ./spec/workers/quotas_copy_worker_spec.rb:200 (FAILED - 833) - example at ./spec/workers/quotas_copy_worker_spec.rb:201 (FAILED - 834) - example at ./spec/workers/quotas_copy_worker_spec.rb:202 (FAILED - 835) - When text to replace passed, should be replaced - example at ./spec/workers/quotas_copy_worker_spec.rb:222 (FAILED - 836) - example at ./spec/workers/quotas_copy_worker_spec.rb:223 (FAILED - 837) - example at ./spec/workers/quotas_copy_worker_spec.rb:224 (FAILED - 838) - example at ./spec/workers/quotas_copy_worker_spec.rb:225 (FAILED - 839) - example at ./spec/workers/quotas_copy_worker_spec.rb:226 (FAILED - 840) - example at ./spec/workers/quotas_copy_worker_spec.rb:227 (FAILED - 841) - example at ./spec/workers/quotas_copy_worker_spec.rb:228 (FAILED - 842) - example at ./spec/workers/quotas_copy_worker_spec.rb:229 (FAILED - 843) - When url passed, should be replaced - example at ./spec/workers/quotas_copy_worker_spec.rb:245 (FAILED - 844) - example at ./spec/workers/quotas_copy_worker_spec.rb:246 (FAILED - 845) - example at ./spec/workers/quotas_copy_worker_spec.rb:247 (FAILED - 846) - example at ./spec/workers/quotas_copy_worker_spec.rb:248 (FAILED - 847) - example at ./spec/workers/quotas_copy_worker_spec.rb:249 (FAILED - 848) - example at ./spec/workers/quotas_copy_worker_spec.rb:250 (FAILED - 849) - -SubmissionWorker - when no primary errors (PENDING: No reason given) - when primary errors present (PENDING: No reason given) - when reported under a synonym (PENDING: No reason given) - -Pending: - Admin::NomenclatureChanges::LumpController PUT update when last step when user is manager redirects to nomenclature changes path - # Strange render mismatch after upgrading to Rails 4 - # ./spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb:113 - Admin::NomenclatureChanges::SplitController PUT update when last step when user is manager redirects to nomenclature changes path - # Strange render mismatch after upgrading to Rails 4 - # ./spec/controllers/admin/nomenclature_changes/split_controller_spec.rb:166 - Admin::NomenclatureChanges::StatusSwapController PUT update when last step when user is manager redirects to nomenclature changes path - # Strange render mismatch after upgrading to Rails 4 - # ./spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb:107 - Admin::NomenclatureChanges::StatusToAcceptedController PUT update when last step when user is manager redirects to nomenclature changes path - # Strange render mismatch after upgrading to Rails 4 - # ./spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb:80 - Admin::NomenclatureChanges::StatusToSynonymController PUT update when last step when user is manager redirects to nomenclature changes path - # Strange render mismatch after upgrading to Rails 4 - # ./spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb:85 - CitesCaptivityProcess add some examples to (or delete) /SAPI/spec/models/cites_captivity_process_spec.rb - # Not yet implemented - # ./spec/models/cites_captivity_process_spec.rb:4 - CmsMapping add some examples to (or delete) /SAPI/spec/models/cms_mapping_spec.rb - # Not yet implemented - # ./spec/models/cms_mapping_spec.rb:19 - NomenclatureChange::ReassignmentTransferProcessor run input reassignments when document citations should be empty - # No reason given - # ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:40 - Quota validations create doesn't save a quota without a unit - # No reason given - # ./spec/models/quota_spec.rb:128 - Species::DocumentsExport export when results when file not cached it should be generated - # No reason given - # ./spec/models/species/documents_export_spec.rb:41 - Species::DocumentsExport export when results when file cached it should not be generated - # No reason given - # ./spec/models/species/documents_export_spec.rb:46 - Trade::ShipmentsGrossExportsExport query when invalid date range This fails on Travis. It started failing after new version of some packages (like PG) have been installed - # No reason given - # ./spec/models/trade/shipments_gross_exports_export_spec.rb:34 - Trade::ShipmentsGrossImportsExport query when invalid date range This fails on Travis. It started failing after new version of some packages (like PG) have been installed - # No reason given - # ./spec/models/trade/shipments_gross_imports_export_spec.rb:34 - Trade::ShipmentsNetExportsExport query when invalid date range This fails on Travis. It started failing after new version of some packages (like PG) have been installed - # No reason given - # ./spec/models/trade/shipments_net_exports_export_spec.rb:34 - Trade::ShipmentsNetImportsExport query when invalid date range This fails on Travis. It started failing after new version of some packages (like PG) have been installed - # No reason given - # ./spec/models/trade/shipments_net_imports_export_spec.rb:34 - Species::ShowTaxonConceptSerializer when species is output of recent nomenclature changes - # No reason given - # ./spec/serializers/show_taxon_concept_serializer_spec.rb:5 - Species::ShowTaxonConceptSerializer when new species is output of recent nomenclature changes - # No reason given - # ./spec/serializers/show_taxon_concept_serializer_spec.rb:23 - SubmissionWorker when no primary errors - # No reason given - # ./spec/workers/submission_worker_spec.rb:31 - SubmissionWorker when primary errors present - # No reason given - # ./spec/workers/submission_worker_spec.rb:66 - SubmissionWorker when reported under a synonym - # No reason given - # ./spec/workers/submission_worker_spec.rb:84 - -Failures: - - 1) Admin::DocumentsController index GET index search runs a full text search on title - Failure/Error: get :index, 'title_query' => 'good' - ActiveRecord::StatementInvalid: - PG::SyntaxError: ERROR: syntax error at or near "AS" - LINE 1: ...simple', ''' ' || 'good' || ' ''' || ':*')), 0))) AS pg_sear... - ^ - : SELECT COUNT("documents".*, ((ts_rank((to_tsvector('simple', coalesce("documents"."title"::text, ''))), (to_tsquery('simple', ''' ' || 'good' || ' ''' || ':*')), 0))) AS pg_search_rank) FROM api_documents_mview documents WHERE (((to_tsvector('simple', coalesce("documents"."title"::text, ''))) @@ (to_tsquery('simple', ''' ' || 'good' || ' ''' || ':*')))) - # ./app/models/document_search.rb:23:in `total_cnt' - # ./lib/modules/search_cache.rb:21:in `block in cached_total_cnt' - # ./lib/modules/search_cache.rb:20:in `cached_total_cnt' - # ./app/controllers/admin/documents_controller.rb:94:in `collection' - # ./app/controllers/admin/documents_controller.rb:9:in `index' - # ./spec/controllers/admin/documents_controller_spec.rb:36:in `block (5 levels) in ' - - 2) Admin::EventDocumentsController ordering POST update_order updates sort index for collection of documents - Failure/Error: post :update_order, event_id: event.id, documents: { - ArgumentError: - wrong number of arguments (given 2, expected 1) - # ./app/models/document_collection_order.rb:26:in `block in update' - # ./app/models/document_collection_order.rb:25:in `each' - # ./app/models/document_collection_order.rb:25:in `update' - # ./app/controllers/admin/event_documents_controller.rb:12:in `update_order' - # ./spec/controllers/admin/event_documents_controller_spec.rb:23:in `block (4 levels) in ' - - 3) Admin::ExportsController GET download with data_type=Names all returns taxon concepts names file - Failure/Error: get :download, :data_type => "Names" - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_names/628a53e0384bdafba27f4f32cecf7d3f6be3e602en.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./app/controllers/admin/exports_controller.rb:17:in `download' - # ./spec/controllers/admin/exports_controller_spec.rb:21:in `block (4 levels) in ' - - 4) Admin::ExportsController GET download with data_type=Names CITES_EU returns CITES_EU taxon concepts names file - Failure/Error: get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_names/012908cbadb931457374ec2327abac765060dc37en.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./app/controllers/admin/exports_controller.rb:17:in `download' - # ./spec/controllers/admin/exports_controller_spec.rb:34:in `block (4 levels) in ' - - 5) Admin::ExportsController GET download with data_type=Names CMS returns CMS taxon concepts names file - Failure/Error: get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_names/c5b9b58f693bbe5fb8f2ef0aa5a22805bc53bdc0en.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./app/controllers/admin/exports_controller.rb:17:in `download' - # ./spec/controllers/admin/exports_controller_spec.rb:47:in `block (4 levels) in ' - - 6) Admin::ExportsController GET download with data_type=Distributions all returns taxon concepts distributions file - Failure/Error: get :download, :data_type => "Distributions" - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_distributions/628a53e0384bdafba27f4f32cecf7d3f6be3e602en.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./app/controllers/admin/exports_controller.rb:29:in `download' - # ./spec/controllers/admin/exports_controller_spec.rb:66:in `block (4 levels) in ' - - 7) Admin::ExportsController GET download with data_type=Distributions CITES_EU returns CITES_EU taxon concepts distributions file - Failure/Error: get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_distributions/012908cbadb931457374ec2327abac765060dc37en.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./app/controllers/admin/exports_controller.rb:29:in `download' - # ./spec/controllers/admin/exports_controller_spec.rb:80:in `block (4 levels) in ' - - 8) Admin::ExportsController GET download with data_type=Distributions CMS returns CMS taxon concepts distributions file - Failure/Error: get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - public/downloads/taxon_concepts_distributions/c5b9b58f693bbe5fb8f2ef0aa5a22805bc53bdc0en.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./app/controllers/admin/exports_controller.rb:29:in `download' - # ./spec/controllers/admin/exports_controller_spec.rb:94:in `block (4 levels) in ' - - 9) Api::V1::AutoCompleteTaxonConceptsController GET index returns 1 result when searching for species name and filtering for rank SPECIES - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 10) Api::V1::AutoCompleteTaxonConceptsController GET index returns 3 results when searching for species name and not filtering by rank - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 11) Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns Poland when searching by wolf - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 12) Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns 0 geo entities when no match for taxon name - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 13) Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns all geo entities when no taxon name given - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 14) Api::V1::EventsController GET index returns only E-library events most recent first - Failure/Error: get :index - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function count(integer, character varying, character varying, timestamp without time zone) does not exist - LINE 1: SELECT COUNT(id, name, type, published_at) FROM "events" WH... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT COUNT(id, name, type, published_at) FROM "events" WHERE "events"."type" IN ('CitesCop', 'CitesAc', 'CitesPc', 'EcSrg', 'CitesTc', 'CitesExtraordinaryMeeting') - # ./app/controllers/api/v1/events_controller.rb:10:in `index' - # ./spec/controllers/api/events_controller_spec.rb:11:in `block (3 levels) in ' - - 15) Api::V1::PurposesController GET index returns purposes - Failure/Error: get :index - ArgumentError: - wrong number of arguments (given 1, expected 0) - # ./app/controllers/api/v1/purposes_controller.rb:6:in `index' - # ./spec/controllers/api/purposes_controller_spec.rb:9:in `block (3 levels) in ' - - 16) Api::V1::SourcesController GET index returns sources - Failure/Error: get :index - ArgumentError: - wrong number of arguments (given 1, expected 0) - # ./app/controllers/api/v1/sources_controller.rb:6:in `index' - # ./spec/controllers/api/sources_controller_spec.rb:9:in `block (3 levels) in ' - - 17) Api::V1::TaxonConceptsController GET index logs with Ahoy with different parameters - Failure/Error: get :index, { - ActiveRecord::StatementInvalid: - PG::UndefinedColumn: ERROR: column taxon_concepts_mview.show_in_species_plus does not exist - LINE 3: ..._concepts_mview"."taxonomy_is_cites_eu" = 't' AND "taxon_con... - ^ - : SELECT taxon_concepts_mview.*, matching_names.matched_names_ary AS synonyms_ary FROM "taxon_concepts_mview" LEFT JOIN ( - SELECT id, ARRAY_AGG_NOTNULL(matched_name) AS matched_names_ary FROM "auto_complete_taxon_concepts_mview" WHERE (name_for_matching LIKE 'STORK%' AND type_of_match IN ('SELF','SYNONYM','COMMON_NAME','SUBSPECIES')) GROUP BY "auto_complete_taxon_concepts_mview"."id" - ) matching_names ON matching_names.id = taxon_concepts_mview.id WHERE "taxon_concepts_mview"."taxonomy_is_cites_eu" = 't' AND "taxon_concepts_mview"."show_in_species_plus" = 't' AND ( EXISTS ( - SELECT * FROM UNNEST(ARRAY[kingdom_name, phylum_name, class_name, order_name, family_name, subfamily_name]) name - WHERE UPPER(name) LIKE 'STORK%' - ) OR matching_names.id IS NOT NULL - ) ORDER BY taxonomic_position LIMIT 25 OFFSET 0 - # ./app/models/species/search.rb:17:in `results' - # ./lib/modules/search_cache.rb:15:in `block in cached_results' - # ./lib/modules/search_cache.rb:14:in `cached_results' - # ./app/controllers/api/v1/taxon_concepts_controller.rb:10:in `index' - # ./spec/controllers/api/taxon_concepts_controller_spec.rb:7:in `block (4 levels) in ' - # ./spec/controllers/api/taxon_concepts_controller_spec.rb:6:in `block (3 levels) in ' - - 18) Api::V1::TermsController GET index returns terms - Failure/Error: get :index - ArgumentError: - wrong number of arguments (given 1, expected 0) - # ./app/controllers/api/v1/terms_controller.rb:6:in `index' - # ./spec/controllers/api/terms_controller_spec.rb:9:in `block (3 levels) in ' - - 19) Api::V1::UnitsController GET index returns units - Failure/Error: get :index - ArgumentError: - wrong number of arguments (given 1, expected 0) - # ./app/controllers/api/v1/units_controller.rb:6:in `index' - # ./spec/controllers/api/units_controller_spec.rb:9:in `block (3 levels) in ' - - 20) Checklist::TaxonConceptsController XHR GET JSON autocomplete when searching by accepted name returns 1 result - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 21) Checklist::TaxonConceptsController XHR GET JSON autocomplete when query blank returns 0 results - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 22) CitesTrade::ExportsController GET download comptab returns comptab shipments file - Failure/Error: response.content_type.should eq("text/csv") - - expected: "text/csv" - got: "text/html" - - (compared using ==) - # ./spec/controllers/cites_trade/exports_controller_spec.rb:20:in `block (4 levels) in ' - - 23) CitesTrade::ExportsController GET download comptab logs download information from public interface to the TradeDataDownload model - Failure/Error: lambda do - expected #count to have changed by 1, but was changed by 0 - # ./spec/controllers/cites_trade/exports_controller_spec.rb:28:in `block (4 levels) in ' - - 24) CitesTrade::ShipmentsController GET index should return all comptab shipments - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' - - 25) CitesTrade::ShipmentsController GET index should return all gross_exports shipments - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' - - 26) CitesTrade::ShipmentsController GET index should return genus & species shipments when searching by genus - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' - - 27) CitesTrade::ShipmentsController GET index should return family, genus & species shipments when searching by family - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' - - 28) CitesTrade::ShipmentsController GET index should return genus shipments when searching by taxon - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' - - 29) CitesTrade::ShipmentsController GET index serializer should return comptab export when report_type invalid - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' - - 30) CitesTrade::ShipmentsController GET index serializer should return comptab export when report_type = comptab - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' - - 31) CitesTrade::ShipmentsController GET index serializer should return gross net export when report_type = gross_exports - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/cites_trade/shipments_controller_spec.rb:7:in `block (3 levels) in ' - - 32) RegistrationsController when signing up should create an account with the role set to api - Failure/Error: post :create, :user => { - ArgumentError: - wrong number of arguments (given 0, expected 1..2) - # ./spec/spec_helper.rb:106:in `sign_up' - # ./spec/controllers/registrations_controller_spec.rb:51:in `block (4 levels) in ' - # ./spec/controllers/registrations_controller_spec.rb:50:in `block (3 levels) in ' - - 33) Trade::AnnualReportUploadsController GET index should return all annual report uploads - Failure/Error: @aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_23', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_23', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:30:in `block (3 levels) in ' - - 34) Trade::AnnualReportUploadsController GET index should return annual report uploads in progress - Failure/Error: @aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_24', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_24', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:30:in `block (3 levels) in ' - - 35) Trade::AnnualReportUploadsController GET show should return success - Failure/Error: create( - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_25', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_25', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:19:in `block (2 levels) in ' - # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:47:in `block (3 levels) in ' - - 36) Trade::AnnualReportUploadsController POST create should return success in jQuery File Upload way - Failure/Error: xhr :post, :create, - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_26', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_26', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./app/controllers/trade/annual_report_uploads_controller.rb:26:in `create' - # ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:54:in `block (3 levels) in ' - - 37) Trade::SandboxShipmentsController PUT update should return success when taxon_name not set - Failure/Error: aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_27', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_27', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' - - 38) Trade::SandboxShipmentsController PUT update should return success when taxon_name does not exist - Failure/Error: aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_28', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_28', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' - - 39) Trade::SandboxShipmentsController DELETE destroy should return success - Failure/Error: aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_29', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_29', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' - - 40) Trade::SandboxShipmentsController POST update_batch should return success - Failure/Error: aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_30', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_30', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' - - 41) Trade::SandboxShipmentsController POST destroy_batch should return success - Failure/Error: aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_31', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_31', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:8:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:12:in `block (2 levels) in ' - # ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:22:in `block (2 levels) in ' - - 42) Trade::ShipmentsController GET index should return all shipments - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:9:in `block (3 levels) in ' - - 43) Trade::ShipmentsController GET index should return genus & species shipments when searching by genus - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:9:in `block (3 levels) in ' - - 44) Trade::ShipmentsController GET index should return 1 shipment when searching for reporter_type I - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:9:in `block (3 levels) in ' - - 45) Trade::ShipmentsController PUT update should auto resolve accepted taxon when blank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:27:in `block (3 levels) in ' - - 46) Trade::ShipmentsController PUT update should not auto resolve accepted taxon when given - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:27:in `block (3 levels) in ' - - 47) Trade::ShipmentsController PUT update should delete orphaned permits - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:27:in `block (3 levels) in ' - - 48) Trade::ShipmentsController POST update_batch should change reporter type from I to E - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' - - 49) Trade::ShipmentsController POST update_batch should change reporter type from E to I - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' - - 50) Trade::ShipmentsController POST update_batch should update year - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' - - 51) Trade::ShipmentsController POST update_batch should auto resolve accepted taxon when blank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' - - 52) Trade::ShipmentsController POST update_batch should not auto resolve accepted taxon when given - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' - - 53) Trade::ShipmentsController POST update_batch should set permit number to blank and delete orphaned permits - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:53:in `block (3 levels) in ' - - 54) Trade::ShipmentsController POST destroy_batch should delete 1 shipment - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 55) Trade::ShipmentsController POST destroy_batch should delete 5 shipment - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 56) Trade::ShipmentsController POST destroy_batch should delete 2 shipments - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 57) Trade::ShipmentsController POST destroy_batch should delete 1 shipments - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 58) Trade::ShipmentsController POST destroy_batch should delete all shipments - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 59) Trade::ShipmentsController POST destroy_batch shouldn't delete any shipments - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 60) Trade::ShipmentsController POST destroy_batch should delete 1 shipment - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 61) Trade::ShipmentsController POST destroy_batch should delete 3 shipment - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 62) Trade::ShipmentsController POST destroy_batch should delete 0 shipments - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 63) Trade::ShipmentsController POST destroy_batch should delete 4 shipments - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 64) Trade::ShipmentsController POST destroy_batch should delete orphaned permits - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:160:in `block (3 levels) in ' - - 65) Trade::ShipmentsController DELETE destroy should delete 1 shipment - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:240:in `block (3 levels) in ' - - 66) Trade::ShipmentsController DELETE destroy should delete orphaned permits - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/controllers/trade/shipments_controller_spec.rb:240:in `block (3 levels) in ' - - 67) Trade::ValidationErrorsController PUT update should update is_ignored - Failure/Error: aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_32', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_32', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/validation_errors_controller_spec.rb:8:in `block (2 levels) in ' - # ./spec/controllers/trade/validation_errors_controller_spec.rb:12:in `block (2 levels) in ' - # ./spec/controllers/trade/validation_errors_controller_spec.rb:15:in `block (2 levels) in ' - - 68) Trade::ValidationErrorsController GET show should return success - Failure/Error: aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_33', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_33', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/controllers/trade/validation_errors_controller_spec.rb:8:in `block (2 levels) in ' - # ./spec/controllers/trade/validation_errors_controller_spec.rb:12:in `block (2 levels) in ' - # ./spec/controllers/trade/validation_errors_controller_spec.rb:15:in `block (2 levels) in ' - - 69) ApiRequest recent_requests - Failure/Error: ApiRequest.recent_requests - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function count(integer, timestamp without time zone) does not exist - LINE 1: SELECT COUNT(response_status, created_at) AS count_response_... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT COUNT(response_status, created_at) AS count_response_status_created_at, response_status AS response_status, (DATE_TRUNC('day', (created_at::timestamptz - INTERVAL '0 hour') AT TIME ZONE 'Etc/UTC') + INTERVAL '0 hour') AT TIME ZONE 'Etc/UTC' AS day FROM "api_requests" WHERE (created_at > '2023-07-04 16:44:03.572201') AND (created_at IS NOT NULL) GROUP BY "api_requests"."response_status", (DATE_TRUNC('day', (created_at::timestamptz - INTERVAL '0 hour') AT TIME ZONE 'Etc/UTC') + INTERVAL '0 hour') AT TIME ZONE 'Etc/UTC' ORDER BY "api_requests"."response_status" ASC - # ./app/models/api_request.rb:50:in `recent_requests' - # ./spec/models/api_request_spec.rb:61:in `block (3 levels) in ' - # ./spec/models/api_request_spec.rb:64:in `block (3 levels) in ' - - 70) Checklist ann_symbol for species Caiman latirostris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 71) Checklist ann_symbol for species Panax ginseng - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 72) Checklist search by cites populations when America - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' - - 73) Checklist search by cites populations when Mexico - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' - - 74) Checklist search by cites populations when Canada - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' - - 75) Checklist search by cites populations when Argentina - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' - - 76) Checklist search by cites populations when South America - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' - - 77) Checklist search by cites populations when North America - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' - - 78) Checklist search by cites populations when North America and Argentina - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' - - 79) Checklist search by cites populations when Nepal - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 80) Checklist search by cites populations when Poland - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 81) Checklist search by cites appendices when App I - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 82) Checklist search by cites appendices when App II - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 83) Checklist search by cites appendices when App III - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 84) Checklist search by cites populations and appendices when Nepal when App I - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 85) Checklist search by cites populations and appendices when Nepal when App II - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 86) Checklist search by cites populations and appendices when Poland when App I - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 87) Checklist search by cites populations and appendices when Poland when App II - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 88) Checklist search by cites populations and appendices when Poland or Nepal when App I - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 89) Checklist search by cites populations and appendices when Poland or Nepal when App II - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 90) Checklist search by cites populations and appendices when App I or II when Poland - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 91) Checklist search by cites populations and appendices when App I or II when Nepal - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 92) Checklist when filtering by appendix I should return Cacatua goffiniana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 93) Checklist when filtering by appendix I should not return Agapornis roseicollis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 94) Checklist when common names displayed should return all English names for Arctocephalus australis: 'South American Fur Seal, Southern Fur Seal' - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 95) Checklist when common names displayed should return all Spanish names for Arctocephalus australis: 'Lobo fino sudamericano, Oso marino austral' - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 96) Checklist when common names displayed should return all French names for Arctocephalus australis: 'Otarie à fourrure australe' - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 97) Checklist when common names displayed should return all English names for Arctocephalus spp.: 'Fur seals, Southern fur seals' - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 98) Checklist when common names displayed should return all Spanish names for Arctocephalus spp.: 'Osos marinos' - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 99) Checklist when common names displayed should return all French names for Arctocephalus spp.: 'Arctocéphales du sud, Otaries à fourrure, Otaries à fourrure du sud' - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 100) Checklist when common names displayed should include a species without any common names defined - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 101) Checklist::HigherTaxaInjector run when same phylum when two species from different classes - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 102) Checklist::HigherTaxaInjector run when same phylum when two species from different classes and expand_headers set - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 103) Checklist::HigherTaxaInjector run when same order when two species from different families - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 104) Checklist::HigherTaxaInjector run when same order when two species from different families and skip family set - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 105) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 106) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species and skip family set - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 107) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species and expand headers set - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 108) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when two species - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 109) Checklist::HigherTaxaInjector higher_taxa_headers when same genus when species and subspecies - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 110) Checklist::HigherTaxaInjector higher_taxa_headers when same family when two species from different genera - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 111) Checklist::HigherTaxaInjector higher_taxa_headers when same order when two species from different families - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 112) Checklist::HigherTaxaInjector higher_taxa_headers when same order when two species from different families and expand headers set - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 113) Checklist::HigherTaxaInjector higher_taxa_headers when same order when genus and different family - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 114) Checklist::HigherTaxaInjector higher_taxa_headers when same order when family and genus in different family - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 115) Checklist::HigherTaxaInjector higher_taxa_headers when same class when order and genus from different order - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 116) Checklist::HigherTaxaInjector higher_taxa_headers when same class when order and genus from different order and expand headers set - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/higher_taxa_injector_spec.rb:96:in `block (2 levels) in ' - - 117) Checklist when taxonomic order Plantae should include Agave (Agavaceae) before Panax (Araliaceae) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 118) Checklist when taxonomic order Animalia should include birds after last mammal - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 119) Checklist when taxonomic order Animalia should include Falconiformes (Aves) before Psittaciformes (Aves) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 120) Checklist when taxonomic order Animalia should include Cathartidae within Falconiformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 121) Checklist when taxonomic order Animalia should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 122) Checklist when taxonomic order Animalia should include Cathartidae (Falconiformes) before Cacatuidae (Psittaciformes) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 123) Checklist when taxonomic order Animalia should include Hirudo medicinalis at the very end (after all Chordata) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 124) Checklist when alphabetical order should include Falconiformes (Aves) before Psittaciformes (Aves) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 125) Checklist when alphabetical order should include Cathartidae before Falconiformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 126) Checklist when alphabetical order should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 127) Checklist when alphabetical order should include Cathartidae (Falconiformes) after Cacatuidae (Psittaciformes) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 128) Checklist::Pdf::HistoryAnnotationsKey hash_annotations_key - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/pdf/history_annotations_key_spec.rb:56:in `block (3 levels) in ' - - 129) Checklist::Pdf::History higher_taxon_name when family - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/pdf/history_spec.rb:11:in `block (2 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:24:in `block (4 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:28:in `block (4 levels) in ' - - 130) Checklist::Pdf::History listed_taxon_name when family - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/pdf/history_spec.rb:11:in `block (2 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:46:in `block (4 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:49:in `block (4 levels) in ' - - 131) Checklist::Pdf::History listed_taxon_name when genus - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/pdf/history_spec.rb:11:in `block (2 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:16:in `block (2 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:61:in `block (4 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:64:in `block (4 levels) in ' - - 132) Checklist::Pdf::History annotation_for_language annotation with footnote - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/pdf/history_spec.rb:11:in `block (2 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:16:in `block (2 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:87:in `block (4 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:90:in `block (4 levels) in ' - # ./spec/models/checklist/pdf/history_spec.rb:100:in `block (4 levels) in ' - - 133) Checklist::Pdf::IndexAnnotationsKey hash_annotations_key - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/pdf/index_annotations_key_spec.rb:43:in `block (3 levels) in ' - - 134) Checklist::Pdf::IndexAnnotationsKey non_hash_annotations_key - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/pdf/index_annotations_key_spec.rb:99:in `block (3 levels) in ' - - 135) Checklist::Pdf::IndexFetcher with common names - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/pdf/index_fetcher_spec.rb:34:in `block (2 levels) in ' - - 136) Checklist::Pdf::IndexFetcher with synonyms and authors - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/pdf/index_fetcher_spec.rb:34:in `block (2 levels) in ' - - 137) Checklist when filtering by name by scientific name - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 138) Checklist when filtering by name by common name - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 139) Checklist when synonyms displayed should return Alligator cynocephalus as synonym for Caiman latirostris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 140) Species::TaxonConceptPrefixMatcher results when query in capital letters - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 141) Species::TaxonConceptPrefixMatcher results when match on accepted name - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 142) Species::TaxonConceptPrefixMatcher results when match on synonym - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 143) Species::TaxonConceptPrefixMatcher results when match on common name - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 144) Checklist::Timeline when deleted - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:17:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:20:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:21:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:23:in `block (3 levels) in ' - - 145) Checklist::Timeline when deleted - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:17:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:20:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:21:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:24:in `block (3 levels) in ' - - 146) Checklist::Timeline when deleted - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:17:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:20:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:21:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:25:in `block (3 levels) in ' - - 147) Checklist::Timeline when deleted from III multiple times - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:77:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:80:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:81:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:83:in `block (3 levels) in ' - - 148) Checklist::Timeline when deleted from III multiple times - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:77:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:80:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:81:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:84:in `block (3 levels) in ' - - 149) Checklist::Timeline when deleted from III multiple times - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:77:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:80:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:81:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:85:in `block (3 levels) in ' - - 150) Checklist::Timeline when deleted and then readded - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:106:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:109:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:110:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:112:in `block (3 levels) in ' - - 151) Checklist::Timeline when deleted and then readded - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:106:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:109:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:110:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:113:in `block (3 levels) in ' - - 152) Checklist::Timeline when deleted and then readded - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:106:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:109:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:110:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:114:in `block (3 levels) in ' - - 153) Checklist::Timeline when reservation withdrawn - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:148:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:151:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:152:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:154:in `block (3 levels) in ' - - 154) Checklist::Timeline when reservation withdrawn - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:148:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:151:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:152:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:155:in `block (3 levels) in ' - - 155) Checklist::Timeline when reservation withdrawn - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:148:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:151:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:152:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:156:in `block (3 levels) in ' - - 156) Checklist::Timeline when reservation withdrawn and then readded - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:196:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:199:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:200:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:202:in `block (3 levels) in ' - - 157) Checklist::Timeline when reservation withdrawn and then readded - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:196:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:199:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:200:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:203:in `block (3 levels) in ' - - 158) Checklist::Timeline when reservation withdrawn and then readded - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:196:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:199:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:200:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:204:in `block (3 levels) in ' - - 159) Checklist::Timeline when reservation withdrawn and then readded - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:196:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:199:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:200:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:205:in `block (3 levels) in ' - - 160) Checklist::Timeline when added multiple times - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:221:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:224:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:225:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:228:in `block (3 levels) in ' - - 161) Checklist::Timeline when added multiple times - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:221:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:224:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:225:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:231:in `block (3 levels) in ' - - 162) Checklist::Timeline when added multiple times - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:221:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:224:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:225:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:232:in `block (3 levels) in ' - - 163) Checklist::Timeline when automatic deletion from ancestor listing - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:250:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:253:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:254:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:257:in `block (3 levels) in ' - - 164) Checklist::Timeline when automatic deletion from ancestor listing - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:250:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:253:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:254:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:260:in `block (3 levels) in ' - - 165) Checklist::Timeline when automatic deletion from ancestor listing - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timeline_spec.rb:250:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:253:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:254:in `block (3 levels) in ' - # ./spec/models/checklist/timeline_spec.rb:261:in `block (3 levels) in ' - - 166) Checklist::TimelinesForTaxonConcept timelines when Appendix I - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:21:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:24:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:25:in `block (4 levels) in ' - - 167) Checklist::TimelinesForTaxonConcept timelines when Appendix I - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:21:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:24:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:26:in `block (4 levels) in ' - - 168) Checklist::TimelinesForTaxonConcept timelines when Appendix III - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:42:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:45:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:46:in `block (4 levels) in ' - - 169) Checklist::TimelinesForTaxonConcept timelines when Appendix III - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:42:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:45:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:47:in `block (4 levels) in ' - - 170) Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:63:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:66:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:67:in `block (4 levels) in ' - - 171) Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:63:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:66:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:68:in `block (4 levels) in ' - - 172) Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:63:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:66:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:69:in `block (4 levels) in ' - - 173) Checklist::TimelinesForTaxonConcept timeline_years when in 1990 - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:77:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:80:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:81:in `block (4 levels) in ' - - 174) Checklist::TimelinesForTaxonConcept timeline_years when in 1990 - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:77:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:80:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:82:in `block (4 levels) in ' - - 175) Checklist::TimelinesForTaxonConcept timeline_years when in 1990 - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:77:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:80:in `block (4 levels) in ' - # ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:83:in `block (4 levels) in ' - - 176) CitesSuspensionNotification destroy when dependent objects attached when confirmation notification, make sure it gets destroyed - Failure/Error: create( - ActiveRecord::StatementInvalid: - PG::NotNullViolation: ERROR: null value in column "cites_suspension_id" violates not-null constraint - DETAIL: Failing row contains (2, null, 1739, 2024-01-04 16:44:41.516933, 2024-01-04 16:44:41.516933). - : INSERT INTO "cites_suspension_confirmations" ("cites_suspension_notification_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" - # ./spec/models/cites_suspension_notification_spec.rb:78:in `block (5 levels) in ' - - 177) DashboardStats#species has one results for argentina - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 178) DashboardStats#species has no results for ghana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 179) DashboardStats#trade when no time range specified argentina should have 40 exported animals and no imports - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/dashboard_stats_trade_spec.rb:7:in `block (3 levels) in ' - - 180) DashboardStats#trade when time range specified argentina should have no exports in 2012-2012 - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/dashboard_stats_trade_spec.rb:7:in `block (3 levels) in ' - - 181) EuDecision create downloads cache should be populated - Failure/Error: Species::EuDecisionsExport.new(set: 'current', decision_types: {}).export - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - public/downloads/eu_decisions/e05a5d836ef2cebd490f1835302bc80c28434a26en.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./spec/models/eu_decision_spec.rb:65:in `block (4 levels) in ' - - 182) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26385 AND "listing_changes"."species_listing_id" = 2847 AND "listing_changes"."change_type_id" = 4481 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2500 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 183) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26395 AND "listing_changes"."species_listing_id" = 2850 AND "listing_changes"."change_type_id" = 4486 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2502 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 184) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26405 AND "listing_changes"."species_listing_id" = 2853 AND "listing_changes"."change_type_id" = 4491 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2504 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 185) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26415 AND "listing_changes"."species_listing_id" = 2856 AND "listing_changes"."change_type_id" = 4496 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2506 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 186) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26425 AND "listing_changes"."species_listing_id" = 2859 AND "listing_changes"."change_type_id" = 4501 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2508 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 187) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26435 AND "listing_changes"."species_listing_id" = 2862 AND "listing_changes"."change_type_id" = 4506 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2510 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 188) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26445 AND "listing_changes"."species_listing_id" = 2865 AND "listing_changes"."change_type_id" = 4511 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2512 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 189) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26455 AND "listing_changes"."species_listing_id" = 2868 AND "listing_changes"."change_type_id" = 4516 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2514 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 190) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26465 AND "listing_changes"."species_listing_id" = 2871 AND "listing_changes"."change_type_id" = 4521 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2516 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 191) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26475 AND "listing_changes"."species_listing_id" = 2874 AND "listing_changes"."change_type_id" = 4526 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2518 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 192) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26485 AND "listing_changes"."species_listing_id" = 2877 AND "listing_changes"."change_type_id" = 4531 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2520 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 193) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26495 AND "listing_changes"."species_listing_id" = 2880 AND "listing_changes"."change_type_id" = 4536 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2522 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 194) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26505 AND "listing_changes"."species_listing_id" = 2883 AND "listing_changes"."change_type_id" = 4541 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2524 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 195) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26515 AND "listing_changes"."species_listing_id" = 2886 AND "listing_changes"."change_type_id" = 4546 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2526 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 196) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26525 AND "listing_changes"."species_listing_id" = 2889 AND "listing_changes"."change_type_id" = 4551 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2528 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 197) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26535 AND "listing_changes"."species_listing_id" = 2892 AND "listing_changes"."change_type_id" = 4556 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2530 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 198) NomenclatureChange::ReassignmentCopyProcessor run when legislation - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26545 AND "listing_changes"."species_listing_id" = 2895 AND "listing_changes"."change_type_id" = 4561 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2532 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:57:in `copied_object_before_save' - # ./app/models/nomenclature_change/reassignment_copy_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 199) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26897 AND "listing_changes"."species_listing_id" = 2898 AND "listing_changes"."change_type_id" = 4566 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2573 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 200) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26915 AND "listing_changes"."species_listing_id" = 2901 AND "listing_changes"."change_type_id" = 4571 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2575 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 201) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26933 AND "listing_changes"."species_listing_id" = 2904 AND "listing_changes"."change_type_id" = 4576 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2577 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 202) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26951 AND "listing_changes"."species_listing_id" = 2907 AND "listing_changes"."change_type_id" = 4581 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2579 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 203) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26969 AND "listing_changes"."species_listing_id" = 2910 AND "listing_changes"."change_type_id" = 4586 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2581 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 204) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 26987 AND "listing_changes"."species_listing_id" = 2913 AND "listing_changes"."change_type_id" = 4591 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2583 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 205) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27005 AND "listing_changes"."species_listing_id" = 2916 AND "listing_changes"."change_type_id" = 4596 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2585 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 206) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27023 AND "listing_changes"."species_listing_id" = 2919 AND "listing_changes"."change_type_id" = 4601 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2587 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 207) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27041 AND "listing_changes"."species_listing_id" = 2922 AND "listing_changes"."change_type_id" = 4606 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2589 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 208) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27059 AND "listing_changes"."species_listing_id" = 2925 AND "listing_changes"."change_type_id" = 4611 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2591 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 209) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27077 AND "listing_changes"."species_listing_id" = 2928 AND "listing_changes"."change_type_id" = 4616 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2593 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 210) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27095 AND "listing_changes"."species_listing_id" = 2931 AND "listing_changes"."change_type_id" = 4621 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2595 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 211) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27113 AND "listing_changes"."species_listing_id" = 2934 AND "listing_changes"."change_type_id" = 4626 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2597 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 212) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27131 AND "listing_changes"."species_listing_id" = 2937 AND "listing_changes"."change_type_id" = 4631 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2599 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 213) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27149 AND "listing_changes"."species_listing_id" = 2940 AND "listing_changes"."change_type_id" = 4636 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2601 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 214) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27167 AND "listing_changes"."species_listing_id" = 2943 AND "listing_changes"."change_type_id" = 4641 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2603 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 215) NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27185 AND "listing_changes"."species_listing_id" = 2946 AND "listing_changes"."change_type_id" = 4646 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2605 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `each' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:99:in `block (2 levels) in ' - - 216) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27502 AND "listing_changes"."species_listing_id" = 2949 AND "listing_changes"."change_type_id" = 4651 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2628 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 217) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27521 AND "listing_changes"."species_listing_id" = 2952 AND "listing_changes"."change_type_id" = 4656 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2630 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 218) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27540 AND "listing_changes"."species_listing_id" = 2955 AND "listing_changes"."change_type_id" = 4661 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2632 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 219) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27559 AND "listing_changes"."species_listing_id" = 2958 AND "listing_changes"."change_type_id" = 4666 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2634 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 220) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27578 AND "listing_changes"."species_listing_id" = 2961 AND "listing_changes"."change_type_id" = 4671 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2636 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 221) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27597 AND "listing_changes"."species_listing_id" = 2964 AND "listing_changes"."change_type_id" = 4676 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2638 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 222) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27616 AND "listing_changes"."species_listing_id" = 2967 AND "listing_changes"."change_type_id" = 4681 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2640 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 223) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27635 AND "listing_changes"."species_listing_id" = 2970 AND "listing_changes"."change_type_id" = 4686 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2642 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 224) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27654 AND "listing_changes"."species_listing_id" = 2973 AND "listing_changes"."change_type_id" = 4691 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2644 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 225) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27673 AND "listing_changes"."species_listing_id" = 2976 AND "listing_changes"."change_type_id" = 4696 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2646 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 226) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27692 AND "listing_changes"."species_listing_id" = 2979 AND "listing_changes"."change_type_id" = 4701 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2648 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 227) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27711 AND "listing_changes"."species_listing_id" = 2982 AND "listing_changes"."change_type_id" = 4706 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2650 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 228) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27730 AND "listing_changes"."species_listing_id" = 2985 AND "listing_changes"."change_type_id" = 4711 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2652 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 229) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27749 AND "listing_changes"."species_listing_id" = 2988 AND "listing_changes"."change_type_id" = 4716 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2654 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 230) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27768 AND "listing_changes"."species_listing_id" = 2991 AND "listing_changes"."change_type_id" = 4721 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2656 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 231) NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation - Failure/Error: processor.run - ActiveRecord::StatementInvalid: - PG::UndefinedTable: ERROR: missing FROM-clause entry for table "listing_distributions" - LINE 1: ..."listing_changes"."internal_notes") IS NULL) AND ("listing_d... - ^ - : SELECT "listing_changes".* FROM "listing_changes" WHERE ("listing_changes"."taxon_concept_id" = 27787 AND "listing_changes"."species_listing_id" = 2994 AND "listing_changes"."change_type_id" = 4726 AND "listing_changes"."hash_annotation_id" IS NULL AND "listing_changes"."effective_at" = '2013-01-01 00:00:00.000000' AND "listing_changes"."is_current" = 'f' AND "listing_changes"."parent_id" IS NULL AND "listing_changes"."inclusion_taxon_concept_id" IS NULL AND "listing_changes"."event_id" IS NULL AND "listing_changes"."explicit_change" = 't' AND SQUISH_NULL("listing_changes"."nomenclature_note_en") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_es") IS NULL AND SQUISH_NULL("listing_changes"."nomenclature_note_fr") IS NULL AND SQUISH_NULL("listing_changes"."internal_notes") IS NULL) AND ("listing_distributions"."geo_entity_id" = 2658 AND "listing_distributions"."is_party" = 't') AND (SQUISH_NULL("annotations"."symbol") = '#4' AND SQUISH_NULL("annotations"."parent_symbol") = 'CoP15' AND "annotations"."display_in_index" = 'f' AND "annotations"."display_in_footnote" = 'f' AND SQUISH_NULL("annotations"."short_note_en") = 'I''m a short note' AND SQUISH_NULL("annotations"."full_note_en") = 'I''m a long note' AND SQUISH_NULL("annotations"."short_note_fr") IS NULL AND SQUISH_NULL("annotations"."full_note_fr") IS NULL AND SQUISH_NULL("annotations"."short_note_es") IS NULL AND SQUISH_NULL("annotations"."full_note_es") IS NULL AND "annotations"."event_id" IS NULL) ORDER BY "listing_changes"."id" ASC LIMIT 1 - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:42:in `transferred_object_before_save' - # ./app/models/nomenclature_change/reassignment_transfer_processor.rb:5:in `process_reassignment' - # ./app/models/nomenclature_change/reassignment_processor.rb:41:in `block in process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:40:in `process_reassignment_of_anonymous_reassignable' - # ./app/models/nomenclature_change/reassignment_processor.rb:27:in `block in process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:24:in `process_reassignments' - # ./app/models/nomenclature_change/reassignment_processor.rb:9:in `run' - # ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:68:in `block (2 levels) in ' - - 232) Species::CommonNamesExport export when results when file not cached - Failure/Error: subject.export - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - spec/public/downloads/common_names/97d170e1550eee4afc0af065b78cda302a97674cen.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./spec/models/species/common_names_export_spec.rb:33:in `block (5 levels) in ' - - 233) Species::TaxonConceptPrefixMatcher results when searching for hybrid when trade visibility - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 234) Species::TaxonConceptPrefixMatcher results when searching for hybrid when trade internal visibility - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 235) Species::TaxonConceptPrefixMatcher results when searching for hybrid when speciesplus visibility - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 236) Species::Search results when searching by scientific name when subspecies never listed - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 237) Species::Search results when searching by scientific name when subspecies never listed - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 238) Species::ListingsExport path - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 239) Species::ListingsExport export when no results - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 240) Species::ListingsExport export when results when file not cached - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 241) Species::ListingsExport export when results when file cached - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 242) Species::ListingsExport query when CITES when Appendix I - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 243) Species::ListingsExport query when CITES when Appendix I when Poland - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 244) Species::ListingsExport query when CITES when Appendix I when Nepal - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 245) Species::ListingsExport query when CITES when higher taxon ids - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 246) Species::ListingsExport query when CITES when implicitly listed subspecies present - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 247) Species::ListingsExport query when EU when Annex A - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 248) Species::ListingsExport query when EU when Annex A when Spain - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 249) Species::ListingsExport query when EU when Annex A when Nepal - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 250) Species::ListingsExport query when EU when higher taxon ids - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 251) Species::OrphanedTaxonConceptsExport export when results when file not cached - Failure/Error: subject.export - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - spec/public/downloads/orphaned_taxon_concepts/97d170e1550eee4afc0af065b78cda302a97674cen.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./spec/models/species/orphaned_taxon_concepts_export_spec.rb:34:in `block (5 levels) in ' - - 252) Species::Search results when searching by scientific name when regular query - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 253) Species::Search results when searching by scientific name when malicious query - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 254) Species::Search results when searching by scientific name when leading whitespace - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 255) Species::Search results when searching by scientific name when trailing whitespace - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 256) Species::SpeciesReferenceOutputExport export when results when file not cached - Failure/Error: subject.export - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - spec/public/downloads/species_reference_output/97d170e1550eee4afc0af065b78cda302a97674cen.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./spec/models/species/species_reference_output_spec.rb:33:in `block (5 levels) in ' - - 257) Species::StandardReferenceOutputExport export when results when file not cached - Failure/Error: subject.export - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - spec/public/downloads/standard_reference_output/97d170e1550eee4afc0af065b78cda302a97674cen.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./spec/models/species/standard_reference_output_spec.rb:33:in `block (5 levels) in ' - - 258) Species::SynonymsAndTradeNamesExport export when results when file not cached - Failure/Error: subject.export - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - spec/public/downloads/synonyms_and_trade_names/97d170e1550eee4afc0af065b78cda302a97674cen.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./spec/models/species/synonyms_and_trade_names_export_spec.rb:39:in `block (5 levels) in ' - - 259) Species::TaxonConceptPrefixMatcher results when searching by common name when searching by hyphenated common name - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 260) Species::TaxonConceptPrefixMatcher results when searching by common name when searching by hyphenated common name without hyphens - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 261) Species::TaxonConceptPrefixMatcher results when searching by common name when searching by part of hyphenated common name - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 262) Species::TaxonConceptPrefixMatcher results when searching by scientific name when regular query - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 263) Species::TaxonConceptPrefixMatcher results when searching by scientific name when malicious query - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 264) Species::TaxonConceptPrefixMatcher results when searching by scientific name when leading whitespace - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 265) Species::TaxonConceptPrefixMatcher results when searching by scientific name when trailing whitespace - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 266) Species::TaxonConceptPrefixMatcher results when searching by scientific name when implicitly listed subspecies - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 267) Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed subspecies - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 268) Species::TaxonConceptPrefixMatcher results when searching by scientific name when implicitly listed higher taxon (without an explicitly listed ancestor) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 269) Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 270) Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon but ranks expected FAMILY - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 271) Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon but ranks expected SPECIES - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 272) Species::TaxonConceptPrefixMatcher results when searching by scientific name when searching for name that matches Species and Subspecies but ranks expected SUBSPECIES - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 273) Species::TaxonConceptsNamesExport export when results when file not cached - Failure/Error: subject.export - Errno::ENOENT: - No such file or directory @ rb_file_s_ctime - spec/public/downloads/taxon_concepts_names/97d170e1550eee4afc0af065b78cda302a97674cen.csv - # ./app/models/species/csv_copy_export.rb:22:in `ctime' - # ./app/models/species/csv_copy_export.rb:22:in `export' - # ./spec/models/species/taxon_concepts_export_spec.rb:33:in `block (5 levels) in ' - - 274) Species::TaxonConceptPrefixMatcher results when searching for status N species when trade visibility - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' - - 275) Species::TaxonConceptPrefixMatcher results when searching for status N species when trade internal visibility - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' - - 276) Species::TaxonConceptPrefixMatcher results when searching for status N species when speciesplus visibility - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' - - 277) Species::TaxonConceptPrefixMatcher results when searching for trade name when trade visibility - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' - - 278) Species::TaxonConceptPrefixMatcher results when searching for trade name when trade visibility - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' - - 279) Species::TaxonConceptPrefixMatcher results when searching for trade name when trade internal visibility - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' - - 280) Species::TaxonConceptPrefixMatcher results when searching for trade name when trade internal visibility - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' - - 281) Species::TaxonConceptPrefixMatcher results when searching for trade name when speciesplus visibility - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' - - 282) Species::TaxonConceptPrefixMatcher results when searching for trade name when speciesplus visibility - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/species/trade_name_prefix_matcher_spec.rb:24:in `block (2 levels) in ' - - 283) Species::Search results when searching by scientific name when subspecies previously listed - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 284) TaxonConcept Agalychnis REFERENCES cites_accepted for class Amphibia - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 285) TaxonConcept Agalychnis REFERENCES cites_accepted for family Hylidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 286) TaxonConcept Agalychnis REFERENCES cites_accepted for genus Agalychnis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 287) TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for class Amphibia - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 288) TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for family Hylidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 289) TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for genus Agalychnis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 290) TaxonConcept Agalychnis LISTING cites_listing for genus Agalychnis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 291) TaxonConcept Agalychnis LISTING eu_listing for genus Agalychnis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 292) TaxonConcept Agalychnis LISTING cites_listed for family Hylidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 293) TaxonConcept Agalychnis LISTING cites_listed for genus Agalychnis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 294) TaxonConcept Agalychnis LISTING eu_listed for family Hylidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 295) TaxonConcept Agalychnis LISTING eu_listed for genus Agalychnis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agalychnis.rb:54:in `block (2 levels) in ' - - 296) TaxonConcept Agave LISTING cites_listing for species Agave parviflora - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 297) TaxonConcept Agave LISTING cites_listing for species Agave arizonica - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 298) TaxonConcept Agave LISTING cites_listed for species Agave parviflora - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 299) TaxonConcept Agave LISTING cites_listed for species Agave arizonica - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 300) TaxonConcept Agave LISTING cites_show for species Agave parviflora - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 301) TaxonConcept Agave LISTING cites_show for species Agave arizonica - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 302) TaxonConcept Agave LISTING eu_listing for species Agave parviflora - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 303) TaxonConcept Agave LISTING eu_listing for species Agave arizonica - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 304) TaxonConcept Agave LISTING eu_listed for species Agave parviflora - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 305) TaxonConcept Agave LISTING eu_listed for species Agave arizonica - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 306) TaxonConcept Agave LISTING eu_show for species Agave parviflora - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 307) TaxonConcept Agave LISTING eu_show for species Agave arizonica - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/agave.rb:75:in `block (2 levels) in ' - - 308) TaxonConcept Ailuropoda LISTING cites_listing for species Ailuropoda melanoleuca - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' - - 309) TaxonConcept Ailuropoda LISTING cites_listing for genus level Ailuropoda - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' - - 310) TaxonConcept Ailuropoda LISTING eu_listing for species Ailuropoda melanoleuca - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' - - 311) TaxonConcept Ailuropoda LISTING eu_listing for genus level Ailuropoda - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' - - 312) TaxonConcept Ailuropoda LISTING cites_listed for genus Ailuropoda - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' - - 313) TaxonConcept Ailuropoda LISTING cites_listed for species Ailuropoda melanoleuca - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' - - 314) TaxonConcept Ailuropoda LISTING eu_listed for genus Ailuropoda - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' - - 315) TaxonConcept Ailuropoda LISTING eu_listed for species Ailuropoda melanoleuca - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/ailuropoda.rb:44:in `block (2 levels) in ' - - 316) TaxonConcept Arctocephalus LISTING cites_listing should be II at species level Arctocephalus australis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 317) TaxonConcept Arctocephalus LISTING cites_listing should be I at species level Arctocephalus townsendi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 318) TaxonConcept Arctocephalus LISTING cites_listing should be I/II at genus level Arctocephalus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 319) TaxonConcept Arctocephalus LISTING cites_listed should be true for genus Arctocephalus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 320) TaxonConcept Arctocephalus LISTING cites_listed should be true for species Arctocephalus townsendi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 321) TaxonConcept Arctocephalus LISTING cites_listed should be false for species Arctocephalus australis (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 322) TaxonConcept Arctocephalus LISTING eu_listed should be true for genus Arctocephalus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 323) TaxonConcept Arctocephalus LISTING eu_listed should be true for species Arctocephalus townsendi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 324) TaxonConcept Arctocephalus LISTING eu_listed should be false for species Arctocephalus australis (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/arctocephalus.rb:114:in `block (2 levels) in ' - - 325) TaxonConcept Boa constrictor TAXONOMY full_name for subspecies Boa constrictor occidentalis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 326) TaxonConcept Boa constrictor TAXONOMY full_name for species Boa constrictor - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 327) TaxonConcept Boa constrictor TAXONOMY full_name for genus Boa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 328) TaxonConcept Boa constrictor TAXONOMY ancestors family - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 329) TaxonConcept Boa constrictor TAXONOMY ancestors order - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 330) TaxonConcept Boa constrictor TAXONOMY ancestors class - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 331) TaxonConcept Boa constrictor LISTING cites_listing for subspecies Boa constrictor occidentalis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 332) TaxonConcept Boa constrictor LISTING cites_listing for subspecies Boa constrictor constrictor - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 333) TaxonConcept Boa constrictor LISTING cites_listing for species Boa constrictor - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 334) TaxonConcept Boa constrictor LISTING eu_listing for subspecies Boa constrictor occidentalis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 335) TaxonConcept Boa constrictor LISTING eu_listing for subspecies Boa constrictor constrictor - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 336) TaxonConcept Boa constrictor LISTING eu_listing for species Boa constrictor - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 337) TaxonConcept Boa constrictor LISTING cites_listed for family Boidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 338) TaxonConcept Boa constrictor LISTING cites_listed for genus Boa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 339) TaxonConcept Boa constrictor LISTING cites_listed for species Boa constrictor (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 340) TaxonConcept Boa constrictor LISTING cites_listed for subspecies Boa constrictor occidentalis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 341) TaxonConcept Boa constrictor LISTING cites_listed for subspecies Boa constrictor constrictor - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 342) TaxonConcept Boa constrictor LISTING cites_show for family Boidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 343) TaxonConcept Boa constrictor LISTING cites_show for genus Boa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 344) TaxonConcept Boa constrictor LISTING cites_show for species Boa constrictor (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 345) TaxonConcept Boa constrictor LISTING cites_show for subspecies Boa constrictor occidentalis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 346) TaxonConcept Boa constrictor LISTING cites_show for subspecies Boa constrictor constrictor - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 347) TaxonConcept Boa constrictor LISTING cites_listed_descendants for family Boidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 348) TaxonConcept Boa constrictor LISTING cites_listed_descendants for genus Boa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 349) TaxonConcept Boa constrictor LISTING cites_listed_descendants for species Boa constrictor (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 350) TaxonConcept Boa constrictor LISTING cites_listed_descendants for subspecies Boa constrictor occidentalis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 351) TaxonConcept Boa constrictor LISTING eu_listed for family Boidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 352) TaxonConcept Boa constrictor LISTING eu_listed for genus Boa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 353) TaxonConcept Boa constrictor LISTING eu_listed for species Boa constrictor (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 354) TaxonConcept Boa constrictor LISTING eu_listed for subspecies Boa constrictor occidentalis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 355) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for family Boidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 356) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for genus Boa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 357) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for species Boa constrictor (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 358) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for subspecies Boa constrictor occidentalis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 359) TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for subspecies Boa constrictor constrictor - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 360) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for family Boidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 361) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for genus Boa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 362) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for species Boa constrictor (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 363) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for subspecies Boa constrictor occidentalis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 364) TaxonConcept Boa constrictor LISTING show_in_checklist_ac for subspecies Boa constrictor constrictor - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/boa_constrictor.rb:85:in `block (2 levels) in ' - - 365) TaxonConcept Caiman latirostris TAXONOMY full_name for species synonym Alligator cynocephalus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 366) TaxonConcept Caiman latirostris TAXONOMY rank_name for species synonym Alligator cynocephalus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 367) TaxonConcept Caiman latirostris REFERENCES cites_accepted for species Caiman latirostris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 368) TaxonConcept Caiman latirostris REFERENCES cites_accepted for synonym species Alligator cynocephalus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 369) TaxonConcept Caiman latirostris REFERENCES standard_taxon_concept_references for species Caiman latirostris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 370) TaxonConcept Caiman latirostris LISTING cites_listing for species Caiman latirostris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 371) TaxonConcept Caiman latirostris LISTING eu_listing for species Caiman latirostris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 372) TaxonConcept Caiman latirostris LISTING cites_listed for order Crocodylia - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 373) TaxonConcept Caiman latirostris LISTING cites_listed for family Alligatoridae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 374) TaxonConcept Caiman latirostris LISTING cites_listed for genus Caiman - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 375) TaxonConcept Caiman latirostris LISTING cites_listed for species Caiman latoristris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 376) TaxonConcept Caiman latirostris LISTING eu_listed for order Crocodylia - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 377) TaxonConcept Caiman latirostris LISTING eu_listed for family Alligatoridae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 378) TaxonConcept Caiman latirostris LISTING eu_listed for genus Caiman - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 379) TaxonConcept Caiman latirostris LISTING eu_listed for species Caiman latoristris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 380) TaxonConcept Caiman latirostris LISTING cites_show for order Crocodylia - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 381) TaxonConcept Caiman latirostris LISTING cites_show for family Alligatoridae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 382) TaxonConcept Caiman latirostris LISTING cites_show for genus Caiman - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 383) TaxonConcept Caiman latirostris LISTING cites_show for species Caiman latoristris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 384) TaxonConcept Caiman latirostris LISTING cites_show for synonym species Alligator cynocephalus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 385) TaxonConcept Caiman latirostris LISTING ann_symbol for species Caiman latirostris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 386) TaxonConcept Caiman latirostris LISTING hash_ann_symbol for species Caiman latirostris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/caiman_latirostris.rb:155:in `block (2 levels) in ' - - 387) TaxonConcept Canis lupus LISTING cites_listing for species Canis lupus (population split listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 388) TaxonConcept Canis lupus LISTING eu_listing for species Canis lupus (population split listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 389) TaxonConcept Canis lupus LISTING cites_listed for species Canis lupus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 390) TaxonConcept Canis lupus LISTING cites_listed for subspecies Canis lupus crassodon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 391) TaxonConcept Canis lupus LISTING eu_listed for species Canis lupus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 392) TaxonConcept Canis lupus LISTING show_in_species_plus_ac for species Canis lupus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 393) TaxonConcept Canis lupus LISTING show_in_species_plus_ac for subspecies Canis lupus crassodon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 394) TaxonConcept Canis lupus LISTING show_in_checklist_ac for species Canis lupus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 395) TaxonConcept Canis lupus LISTING show_in_checklist_ac for subspecies Canis lupus crassodon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 396) TaxonConcept Canis lupus LISTING show_in_species_plus for species Canis lupus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 397) TaxonConcept Canis lupus LISTING show_in_species_plus for subspecies Canis lupus crassodon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/canis_lupus.rb:130:in `block (2 levels) in ' - - 398) TaxonConcept Caretta caretta CMS LISTING cms_listing for family Cheloniidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' - - 399) TaxonConcept Caretta caretta CMS LISTING cms_listing for species Caretta caretta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' - - 400) TaxonConcept Caretta caretta CMS LISTING cms_listed for family Cheloniidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' - - 401) TaxonConcept Caretta caretta CMS LISTING cms_listed for species Caretta caretta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' - - 402) TaxonConcept Caretta caretta CMS CASCADING LISTING current_cms_additions for family Cheloniidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' - - 403) TaxonConcept Caretta caretta CMS CASCADING LISTING current_cms_additions for species Caretta caretta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/caretta_caretta_cms.rb:33:in `block (2 levels) in ' - - 404) TaxonConcept Cedrela montana LISTING cites_listing for species Cedrela montana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' - - 405) TaxonConcept Cedrela montana LISTING cites_listed for species Cedrela montana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' - - 406) TaxonConcept Cedrela montana LISTING cites_show for species Cedrela montana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' - - 407) TaxonConcept Cedrela montana LISTING eu_listing for species Cedrela montana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' - - 408) TaxonConcept Cedrela montana LISTING eu_listed for species Cedrela montana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' - - 409) TaxonConcept Cedrela montana LISTING eu_show for species Cedrela montana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' - - 410) TaxonConcept Cervus elphus CMS LISTING cms_listing for species Cervus elaphus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' - - 411) TaxonConcept Cervus elphus CMS LISTING cms_listing for subspecies Cervus elaphus bactrianus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' - - 412) TaxonConcept Cervus elphus CMS LISTING cms_listing for subspecies Cervus elaphus barbarus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' - - 413) TaxonConcept Cervus elphus CMS LISTING show_in_species_plus_ac for subspecies Cervus elaphus bactrianus (instrument) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' - - 414) TaxonConcept Cervus elphus CMS LISTING show_in_species_plus_ac for subspecies Cervus elaphus barbarus (listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' - - 415) TaxonConcept Cervus elphus CMS LISTING show_in_species_plus for subspecies Cervus elaphus bactrianus (instrument) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' - - 416) TaxonConcept Cervus elphus CMS LISTING show_in_species_plus for subspecies Cervus elaphus barbarus (listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus_cms.rb:55:in `block (2 levels) in ' - - 417) TaxonConcept Cervus elaphus TAXONOMY full_name for subspecies Cervus elaphus bactrianus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 418) TaxonConcept Cervus elaphus TAXONOMY full_name for species Cervus elaphus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 419) TaxonConcept Cervus elaphus TAXONOMY full_name for genus Cervus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 420) TaxonConcept Cervus elaphus LISTING cites_listing for species Cervus elaphus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 421) TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus bactrianus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 422) TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus barbarus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 423) TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus hanglu - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 424) TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus canadensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 425) TaxonConcept Cervus elaphus LISTING eu_listing for species Cervus elaphus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 426) TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus bactrianus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 427) TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus barbarus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 428) TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus hanglu - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 429) TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus canadensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 430) TaxonConcept Cervus elaphus LISTING cites_listed for order Artiodactyla - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 431) TaxonConcept Cervus elaphus LISTING cites_listed for family Cervidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 432) TaxonConcept Cervus elaphus LISTING cites_listed for genus Cervus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 433) TaxonConcept Cervus elaphus LISTING cites_listed for species Cervus elaphus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 434) TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus bactrianus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 435) TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus barbarus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 436) TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus hanglu - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 437) TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus canadensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 438) TaxonConcept Cervus elaphus LISTING eu_listed for order Artiodactyla - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 439) TaxonConcept Cervus elaphus LISTING eu_listed for family Cervidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 440) TaxonConcept Cervus elaphus LISTING eu_listed for genus Cervus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 441) TaxonConcept Cervus elaphus LISTING eu_listed for species Cervus elaphus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 442) TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus bactrianus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 443) TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus barbarus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 444) TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus hanglu - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 445) TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus canadensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 446) TaxonConcept Cervus elaphus LISTING cites_show for subspecies Cervus elaphus hanglu - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 447) TaxonConcept Cervus elaphus LISTING cites_show for subspecies Cervus elaphus canadensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cervus_elaphus.rb:72:in `block (2 levels) in ' - - 448) TaxonConcept Colophon LISTING cites_listing for genus Colophon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 449) TaxonConcept Colophon LISTING cites_listing for species Colophon barnardi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 450) TaxonConcept Colophon LISTING eu_listing for genus Colophon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 451) TaxonConcept Colophon LISTING eu_listing for species Colophon barnardi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 452) TaxonConcept Colophon LISTING cites_listed for genus Colophon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 453) TaxonConcept Colophon LISTING cites_listed for species Colophon barnardi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 454) TaxonConcept Colophon LISTING eu_listed for genus Colophon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 455) TaxonConcept Colophon LISTING eu_listed for species Colophon barnardi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 456) TaxonConcept Colophon LISTING cites_show for order Coleoptera - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 457) TaxonConcept Colophon LISTING cites_show for family Lucanidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 458) TaxonConcept Colophon LISTING current_party_ids for genus Colophon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 459) TaxonConcept Colophon LISTING current_party_ids for species Colophon barnardi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/colophon.rb:54:in `block (2 levels) in ' - - 460) TaxonConcept Dalbergia LISTING cites_listing for species Dalbergia abbreviata - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' - - 461) TaxonConcept Dalbergia LISTING cites_listing for species Dalbergia abrahamii - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' - - 462) TaxonConcept Dalbergia LISTING cites_listed for species Dalbergia abbreviata - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' - - 463) TaxonConcept Dalbergia LISTING cites_listed for species Dalbergia abrahamii - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' - - 464) TaxonConcept Dalbergia LISTING cites_show for species Dalbergia abbreviata - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' - - 465) TaxonConcept Dalbergia LISTING cites_show for species Dalbergia abrahamii - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/dalbergia.rb:75:in `block (2 levels) in ' - - 466) TaxonConcept Diospyros LISTING cites_listing for species Diospyros aculeata - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 467) TaxonConcept Diospyros LISTING cites_listing for species Diospyros acuta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 468) TaxonConcept Diospyros LISTING cites_listed for species Diospyros aculeata - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 469) TaxonConcept Diospyros LISTING cites_listed for species Diospyros acuta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 470) TaxonConcept Diospyros LISTING cites_show for species Diospyros aculeata - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 471) TaxonConcept Diospyros LISTING cites_show for species Diospyros acuta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 472) TaxonConcept Diospyros LISTING eu_listing for species Diospyros aculeata - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 473) TaxonConcept Diospyros LISTING eu_listing for species Diospyros acuta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 474) TaxonConcept Diospyros LISTING eu_listed for species Diospyros aculeata - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 475) TaxonConcept Diospyros LISTING eu_listed for species Diospyros acuta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 476) TaxonConcept Diospyros LISTING eu_show for species Diospyros aculeata - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 477) TaxonConcept Diospyros LISTING eu_show for species Diospyros acuta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/diospyros.rb:127:in `block (2 levels) in ' - - 478) TaxonConcept Falconiformes TAXONOMY rank_name for Falco hybrid - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 479) TaxonConcept Falconiformes LISTING cites_listing for order Falconiformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 480) TaxonConcept Falconiformes LISTING cites_listing for species Falco araea - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 481) TaxonConcept Falconiformes LISTING cites_listing for species Falco alopex (H) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 482) TaxonConcept Falconiformes LISTING cites_listing for species Gymnogyps californianus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 483) TaxonConcept Falconiformes LISTING cites_listing for species Sarcoramphus papa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 484) TaxonConcept Falconiformes LISTING cites_listing for species Vultur atratus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 485) TaxonConcept Falconiformes LISTING eu_listing for order Falconiformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 486) TaxonConcept Falconiformes LISTING eu_listing for species Falco araea - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 487) TaxonConcept Falconiformes LISTING eu_listing for species Falco alopex (H) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 488) TaxonConcept Falconiformes LISTING eu_listing for species Gymnogyps californianus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 489) TaxonConcept Falconiformes LISTING eu_listing for species Sarcoramphus papa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 490) TaxonConcept Falconiformes LISTING eu_listing for species Vultur atratus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 491) TaxonConcept Falconiformes LISTING cites_status for genus Vultur - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 492) TaxonConcept Falconiformes LISTING cites_status for species Vultur atratus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 493) TaxonConcept Falconiformes LISTING cites_listed for order Falconiformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 494) TaxonConcept Falconiformes LISTING cites_listed for family Falconidae (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 495) TaxonConcept Falconiformes LISTING cites_listed for genus Falco - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 496) TaxonConcept Falconiformes LISTING cites_listed for species Falco araea - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 497) TaxonConcept Falconiformes LISTING cites_listed for species Falco alopex - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 498) TaxonConcept Falconiformes LISTING cites_listed for species Vultur atratus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 499) TaxonConcept Falconiformes LISTING cites_listed for subspecies Falco peregrinus peregrinus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 500) TaxonConcept Falconiformes LISTING eu_listed for order Falconiformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 501) TaxonConcept Falconiformes LISTING eu_listed for family Falconidae (inclusion in higher taxa listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 502) TaxonConcept Falconiformes LISTING eu_listed for genus Falco - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 503) TaxonConcept Falconiformes LISTING eu_listed for species Falco araea - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 504) TaxonConcept Falconiformes LISTING eu_listed for species Falco alopex - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 505) TaxonConcept Falconiformes LISTING eu_listed for species Vultur atratus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 506) TaxonConcept Falconiformes LISTING eu_listed for subspecies Falco peregrinus peregrinus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 507) TaxonConcept Falconiformes LISTING cites_show for order Falconiformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 508) TaxonConcept Falconiformes LISTING cites_show for family Falconidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 509) TaxonConcept Falconiformes LISTING cites_show for Falco hybrid - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 510) TaxonConcept Falconiformes LISTING show_in_checklist_ac for subspecies Falco peregrinus peregrinus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 511) TaxonConcept Falconiformes LISTING show_in_species_plus_ac for subspecies Falco peregrinus peregrinus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/falconiformes.rb:160:in `block (2 levels) in ' - - 512) TaxonConcept Loxodonta africana CMS TAXONOMY full_name for species Loxodonta africana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' - - 513) TaxonConcept Loxodonta africana CMS TAXONOMY full_name for genus Loxodonta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' - - 514) TaxonConcept Loxodonta africana CMS TAXONOMY rank for species Loxodonta africana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' - - 515) TaxonConcept Loxodonta africana CMS TAXONOMY ancestors family - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' - - 516) TaxonConcept Loxodonta africana CMS TAXONOMY ancestors order - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' - - 517) TaxonConcept Loxodonta africana CMS TAXONOMY ancestors class - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' - - 518) TaxonConcept Loxodonta africana CMS LISTING cms_listing for species Loxodonta africana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' - - 519) TaxonConcept Loxodonta africana CMS LISTING cms_listed for species Loxodonta africana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:47:in `rebuild_cms_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana_cms.rb:27:in `block (2 levels) in ' - - 520) TaxonConcept Loxodonta africana TAXONOMY full_name for species Loxodonta africana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 521) TaxonConcept Loxodonta africana TAXONOMY full_name for genus Loxodonta - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 522) TaxonConcept Loxodonta africana TAXONOMY rank for species Loxodonta africana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 523) TaxonConcept Loxodonta africana TAXONOMY ancestors family - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 524) TaxonConcept Loxodonta africana TAXONOMY ancestors order - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 525) TaxonConcept Loxodonta africana TAXONOMY ancestors class - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 526) TaxonConcept Loxodonta africana LISTING cites_listing for species Loxodonta africana (population split listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 527) TaxonConcept Loxodonta africana LISTING eu_listing for species Loxodonta africana (population split listing) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 528) TaxonConcept Loxodonta africana LISTING cites_listed for species Loxodonta africana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 529) TaxonConcept Loxodonta africana LISTING cites_listed for family Elephantidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 530) TaxonConcept Loxodonta africana LISTING eu_listed for species Loxodonta africana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 531) TaxonConcept Loxodonta africana LISTING eu_listed for family Elephantidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/loxodonta_africana.rb:95:in `block (2 levels) in ' - - 532) TaxonConcept Mellivora capensis LISTING cites_listing for species Mellivora capensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' - - 533) TaxonConcept Mellivora capensis LISTING eu_listing for species Mellivora capensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' - - 534) TaxonConcept Mellivora capensis LISTING cites_listed for family Mustelinae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' - - 535) TaxonConcept Mellivora capensis LISTING cites_listed for genus Mellivora - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' - - 536) TaxonConcept Mellivora capensis LISTING cites_listed for species Mellivora capensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' - - 537) TaxonConcept Mellivora capensis LISTING eu_listed for family Mustelinae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' - - 538) TaxonConcept Mellivora capensis LISTING eu_listed for genus Mellivora - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' - - 539) TaxonConcept Mellivora capensis LISTING eu_listed for species Mellivora capensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' - - 540) TaxonConcept Mellivora capensis LISTING current_party_ids for species Mellivora capensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/mellivora_capensis.rb:120:in `block (2 levels) in ' - - 541) TaxonConcept Moschus LISTING cites_listing for genus Moschus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 542) TaxonConcept Moschus LISTING cites_listing for species Moschus leucogaster - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 543) TaxonConcept Moschus LISTING cites_listing for species Moschus moschiferus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 544) TaxonConcept Moschus LISTING cites_listing for subspecies Moschus moschiferus moschiferus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 545) TaxonConcept Moschus LISTING cites_listed for genus Moschus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 546) TaxonConcept Moschus LISTING cites_listed for species Moschus leucogaster - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 547) TaxonConcept Moschus LISTING cites_listed for species Moschus moschiferus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 548) TaxonConcept Moschus LISTING cites_listed for subspecies Moschus moschiferus moschiferus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 549) TaxonConcept Moschus CASCADING LISTING current_cites_additions for species Moschus leucogaster - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 550) TaxonConcept Moschus CASCADING LISTING current_cites_additions for species Moschus moschiferus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 551) TaxonConcept Moschus CASCADING LISTING current_cites_additions for subspecies Moschus moschiferus moschiferus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/moschus.rb:146:in `block (2 levels) in ' - - 552) TaxonConcept Natator depressus LISTING cites_listing for family Cheloniidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/natator_depressus.rb:52:in `block (2 levels) in ' - - 553) TaxonConcept Natator depressus LISTING cites_listing for species Natator depressus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/natator_depressus.rb:52:in `block (2 levels) in ' - - 554) TaxonConcept Notomys aquilo LISTING cites_listing for genus Notomys - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/notomys_aquilo.rb:37:in `block (2 levels) in ' - - 555) TaxonConcept Notomys aquilo LISTING cites_listing for species Notomys aquilo - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/notomys_aquilo.rb:37:in `block (2 levels) in ' - - 556) TaxonConcept Notomys aquilo LISTING cites_show for genus Notomys - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/notomys_aquilo.rb:37:in `block (2 levels) in ' - - 557) TaxonConcept Notomys aquilo LISTING cites_show for species Notomys aquilo - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/notomys_aquilo.rb:37:in `block (2 levels) in ' - - 558) TaxonConcept Panax ginseng LISTING cites_listed for species Panax ginseng - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 559) TaxonConcept Panax ginseng LISTING cites_listed for genus Panax - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 560) TaxonConcept Panax ginseng LISTING eu_listed for species Panax ginseng - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 561) TaxonConcept Panax ginseng LISTING eu_listed for genus Panax - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 562) TaxonConcept Panax ginseng LISTING cites_listing for species Panax ginseng - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 563) TaxonConcept Panax ginseng LISTING eu_listing for species Panax ginseng - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 564) TaxonConcept Panax ginseng LISTING ann_symbol for species Panax ginseng - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 565) TaxonConcept Panax ginseng LISTING hash_ann_symbol for species Panax ginseng - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/panax_ginseng.rb:88:in `block (2 levels) in ' - - 566) TaxonConcept Pereskia LISTING cites_listing for genus Pereskia (not listed, shown) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 567) TaxonConcept Pereskia LISTING cites_listing for genus Ariocarpus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 568) TaxonConcept Pereskia LISTING cites_listing for family Cactaceae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 569) TaxonConcept Pereskia LISTING eu_listing for genus Pereskia (not listed, shown) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 570) TaxonConcept Pereskia LISTING eu_listing for genus Ariocarpus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 571) TaxonConcept Pereskia LISTING eu_listing for family Cactaceae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 572) TaxonConcept Pereskia LISTING cites_listed for family Cactaceae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 573) TaxonConcept Pereskia LISTING cites_listed for genus Pereskia - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 574) TaxonConcept Pereskia LISTING eu_listed for family Cactaceae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 575) TaxonConcept Pereskia LISTING eu_listed for genus Pereskia - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 576) TaxonConcept Pereskia LISTING cites_status for genus Pereskia - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 577) TaxonConcept Pereskia LISTING cites_show for genus Pereskia - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pereskia.rb:58:in `block (2 levels) in ' - - 578) TaxonConcept Platysternon megacephalum LISTING cites_listing for family Platysternidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' - - 579) TaxonConcept Platysternon megacephalum LISTING cites_listing for species Platysternon megacephalum - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' - - 580) TaxonConcept Platysternon megacephalum LISTING cites_listed for species Platysternon megacephalum - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' - - 581) TaxonConcept Platysternon megacephalum LISTING cites_show for species Platysternon megacephalum - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' - - 582) TaxonConcept Platysternon megacephalum LISTING eu_listing for family Platysternidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' - - 583) TaxonConcept Platysternon megacephalum LISTING eu_listing for species Platysternon megacephalum - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' - - 584) TaxonConcept Platysternon megacephalum LISTING eu_listed for species Platysternon megacephalum - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' - - 585) TaxonConcept Platysternon megacephalum LISTING eu_show for species Platysternon megacephalum - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/platysternon_megacephalum.rb:54:in `block (2 levels) in ' - - 586) TaxonConcept Pristis microdon LISTING cites_listing for family Pristidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' - - 587) TaxonConcept Pristis microdon LISTING cites_listing for species Pristis microdon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' - - 588) TaxonConcept Pristis microdon LISTING cites_listed for species Pristis microdon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' - - 589) TaxonConcept Pristis microdon LISTING cites_show for species Pristis microdon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' - - 590) TaxonConcept Pristis microdon LISTING eu_listing for family Pristidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' - - 591) TaxonConcept Pristis microdon LISTING eu_listing for species Pristis microdon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' - - 592) TaxonConcept Pristis microdon LISTING eu_listed for species Pristis microdon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' - - 593) TaxonConcept Pristis microdon LISTING eu_show for species Pristis microdon - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pristis_microdon.rb:62:in `block (2 levels) in ' - - 594) TaxonConcept Pseudomys fieldi LISTING cites_listing for subspecies Pseudomys fieldi preaconis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' - - 595) TaxonConcept Pseudomys fieldi LISTING cites_listing for species Pseudomys fieldi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' - - 596) TaxonConcept Pseudomys fieldi LISTING eu_listing for subspecies Pseudomys fieldi preaconis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' - - 597) TaxonConcept Pseudomys fieldi LISTING eu_listing for species Pseudomys fieldi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' - - 598) TaxonConcept Pseudomys fieldi LISTING cites_show for subspecies Pseudomys fieldi preaconis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' - - 599) TaxonConcept Pseudomys fieldi LISTING cites_show for species Pseudomys fieldi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pseudomys_fieldi.rb:53:in `block (2 levels) in ' - - 600) TaxonConcept Psittaciformes LISTING cites_listing for order Psittaciformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 601) TaxonConcept Psittaciformes LISTING cites_listing for species Cacatua goffiniana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 602) TaxonConcept Psittaciformes LISTING cites_listing for species Cacatua ducorpsi (H) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 603) TaxonConcept Psittaciformes LISTING cites_listing for species Probosciger aterrimus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 604) TaxonConcept Psittaciformes LISTING cites_listing for species Amazona aestiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 605) TaxonConcept Psittaciformes LISTING cites_listing for species Agapornis roseicollis (DEL II, not listed, not shown) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 606) TaxonConcept Psittaciformes LISTING cites_listing for species Psittacula krameri (DEL III, not listed, not shown) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 607) TaxonConcept Psittaciformes LISTING cites_listing for subspecies Amazona festiva festiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 608) TaxonConcept Psittaciformes LISTING eu_listing for order Psittaciformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 609) TaxonConcept Psittaciformes LISTING eu_listing for species Cacatua goffiniana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 610) TaxonConcept Psittaciformes LISTING eu_listing for species Cacatua ducorpsi (H) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 611) TaxonConcept Psittaciformes LISTING eu_listing for species Probosciger aterrimus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 612) TaxonConcept Psittaciformes LISTING eu_listing for species Amazona aestiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 613) TaxonConcept Psittaciformes LISTING eu_listing for species Agapornis roseicollis (DEL II, not listed, not shown) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 614) TaxonConcept Psittaciformes LISTING eu_listing for species Psittacula krameri (DEL III, not listed, not shown) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 615) TaxonConcept Psittaciformes LISTING eu_listing for subspecies Amazona festiva festiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 616) TaxonConcept Psittaciformes LISTING cites_listed for order Psittaciformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 617) TaxonConcept Psittaciformes LISTING cites_listed for family Cacatuidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 618) TaxonConcept Psittaciformes LISTING cites_listed for genus Cacatua - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 619) TaxonConcept Psittaciformes LISTING cites_listed for species Cacatua goffiniana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 620) TaxonConcept Psittaciformes LISTING cites_listed for species Cacatua ducorpsi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 621) TaxonConcept Psittaciformes LISTING cites_listed for subspecies Amazona festiva festiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 622) TaxonConcept Psittaciformes LISTING eu_listed for order Psittaciformes - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 623) TaxonConcept Psittaciformes LISTING eu_listed for family Cacatuidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 624) TaxonConcept Psittaciformes LISTING eu_listed for genus Cacatua - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 625) TaxonConcept Psittaciformes LISTING eu_listed for species Cacatua goffiniana - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 626) TaxonConcept Psittaciformes LISTING eu_listed for species Cacatua ducorpsi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 627) TaxonConcept Psittaciformes LISTING eu_listed for subspecies Amazona festiva festiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 628) TaxonConcept Psittaciformes LISTING cites_show for species Agapornis roseicollis (DEL II) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 629) TaxonConcept Psittaciformes LISTING cites_show for species Amazona aestiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 630) TaxonConcept Psittaciformes LISTING cites_show for species Psittacula krameri (DEL III) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 631) TaxonConcept Psittaciformes LISTING cites_status for species Agapornis roseicollis (DEL II) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 632) TaxonConcept Psittaciformes LISTING cites_status for species Psittacula krameri (DEL III) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 633) TaxonConcept Psittaciformes LISTING show_in_checklist_ac for subspecies Amazona festiva festiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 634) TaxonConcept Psittaciformes LISTING show_in_species_plus_ac for subspecies Amazona festiva festiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 635) TaxonConcept Psittaciformes LISTING show_in_species_plus for subspecies Amazona festiva festiva - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/psittaciformes.rb:254:in `block (2 levels) in ' - - 636) TaxonConcept create when has accepted parent overnight calculations - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/taxon_concept/synonyms_spec.rb:90:in `block (5 levels) in ' - - 637) TaxonConcept Tapiridae TAXONOMY full_name for family Tapiridae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 638) TaxonConcept Tapiridae TAXONOMY rank for family Tapiridae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 639) TaxonConcept Tapiridae TAXONOMY ancestors order - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 640) TaxonConcept Tapiridae TAXONOMY ancestors class - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 641) TaxonConcept Tapiridae LISTING cites_listing for family Tapiridae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 642) TaxonConcept Tapiridae LISTING cites_listing for species Tapirus terrestris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 643) TaxonConcept Tapiridae LISTING eu_listing for family Tapiridae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 644) TaxonConcept Tapiridae LISTING eu_listing for species Tapirus terrestris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 645) TaxonConcept Tapiridae LISTING cites_listed for family Tapiridae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 646) TaxonConcept Tapiridae LISTING cites_listed for genus Tapirus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 647) TaxonConcept Tapiridae LISTING cites_listed for species Tapirus terrestris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 648) TaxonConcept Tapiridae LISTING eu_listed for family Tapiridae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 649) TaxonConcept Tapiridae LISTING eu_listed for genus Tapirus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 650) TaxonConcept Tapiridae LISTING eu_listed for species Tapirus terrestris - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/tapiridae.rb:47:in `block (2 levels) in ' - - 651) TaxonConcept create when has accepted parent overnight calculations - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/taxon_concept/trade_names_spec.rb:90:in `block (5 levels) in ' - - 652) TaxonConcept Uroplatus REFERENCES cites_accepted for genus Uroplatus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 653) TaxonConcept Uroplatus REFERENCES cites_accepted for species Uroplatus alluaudi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 654) TaxonConcept Uroplatus REFERENCES cites_accepted for species Uroplatus giganteus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 655) TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for family Gekkonidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 656) TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for genus Uroplatus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 657) TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for species Uroplatus alluaudi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 658) TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for species Uroplatus giganteus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 659) TaxonConcept Uroplatus LISTING cites_listing for genus Uroplatus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 660) TaxonConcept Uroplatus LISTING cites_listing for species Uroplatus giganteus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 661) TaxonConcept Uroplatus LISTING eu_listing for genus Uroplatus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 662) TaxonConcept Uroplatus LISTING eu_listing for species Uroplatus giganteus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 663) TaxonConcept Uroplatus LISTING cites_listed for family Gekkonidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 664) TaxonConcept Uroplatus LISTING cites_listed for genus Uroplatus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 665) TaxonConcept Uroplatus LISTING cites_listed for species Uroplatus giganteus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 666) TaxonConcept Uroplatus LISTING eu_listed for family Gekkonidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 667) TaxonConcept Uroplatus LISTING eu_listed for genus Uroplatus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 668) TaxonConcept Uroplatus LISTING eu_listed for species Uroplatus giganteus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/uroplatus.rb:54:in `block (2 levels) in ' - - 669) TaxonConcept Varanidae REFERENCES cites_accepted for species Varanus bengalensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 670) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for order Sauria - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 671) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for family Varanidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 672) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bengalensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 673) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bushi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 674) TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bushi - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 675) TaxonConcept Varanidae LISTING cites_listing for genus Varanus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 676) TaxonConcept Varanidae LISTING cites_listing for species Varanus bengalensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 677) TaxonConcept Varanidae LISTING eu_listing for genus Varanus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 678) TaxonConcept Varanidae LISTING eu_listing for species Varanus bengalensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 679) TaxonConcept Varanidae LISTING cites_listed for family Varanidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 680) TaxonConcept Varanidae LISTING cites_listed for genus Varanus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 681) TaxonConcept Varanidae LISTING cites_listed for species Varanus bengalensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 682) TaxonConcept Varanidae LISTING eu_listed for family Varanidae - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 683) TaxonConcept Varanidae LISTING eu_listed for genus Varanus - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 684) TaxonConcept Varanidae LISTING eu_listed for species Varanus bengalensis - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/varanidae.rb:80:in `block (2 levels) in ' - - 685) Trade::AnnualReportUpload valid? when uploaded file as exporter with exporter column headers - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 686) Trade::AnnualReportUpload valid? when uploaded file as importer with exporter column headers - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 687) Trade::AnnualReportUpload valid? when uploaded file as importer with importer column headers - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 688) Trade::AnnualReportUpload valid? when uploaded file as exporter with importer column headers - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 689) Trade::AnnualReportUpload validation_errors - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 690) Trade::AnnualReportUpload create when blank lines in import file - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 691) Trade::AnnualReportUpload destroy - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 692) Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal importer (E) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 693) Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal importer (I) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 694) Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal country of origin - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 695) Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 696) Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 697) Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 698) Trade::Filter results when searching by taxon concepts ids in the public interface at FAMILY rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 699) Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 700) Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 701) Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 702) Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 703) Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 704) Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 705) Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 706) Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 707) Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 708) Trade::Filter results when searching by taxon concepts ids when status N shipments present - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 709) Trade::Filter results when searching by taxon concepts ids when subspecies shipments present - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 710) Trade::Filter results when searching by taxon concepts ids when synonym subspecies shipments present when searching by taxonomic parent - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 711) Trade::Filter results when searching by taxon concepts ids when synonym subspecies shipments present when searching by accepted name - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:7:in `block (4 levels) in ' - - 712) Trade::Filter results when searching by reported taxon concepts ids when trade names shipments present - Failure/Error: before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/filter_spec.rb:108:in `block (4 levels) in ' - - 713) Trade::InclusionValidationRule matching_records_for_aru_and_error - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 714) Trade::InclusionValidationRule refresh_errors_if_needed when no updates - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 715) Trade::InclusionValidationRule refresh_errors_if_needed when updates and error fixed for all records error record is destroyed - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 716) Trade::InclusionValidationRule refresh_errors_if_needed when updates and error fixed for some records error record is updated to reflect new error_count - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 717) Trade::InclusionValidationRule validation_errors_for_aru species name may have extra whitespace between name segments - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 718) Trade::InclusionValidationRule validation_errors_for_aru trading partner should be a valid iso code - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 719) Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with unit as defined by term_trade_codes_pairs table when invalid combination - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 720) Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with unit as defined by term_trade_codes_pairs table when required unit blank - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 721) Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with purpose as defined by term_trade_codes_pairs table - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 722) Trade::InclusionValidationRule validation_errors_for_aru taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table when accepted name - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 723) Trade::InclusionValidationRule validation_errors_for_aru taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table when hybrid - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 724) Trade::InclusionValidationRule validation_errors_for_aru when W source and country of origin blank and exporter doesn't match distribution (E) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 725) Trade::InclusionValidationRule validation_errors_for_aru when W source and country of origin blank and exporter doesn't match distribution (I) - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 726) Trade::InclusionValidationRule validation_errors_for_aru when W source and country XX - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 727) Trade::InclusionValidationRule validation_errors_for_aru when W source and country doesn't match distribution of higher taxa - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 728) Trade::InclusionValidationRule validation_errors_for_aru when invalid scope specified - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 729) Trade::SandboxFilter results - Failure/Error: aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_34', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_34', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/models/trade/sandbox_filter_spec.rb:5:in `block (2 levels) in ' - # ./spec/models/trade/sandbox_filter_spec.rb:9:in `block (2 levels) in ' - # ./spec/models/trade/sandbox_filter_spec.rb:23:in `block (2 levels) in ' - - 730) Trade::SandboxFilter results - Failure/Error: aru.save(:validate => false) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function resolve_taxa_in_sandbox(unknown, unknown) does not exist - LINE 1: SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_35', NU... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM resolve_taxa_in_sandbox('trade_sandbox_35', NULL) - # ./app/models/trade/sandbox_template.rb:85:in `sanitize' - # ./app/models/trade/sandbox.rb:14:in `copy' - # ./app/models/trade/annual_report_upload.rb:36:in `copy_to_sandbox' - # ./app/models/trade/annual_report_upload_observer.rb:4:in `after_create' - # ./spec/models/trade/sandbox_filter_spec.rb:5:in `block (2 levels) in ' - # ./spec/models/trade/sandbox_filter_spec.rb:9:in `block (2 levels) in ' - # ./spec/models/trade/sandbox_filter_spec.rb:23:in `block (2 levels) in ' - - 731) Trade::Sandbox destroy - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 732) Trade::SandboxTemplate update - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 733) Trade::SandboxTemplate update_batch - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 734) Trade::InclusionValidationRule validation_errors when W source and country of origin matches distribution - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/pecari_tajacu.rb:109:in `block (2 levels) in ' - - 735) Trade::InclusionValidationRule validation_errors when W source and country of origin blank - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::RecordInvalid: - Validation failed: Name has already been taken - # ./spec/support/sapi_helpers.rb:4:in `cites_eu' - # ./spec/support/sapi_helpers.rb:303:in `block (3 levels) in ' - # ./spec/support/sapi_helpers.rb:243:in `cites_eu_animalia' - # ./spec/support/sapi_helpers.rb:253:in `cites_eu_chordata' - # ./spec/support/sapi_helpers.rb:159:in `cites_eu_mammalia' - # ./spec/shared/pecari_tajacu.rb:51:in `block (2 levels) in ' - - 736) Trade::Shipment secondary validations when species name + appendix + year invalid - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/shipment_spec.rb:113:in `block (4 levels) in ' - - 737) Trade::Shipment secondary validations when species name + appendix + year invalid - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/shipment_spec.rb:113:in `block (4 levels) in ' - - 738) Trade::Shipment secondary validations when species name + appendix + year valid - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/shipment_spec.rb:113:in `block (4 levels) in ' - - 739) Trade::Shipment secondary validations when species name + appendix N + year valid - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/shipment_spec.rb:153:in `block (4 levels) in ' - - 740) Trade::Shipment secondary validations when species name + appendix N + year not CITES listed and not EU listed - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/shipment_spec.rb:174:in `block (4 levels) in ' - - 741) Trade::Shipment secondary validations when species name + source code invalid - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/shipment_spec.rb:434:in `block (4 levels) in ' - - 742) Trade::Shipment secondary validations when species name + source code valid - Failure/Error: Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/models/trade/shipment_spec.rb:434:in `block (4 levels) in ' - - 743) Trade::ShipmentsComptabExport total_cnt when internal - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 5: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", importer_quantity AS "Importer reported quantity", exporter_quantity AS "Exporter reported quantity", term_name_en AS "Term", unit_name_en AS "Unit", purpose AS "Purpose", source AS "Source" FROM (SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - taxon_concept_class_name AS class_name, - taxon_concept_order_name AS order_name, - taxon_concept_family_name AS family_name, - taxon_concept_genus_name AS genus_name, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - country_of_origin_id, - countries_of_origin.iso_code2 AS country_of_origin, - TRIM_DECIMAL_ZERO( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END) - ) AS importer_quantity, - TRIM_DECIMAL_ZERO( - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) AS exporter_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr, - purpose_id, - purposes.code AS purpose, - source_id, - sources.code AS source - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_family_name, - taxon_concept_id, - taxon_concept_name_status, - taxon_concept_full_name, - class_name, - order_name, - family_name, - genus_name, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - country_of_origin_id, - countries_of_origin.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr, - purpose_id, - purposes.code, - source_id, - sources.code - ORDER BY - year ASC, - appendix, - taxon_concept_family_name, - taxon_concept_full_name, - importers.iso_code2, - exporters.iso_code2, - countries_of_origin.iso_code2, - terms.code, - units.code, - purposes.code, - sources.code) subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_comptab_export_spec.rb:12:in `block (4 levels) in ' - - 744) Trade::ShipmentsComptabExport total_cnt when public - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 5: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", importer_quantity AS "Importer reported quantity", exporter_quantity AS "Exporter reported quantity", term_name_en AS "Term", unit_name_en AS "Unit", purpose AS "Purpose", source AS "Source" FROM (SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - taxon_concept_class_name AS class_name, - taxon_concept_order_name AS order_name, - taxon_concept_family_name AS family_name, - taxon_concept_genus_name AS genus_name, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - country_of_origin_id, - countries_of_origin.iso_code2 AS country_of_origin, - TRIM_DECIMAL_ZERO( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END) - ) AS importer_quantity, - TRIM_DECIMAL_ZERO( - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) AS exporter_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr, - purpose_id, - purposes.code AS purpose, - source_id, - sources.code AS source - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_family_name, - taxon_concept_id, - taxon_concept_name_status, - taxon_concept_full_name, - class_name, - order_name, - family_name, - genus_name, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - country_of_origin_id, - countries_of_origin.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr, - purpose_id, - purposes.code, - source_id, - sources.code - ORDER BY - year ASC, - appendix, - taxon_concept_family_name, - taxon_concept_full_name, - importers.iso_code2, - exporters.iso_code2, - countries_of_origin.iso_code2, - terms.code, - units.code, - purposes.code, - sources.code) subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_comptab_export_spec.rb:16:in `block (4 levels) in ' - - 745) Trade::ShipmentsComptabExport query when internal - Failure/Error: specify { subject.query.ntuples.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 5: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", importer_quantity AS "Importer reported quantity", exporter_quantity AS "Exporter reported quantity", term_name_en AS "Term", unit_name_en AS "Unit", purpose AS "Purpose", source AS "Source" FROM (SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - taxon_concept_class_name AS class_name, - taxon_concept_order_name AS order_name, - taxon_concept_family_name AS family_name, - taxon_concept_genus_name AS genus_name, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - country_of_origin_id, - countries_of_origin.iso_code2 AS country_of_origin, - TRIM_DECIMAL_ZERO( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END) - ) AS importer_quantity, - TRIM_DECIMAL_ZERO( - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) AS exporter_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr, - purpose_id, - purposes.code AS purpose, - source_id, - sources.code AS source - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_family_name, - taxon_concept_id, - taxon_concept_name_status, - taxon_concept_full_name, - class_name, - order_name, - family_name, - genus_name, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - country_of_origin_id, - countries_of_origin.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr, - purpose_id, - purposes.code, - source_id, - sources.code - ORDER BY - year ASC, - appendix, - taxon_concept_family_name, - taxon_concept_full_name, - importers.iso_code2, - exporters.iso_code2, - countries_of_origin.iso_code2, - terms.code, - units.code, - purposes.code, - sources.code) subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_comptab_export_spec.rb:23:in `block (4 levels) in ' - - 746) Trade::ShipmentsComptabExport query when public - Failure/Error: specify { subject.query.ntuples.should == 3 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 5: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", importer_quantity AS "Importer reported quantity", exporter_quantity AS "Exporter reported quantity", term_name_en AS "Term", unit_name_en AS "Unit", purpose AS "Purpose", source AS "Source" FROM (SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - taxon_concept_class_name AS class_name, - taxon_concept_order_name AS order_name, - taxon_concept_family_name AS family_name, - taxon_concept_genus_name AS genus_name, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - country_of_origin_id, - countries_of_origin.iso_code2 AS country_of_origin, - TRIM_DECIMAL_ZERO( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END) - ) AS importer_quantity, - TRIM_DECIMAL_ZERO( - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) AS exporter_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr, - purpose_id, - purposes.code AS purpose, - source_id, - sources.code AS source - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_family_name, - taxon_concept_id, - taxon_concept_name_status, - taxon_concept_full_name, - class_name, - order_name, - family_name, - genus_name, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - country_of_origin_id, - countries_of_origin.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr, - purpose_id, - purposes.code, - source_id, - sources.code - ORDER BY - year ASC, - appendix, - taxon_concept_family_name, - taxon_concept_full_name, - importers.iso_code2, - exporters.iso_code2, - countries_of_origin.iso_code2, - terms.code, - units.code, - purposes.code, - sources.code) subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_comptab_export_spec.rb:27:in `block (4 levels) in ' - - 747) Trade::ShipmentsExport query when internal - Failure/Error: specify { subject.query.ntuples.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 6: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT id AS "ID", year AS "Year", appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", class_name AS "Class", order_name AS "Order", family_name AS "Family", genus_name AS "Genus", reported_taxon AS "Reported Taxon", reported_taxon_concept_id AS "Reported Taxon ID", term_name_en AS "Term", quantity AS "Quantity", unit_name_en AS "Unit", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", purpose AS "Purpose", source AS "Source", reporter_type AS "Reporter Type", import_permit_number AS "Import Permit", export_permit_number AS "Export Permit", origin_permit_number AS "Origin Permit", legacy_shipment_number AS "Legacy Shipment No", created_by AS "Created by", updated_by AS "Updated by" FROM (SELECT - shipments.id, - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - reported_taxon_concept_id, - full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_concept_name_status) AS reported_taxon, - taxon_concept_class_name AS class_name, - taxon_concept_order_name AS order_name, - taxon_concept_family_name AS family_name, - taxon_concept_genus_name AS genus_name, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - reported_by_exporter, - CASE - WHEN reported_by_exporter THEN 'E' - ELSE 'I' - END AS reporter_type, - country_of_origin_id, - countries_of_origin.iso_code2 AS country_of_origin, - CASE WHEN quantity = 0 THEN NULL ELSE quantity END, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - purpose_id, - purposes.code AS purpose, - source_id, - sources.code AS source, - import_permit_number, - export_permit_number, - origin_permit_number, - import_permits_ids, - export_permits_ids, - origin_permits_ids, - legacy_shipment_number, - uc.name AS created_by, - uu.name AS updated_by - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - LEFT JOIN ranks AS reported_taxon_ranks - ON reported_taxon_ranks.id = reported_taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - LEFT JOIN users as uc - ON shipments.created_by_id = uc.id - LEFT JOIN users as uu - ON shipments.updated_by_id = uu.id) subquery - # ./app/models/trade/shipments_export.rb:40:in `query' - # ./spec/models/trade/shipments_export_spec.rb:23:in `block (4 levels) in ' - - 748) Trade::ShipmentsExport query when public - Failure/Error: specify { subject.query.ntuples.should == 3 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 6: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT year AS "Year", appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", quantity AS "Quantity", unit_name_en AS "Unit", importer AS "Importer", exporter AS "Exporter", country_of_origin AS "Origin", purpose AS "Purpose", source AS "Source" FROM (SELECT - shipments.id, - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - reported_taxon_concept_id, - full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_concept_name_status) AS reported_taxon, - taxon_concept_class_name AS class_name, - taxon_concept_order_name AS order_name, - taxon_concept_family_name AS family_name, - taxon_concept_genus_name AS genus_name, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - reported_by_exporter, - CASE - WHEN reported_by_exporter THEN 'E' - ELSE 'I' - END AS reporter_type, - country_of_origin_id, - countries_of_origin.iso_code2 AS country_of_origin, - CASE WHEN quantity = 0 THEN NULL ELSE quantity END, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - purpose_id, - purposes.code AS purpose, - source_id, - sources.code AS source, - import_permit_number, - export_permit_number, - origin_permit_number, - import_permits_ids, - export_permits_ids, - origin_permits_ids, - legacy_shipment_number, - uc.name AS created_by, - uu.name AS updated_by - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - LEFT JOIN ranks AS reported_taxon_ranks - ON reported_taxon_ranks.id = reported_taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - LEFT JOIN users as uc - ON shipments.created_by_id = uc.id - LEFT JOIN users as uu - ON shipments.updated_by_id = uu.id) subquery - # ./app/models/trade/shipments_export.rb:40:in `query' - # ./spec/models/trade/shipments_export_spec.rb:27:in `block (4 levels) in ' - - 749) Trade::ShipmentsGrossExportsExport total_cnt when internal - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8 - : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_gross_exports_export_spec.rb:12:in `block (4 levels) in ' - - 750) Trade::ShipmentsGrossExportsExport total_cnt when public - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7 - : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_gross_exports_export_spec.rb:16:in `block (4 levels) in ' - - 751) Trade::ShipmentsGrossExportsExport query when internal - Failure/Error: specify { subject.query.ntuples.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8 - : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_gross_exports_export_spec.rb:23:in `block (4 levels) in ' - - 752) Trade::ShipmentsGrossExportsExport query when public - Failure/Error: specify { subject.query.ntuples.should == 3 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7 - : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_gross_exports_export_spec.rb:27:in `block (4 levels) in ' - - 753) Trade::ShipmentsGrossImportsExport total_cnt when internal - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8 - : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_gross_imports_export_spec.rb:12:in `block (4 levels) in ' - - 754) Trade::ShipmentsGrossImportsExport total_cnt when public - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7 - : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_gross_imports_export_spec.rb:16:in `block (4 levels) in ' - - 755) Trade::ShipmentsGrossImportsExport query when internal - Failure/Error: specify { subject.query.ntuples.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8 - : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_gross_imports_export_spec.rb:23:in `block (4 levels) in ' - - 756) Trade::ShipmentsGrossImportsExport query when public - Failure/Error: specify { subject.query.ntuples.should == 3 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 8: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7 - : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_gross_imports_export_spec.rb:27:in `block (4 levels) in ' - - 757) Trade::ShipmentsNetExportsExport total_cnt when internal - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - exports.year, - exports.appendix, - exports.taxon_concept_id, - exports.taxon, - exports.term_id, - exports.term, - exports.term_name_en, - exports.term_name_es, - exports.term_name_fr, - exports.unit_id, - exports.unit, - exports.unit_name_en, - exports.unit_name_es, - exports.unit_name_fr, - exports.country_id, - exports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM exports - LEFT JOIN imports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.year = imports.year - AND exports.country_id = imports.country_id - WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8 - : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - exports.year, - exports.appendix, - exports.taxon_concept_id, - exports.taxon, - exports.term_id, - exports.term, - exports.term_name_en, - exports.term_name_es, - exports.term_name_fr, - exports.unit_id, - exports.unit, - exports.unit_name_en, - exports.unit_name_es, - exports.unit_name_fr, - exports.country_id, - exports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM exports - LEFT JOIN imports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.year = imports.year - AND exports.country_id = imports.country_id - WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_net_exports_export_spec.rb:12:in `block (4 levels) in ' - - 758) Trade::ShipmentsNetExportsExport total_cnt when public - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - exports.year, - exports.appendix, - exports.taxon_concept_id, - exports.taxon, - exports.term_id, - exports.term, - exports.term_name_en, - exports.term_name_es, - exports.term_name_fr, - exports.unit_id, - exports.unit, - exports.unit_name_en, - exports.unit_name_es, - exports.unit_name_fr, - exports.country_id, - exports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM exports - LEFT JOIN imports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.year = imports.year - AND exports.country_id = imports.country_id - WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7 - : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - exports.year, - exports.appendix, - exports.taxon_concept_id, - exports.taxon, - exports.term_id, - exports.term, - exports.term_name_en, - exports.term_name_es, - exports.term_name_fr, - exports.unit_id, - exports.unit, - exports.unit_name_en, - exports.unit_name_es, - exports.unit_name_fr, - exports.country_id, - exports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM exports - LEFT JOIN imports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.year = imports.year - AND exports.country_id = imports.country_id - WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_net_exports_export_spec.rb:16:in `block (4 levels) in ' - - 759) Trade::ShipmentsNetExportsExport query when internal - Failure/Error: specify { subject.query.ntuples.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - exports.year, - exports.appendix, - exports.taxon_concept_id, - exports.taxon, - exports.term_id, - exports.term, - exports.term_name_en, - exports.term_name_es, - exports.term_name_fr, - exports.unit_id, - exports.unit, - exports.unit_name_en, - exports.unit_name_es, - exports.unit_name_fr, - exports.country_id, - exports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM exports - LEFT JOIN imports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.year = imports.year - AND exports.country_id = imports.country_id - WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8 - : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - exports.year, - exports.appendix, - exports.taxon_concept_id, - exports.taxon, - exports.term_id, - exports.term, - exports.term_name_en, - exports.term_name_es, - exports.term_name_fr, - exports.unit_id, - exports.unit, - exports.unit_name_en, - exports.unit_name_es, - exports.unit_name_fr, - exports.country_id, - exports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM exports - LEFT JOIN imports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.year = imports.year - AND exports.country_id = imports.country_id - WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_net_exports_export_spec.rb:23:in `block (4 levels) in ' - - 760) Trade::ShipmentsNetExportsExport query when public - Failure/Error: specify { subject.query.ntuples.should == 3 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - exports.year, - exports.appendix, - exports.taxon_concept_id, - exports.taxon, - exports.term_id, - exports.term, - exports.term_name_en, - exports.term_name_es, - exports.term_name_fr, - exports.unit_id, - exports.unit, - exports.unit_name_en, - exports.unit_name_es, - exports.unit_name_fr, - exports.country_id, - exports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM exports - LEFT JOIN imports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.year = imports.year - AND exports.country_id = imports.country_id - WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7 - : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - exports.year, - exports.appendix, - exports.taxon_concept_id, - exports.taxon, - exports.term_id, - exports.term, - exports.term_name_en, - exports.term_name_es, - exports.term_name_fr, - exports.unit_id, - exports.unit, - exports.unit_name_en, - exports.unit_name_es, - exports.unit_name_fr, - exports.country_id, - exports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - THEN exports.gross_quantity - COALESCE(imports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM exports - LEFT JOIN imports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.year = imports.year - AND exports.country_id = imports.country_id - WHERE (exports.gross_quantity - COALESCE(imports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_net_exports_export_spec.rb:27:in `block (4 levels) in ' - - 761) Trade::ShipmentsNetImportsExport total_cnt when internal - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - imports.year, - imports.appendix, - imports.taxon_concept_id, - imports.taxon, - imports.term_id, - imports.term, - imports.term_name_en, - imports.term_name_es, - imports.term_name_fr, - imports.unit_id, - imports.unit, - imports.unit_name_en, - imports.unit_name_es, - imports.unit_name_fr, - imports.country_id, - imports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM imports - LEFT JOIN exports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.country_id = imports.country_id - WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8 - : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - imports.year, - imports.appendix, - imports.taxon_concept_id, - imports.taxon, - imports.term_id, - imports.term, - imports.term_name_en, - imports.term_name_es, - imports.term_name_fr, - imports.unit_id, - imports.unit, - imports.unit_name_en, - imports.unit_name_es, - imports.unit_name_fr, - imports.country_id, - imports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM imports - LEFT JOIN exports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.country_id = imports.country_id - WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_net_imports_export_spec.rb:12:in `block (4 levels) in ' - - 762) Trade::ShipmentsNetImportsExport total_cnt when public - Failure/Error: specify { subject.total_cnt.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - imports.year, - imports.appendix, - imports.taxon_concept_id, - imports.taxon, - imports.term_id, - imports.term, - imports.term_name_en, - imports.term_name_es, - imports.term_name_fr, - imports.unit_id, - imports.unit, - imports.unit_name_en, - imports.unit_name_es, - imports.unit_name_fr, - imports.country_id, - imports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM imports - LEFT JOIN exports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.country_id = imports.country_id - WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7 - : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024)) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - imports.year, - imports.appendix, - imports.taxon_concept_id, - imports.taxon, - imports.term_id, - imports.term, - imports.term_name_en, - imports.term_name_es, - imports.term_name_fr, - imports.unit_id, - imports.unit, - imports.unit_name_en, - imports.unit_name_es, - imports.unit_name_fr, - imports.country_id, - imports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM imports - LEFT JOIN exports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.country_id = imports.country_id - WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:5:in `total_cnt' - # ./spec/models/trade/shipments_net_imports_export_spec.rb:16:in `block (4 levels) in ' - - 763) Trade::ShipmentsNetImportsExport query when internal - Failure/Error: specify { subject.query.ntuples.should == 4 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - imports.year, - imports.appendix, - imports.taxon_concept_id, - imports.taxon, - imports.term_id, - imports.term, - imports.term_name_en, - imports.term_name_es, - imports.term_name_fr, - imports.unit_id, - imports.unit, - imports.unit_name_en, - imports.unit_name_es, - imports.unit_name_fr, - imports.country_id, - imports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM imports - LEFT JOIN exports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.country_id = imports.country_id - WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8 - : SELECT appendix AS "App.", taxon AS "Taxon", taxon_concept_id AS "Taxon ID", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon_concept_id, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 4 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - imports.year, - imports.appendix, - imports.taxon_concept_id, - imports.taxon, - imports.term_id, - imports.term, - imports.term_name_en, - imports.term_name_es, - imports.term_name_fr, - imports.unit_id, - imports.unit, - imports.unit_name_en, - imports.unit_name_es, - imports.unit_name_fr, - imports.country_id, - imports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM imports - LEFT JOIN exports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.country_id = imports.country_id - WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 8', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon_concept_id INT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_net_imports_export_spec.rb:23:in `block (4 levels) in ' - - 764) Trade::ShipmentsNetImportsExport query when public - Failure/Error: specify { subject.query.ntuples.should == 3 } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function full_name_with_spp(character varying, character varying, character varying) does not exist - LINE 9: full_name_with_spp(ranks.name, taxon_concept_full_name... - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - QUERY: SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - imports.year, - imports.appendix, - imports.taxon_concept_id, - imports.taxon, - imports.term_id, - imports.term, - imports.term_name_en, - imports.term_name_es, - imports.term_name_fr, - imports.unit_id, - imports.unit, - imports.unit_name_en, - imports.unit_name_es, - imports.unit_name_fr, - imports.country_id, - imports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM imports - LEFT JOIN exports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.country_id = imports.country_id - WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7 - : SELECT appendix AS "App.", taxon AS "Taxon", term_name_en AS "Term", unit_name_en AS "Unit", country AS "Country", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024" FROM ( SELECT * FROM CROSSTAB('SELECT ARRAY[appendix, taxon, term_name_en, unit_name_en, country], - appendix, taxon, term_name_en, unit_name_en, country, year, gross_quantity - FROM (WITH exports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id AS country_id, - exporter AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - exporter_id, - exporter - ORDER BY - appendix, - taxon, - term, - unit, - country - ), imports AS ( - WITH gross_net_subquery AS ( - SELECT - year, - appendix, - taxon_concept_id, - full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon, - importer_id, - importers.iso_code2 AS importer, - exporter_id, - exporters.iso_code2 AS exporter, - TRIM_DECIMAL_ZERO( - GREATEST( - SUM(CASE WHEN reported_by_exporter THEN NULL ELSE quantity END), - SUM(CASE WHEN reported_by_exporter THEN quantity ELSE NULL END) - ) - ) AS gross_quantity, - term_id, - terms.code AS term, - terms.name_en AS term_name_en, - terms.name_es AS term_name_es, - terms.name_fr AS term_name_fr, - unit_id, - units.code AS unit, - units.name_en AS unit_name_en, - units.name_es AS unit_name_es, - units.name_fr AS unit_name_fr - FROM (SELECT "trade_shipments".* FROM trade_shipments_with_taxa_view trade_shipments WHERE (year >= 1975 AND year <= 2024) LIMIT 3 OFFSET 0) shipments - JOIN ranks - ON ranks.id = taxon_concept_rank_id - JOIN geo_entities importers - ON importers.id = importer_id - JOIN geo_entities exporters - ON exporters.id = exporter_id - LEFT JOIN geo_entities countries_of_origin - ON countries_of_origin.id = country_of_origin_id - LEFT JOIN trade_codes units - ON units.id = unit_id - JOIN trade_codes terms - ON terms.id = term_id - LEFT JOIN trade_codes purposes - ON purposes.id = purpose_id - LEFT JOIN trade_codes sources - ON sources.id = source_id - GROUP BY - year, - appendix, - taxon_concept_id, - taxon_concept_full_name, - taxon_concept_name_status, - ranks.name, - importer_id, - importers.iso_code2, - exporter_id, - exporters.iso_code2, - unit_id, - units.code, - units.name_en, - units.name_es, - units.name_fr, - term_id, - terms.code, - terms.name_en, - terms.name_es, - terms.name_fr - ) - SELECT - year, - appendix, - taxon_concept_id, - taxon, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id AS country_id, - importer AS country, - TRIM_DECIMAL_ZERO( - SUM(gross_quantity) - ) AS gross_quantity - FROM gross_net_subquery - GROUP BY - year, - appendix, - taxon_concept_id, - taxon, - taxon_concept_name_status, - term_id, - term, - term_name_en, - term_name_es, - term_name_fr, - unit_id, - unit, - unit_name_en, - unit_name_es, - unit_name_fr, - importer_id, - importer - ORDER BY - appendix, - taxon, - term, - unit, - country - ) - SELECT - imports.year, - imports.appendix, - imports.taxon_concept_id, - imports.taxon, - imports.term_id, - imports.term, - imports.term_name_en, - imports.term_name_es, - imports.term_name_fr, - imports.unit_id, - imports.unit, - imports.unit_name_en, - imports.unit_name_es, - imports.unit_name_fr, - imports.country_id, - imports.country, - TRIM_DECIMAL_ZERO( - CASE - WHEN (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - THEN imports.gross_quantity - COALESCE(exports.gross_quantity, 0) - ELSE NULL - END - ) AS gross_quantity - FROM imports - LEFT JOIN exports - ON exports.taxon_concept_id = imports.taxon_concept_id - AND exports.appendix = imports.appendix - AND exports.year = imports.year - AND exports.term_id = imports.term_id - AND (exports.unit_id = imports.unit_id OR exports.unit_id IS NULL AND imports.unit_id IS NULL) - AND exports.country_id = imports.country_id - WHERE (imports.gross_quantity - COALESCE(exports.gross_quantity, 0)) > 0 - ORDER BY - appendix, - taxon, - term, - unit, - country) subquery - ORDER BY 1, 7', 'SELECT * FROM UNNEST(ARRAY[1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024])') - AS ct(row_name TEXT[], appendix TEXT, taxon TEXT, term_name_en TEXT, unit_name_en TEXT, country TEXT, "1975" numeric, "1976" numeric, "1977" numeric, "1978" numeric, "1979" numeric, "1980" numeric, "1981" numeric, "1982" numeric, "1983" numeric, "1984" numeric, "1985" numeric, "1986" numeric, "1987" numeric, "1988" numeric, "1989" numeric, "1990" numeric, "1991" numeric, "1992" numeric, "1993" numeric, "1994" numeric, "1995" numeric, "1996" numeric, "1997" numeric, "1998" numeric, "1999" numeric, "2000" numeric, "2001" numeric, "2002" numeric, "2003" numeric, "2004" numeric, "2005" numeric, "2006" numeric, "2007" numeric, "2008" numeric, "2009" numeric, "2010" numeric, "2011" numeric, "2012" numeric, "2013" numeric, "2014" numeric, "2015" numeric, "2016" numeric, "2017" numeric, "2018" numeric, "2019" numeric, "2020" numeric, "2021" numeric, "2022" numeric, "2023" numeric, "2024" numeric) - ) ct_subquery - # ./app/models/trade/shipments_comptab_export.rb:9:in `query' - # ./spec/models/trade/shipments_net_imports_export_spec.rb:27:in `block (4 levels) in ' - - 765) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when split listing - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 766) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when old listing - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 767) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when old listing - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 768) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when appendix N and CITES listed - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 769) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when appendix N and CITES listed - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 770) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when reported under a synonym, but otherwise fine - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 771) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when hybrid - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 772) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when not CITES listed but EU listed - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function rebuild_taxonomy() does not exist - LINE 1: SELECT * FROM rebuild_taxonomy() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM rebuild_taxonomy() - # ./lib/modules/sapi/stored_procedures.rb:93:in `block in run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:91:in `each' - # ./lib/modules/sapi/stored_procedures.rb:91:in `run_procedures' - # ./lib/modules/sapi/stored_procedures.rb:59:in `rebuild_cites_taxonomy_and_listings' - # ./spec/shared/cedrela_montana.rb:27:in `block (2 levels) in ' - - 773) Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when not CITES listed and not EU listed - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::RecordInvalid: - Validation failed: Name has already been taken - # ./spec/support/sapi_helpers.rb:4:in `cites_eu' - # ./spec/support/sapi_helpers.rb:303:in `block (3 levels) in ' - # ./spec/support/sapi_helpers.rb:236:in `cites_eu_plantae' - # ./spec/shared/agave.rb:14:in `block (2 levels) in ' - - 774) Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Animalia, source_code can't be A - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 775) Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Animalia, source_code can't be A - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 776) Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Plantae, source_code can't be C or R - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 777) Trade::ValidationRule matching_records_for_aru_and_error - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 778) Trade::ValidationRule refresh_errors_if_needed when no updates - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 779) Trade::ValidationRule refresh_errors_if_needed when updates and error fixed for all records error record is destroyed - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 780) Trade::ValidationRule refresh_errors_if_needed when updates and error fixed for some records error record is updated to reflect new error_count - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 781) Trade::ValidationRule Trade::PresenceValidationRule validation_errors_for_aru trading_partner should not be blank - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 782) Trade::ValidationRule Trade::NumericalityValidationRule validation_errors_for_aru quantity should be a number - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 783) Trade::ValidationRule Trade::FormatValidationRule validation_errors_for_aru year should be a 4 digit value - Failure/Error: Unable to find matching line from backtrace - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function drop_trade_sandboxes() does not exist - LINE 1: SELECT * FROM drop_trade_sandboxes() - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM drop_trade_sandboxes() - # ./spec/spec_helper.rb:69:in `block (2 levels) in ' - - 784) EuRegulationActivationWorker Set new EU regulation to true - Failure/Error: EventListingChangesCopyWorker.drain - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2441, - 2442 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/eu_regulation_activation_worker_spec.rb:28:in `block (3 levels) in ' - - 785) EuRegulationActivationWorker Set new EU regulation to true - Failure/Error: EventListingChangesCopyWorker.drain - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2443, - 2444 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/eu_regulation_activation_worker_spec.rb:28:in `block (3 levels) in ' - - 786) EuRegulationActivationWorker Set new EU regulation to true Set old EU regulation to false - Failure/Error: EventListingChangesCopyWorker.drain - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2445, - 2446 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/eu_regulation_activation_worker_spec.rb:28:in `block (3 levels) in ' - - 787) EuRegulationActivationWorker Set new EU regulation to true Set old EU regulation to false - Failure/Error: EventListingChangesCopyWorker.drain - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2447, - 2448 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/eu_regulation_activation_worker_spec.rb:28:in `block (3 levels) in ' - - 788) EventListingChangesCopyWorker when copy into non-current regulation - Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2449, - 2450 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/event_listing_changes_copy_worker_spec.rb:41:in `block (3 levels) in ' - - 789) EventListingChangesCopyWorker when copy into non-current regulation - Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2451, - 2452 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/event_listing_changes_copy_worker_spec.rb:41:in `block (3 levels) in ' - - 790) EventListingChangesCopyWorker when copy into current regulation - Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2453, - 2454 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/event_listing_changes_copy_worker_spec.rb:47:in `block (3 levels) in ' - - 791) EventListingChangesCopyWorker when copy into current regulation - Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2455, - 2456 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/event_listing_changes_copy_worker_spec.rb:47:in `block (3 levels) in ' - - 792) EventListingChangesCopyWorker when exclusion - Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2457, - 2458 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/event_listing_changes_copy_worker_spec.rb:69:in `block (3 levels) in ' - - 793) EventListingChangesCopyWorker when exclusion - Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2459, - 2460 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/event_listing_changes_copy_worker_spec.rb:69:in `block (3 levels) in ' - - 794) EventListingChangesCopyWorker when exclusion - Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2461, - 2462 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/event_listing_changes_copy_worker_spec.rb:69:in `block (3 levels) in ' - - 795) EventListingChangesCopyWorker when exclusion - Failure/Error: before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_listing_changes_across_events(integer, integer) does not exist - LINE 1: SELECT * FROM copy_listing_changes_across_events( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_listing_changes_across_events( - 2463, - 2464 - ) - # ./app/workers/event_listing_changes_copy_worker.rb:6:in `perform' - # ./spec/workers/event_listing_changes_copy_worker_spec.rb:69:in `block (3 levels) in ' - - 796) QuotasCopyWorker Copy single quota, for a given year - Failure/Error: QuotasCopyWorker.new.perform(job_defaults) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:45:in `block (3 levels) in ' - - 797) QuotasCopyWorker Copy single quota, for a given year - Failure/Error: QuotasCopyWorker.new.perform(job_defaults) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:45:in `block (3 levels) in ' - - 798) QuotasCopyWorker Copy single quota, for a given year - Failure/Error: QuotasCopyWorker.new.perform(job_defaults) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:45:in `block (3 levels) in ' - - 799) QuotasCopyWorker Copy single quota, for a given year - Failure/Error: QuotasCopyWorker.new.perform(job_defaults) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:45:in `block (3 levels) in ' - - 800) QuotasCopyWorker Try to copy quota from wrong year - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2024, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:55:in `block (3 levels) in ' - - 801) QuotasCopyWorker Try to copy quota from wrong year - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2024, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:55:in `block (3 levels) in ' - - 802) QuotasCopyWorker Try to copy quota from wrong year - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2024, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:55:in `block (3 levels) in ' - - 803) QuotasCopyWorker Copy quota when there are no current quotas - Failure/Error: QuotasCopyWorker.new.perform(job_defaults) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:68:in `block (3 levels) in ' - - 804) QuotasCopyWorker Copy quota when there are no current quotas - Failure/Error: QuotasCopyWorker.new.perform(job_defaults) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:68:in `block (3 levels) in ' - - 805) QuotasCopyWorker Copy quota when there are no current quotas - Failure/Error: QuotasCopyWorker.new.perform(job_defaults) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:68:in `block (3 levels) in ' - - 806) QuotasCopyWorker When multiple quotas copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3416]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' - - 807) QuotasCopyWorker When multiple quotas copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3418]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' - - 808) QuotasCopyWorker When multiple quotas copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3420]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' - - 809) QuotasCopyWorker When multiple quotas copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3422]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' - - 810) QuotasCopyWorker When multiple quotas copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3424]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:86:in `block (3 levels) in ' - - 811) QuotasCopyWorker When multiple quotas copy quota for both countries - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3426,3427]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' - - 812) QuotasCopyWorker When multiple quotas copy quota for both countries - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3428,3429]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' - - 813) QuotasCopyWorker When multiple quotas copy quota for both countries - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3430,3431]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' - - 814) QuotasCopyWorker When multiple quotas copy quota for both countries - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3432,3433]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' - - 815) QuotasCopyWorker When multiple quotas copy quota for both countries - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3434,3435]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:108:in `block (3 levels) in ' - - 816) QuotasCopyWorker When multiple quotas don't copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3437]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' - - 817) QuotasCopyWorker When multiple quotas don't copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3439]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' - - 818) QuotasCopyWorker When multiple quotas don't copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3441]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' - - 819) QuotasCopyWorker When multiple quotas don't copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3443]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' - - 820) QuotasCopyWorker When multiple quotas don't copy quota for given country - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[3445]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:130:in `block (3 levels) in ' - - 821) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34866]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' - - 822) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34873]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' - - 823) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34884]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' - - 824) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34901]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' - - 825) QuotasCopyWorker When multiple quotas copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34906]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:151:in `block (3 levels) in ' - - 826) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34916,34923]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' - - 827) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34929,34931]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' - - 828) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34933,34941]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' - - 829) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34950,34957]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' - - 830) QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[34962,34967]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:173:in `block (3 levels) in ' - - 831) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[34975]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' - - 832) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[34984]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' - - 833) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[34991]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' - - 834) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[35002]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' - - 835) QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[35014]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:194:in `block (3 levels) in ' - - 836) QuotasCopyWorker When text to replace passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - 'Caviar Quota Forever', - 'Salmon is my favourite fish', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' - - 837) QuotasCopyWorker When text to replace passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - 'Caviar Quota Forever', - 'Salmon is my favourite fish', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' - - 838) QuotasCopyWorker When text to replace passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - 'Caviar Quota Forever', - 'Salmon is my favourite fish', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' - - 839) QuotasCopyWorker When text to replace passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - 'Caviar Quota Forever', - 'Salmon is my favourite fish', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' - - 840) QuotasCopyWorker When text to replace passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - 'Caviar Quota Forever', - 'Salmon is my favourite fish', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' - - 841) QuotasCopyWorker When text to replace passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - 'Caviar Quota Forever', - 'Salmon is my favourite fish', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' - - 842) QuotasCopyWorker When text to replace passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - 'Caviar Quota Forever', - 'Salmon is my favourite fish', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' - - 843) QuotasCopyWorker When text to replace passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - 'Caviar Quota Forever', - 'Salmon is my favourite fish', - NULL, - '' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:216:in `block (3 levels) in ' - - 844) QuotasCopyWorker When url passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - 'http://myurl.co.uk' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' - - 845) QuotasCopyWorker When url passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - 'http://myurl.co.uk' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' - - 846) QuotasCopyWorker When url passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - 'http://myurl.co.uk' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' - - 847) QuotasCopyWorker When url passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - 'http://myurl.co.uk' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' - - 848) QuotasCopyWorker When url passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - 'http://myurl.co.uk' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' - - 849) QuotasCopyWorker When url passed, should be replaced - Failure/Error: QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) - ActiveRecord::StatementInvalid: - PG::UndefinedFunction: ERROR: function copy_quotas_across_years(integer, unknown, unknown, unknown, integer[], integer[], integer[], integer[], unknown, unknown, unknown, unknown) does not exist - LINE 1: SELECT * FROM copy_quotas_across_years( - ^ - HINT: No function matches the given name and argument types. You might need to add explicit type casts. - : SELECT * FROM copy_quotas_across_years( - 2023, - '2024-01-04', - '2024-01-05', - '2024-01-04', - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - ARRAY[NULL]::integer[], - '', - '', - NULL, - 'http://myurl.co.uk' - ) - # ./app/workers/quotas_copy_worker.rb:22:in `perform' - # ./spec/workers/quotas_copy_worker_spec.rb:243:in `block (3 levels) in ' - -Deprecation Warnings: - -Requiring `rspec/autorun` when running RSpec via the `rspec` command is deprecated. Called from /usr/local/bundle/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:247:in `require'. - -Using `any_instance` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /SAPI/spec/controllers/admin/exports_controller_spec.rb:20:in `block (4 levels) in '. - -Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /SAPI/spec/controllers/admin/change_types_controller_spec.rb:14:in `block (3 levels) in '. - -`failure_message_for_should_not` is deprecated. Use `failure_message_when_negated` instead. Called from /usr/local/bundle/gems/cancan-1.6.10/lib/cancan/matchers.rb:11:in `block in '. - -`failure_message_for_should` is deprecated. Use `failure_message` instead. Called from /usr/local/bundle/gems/cancan-1.6.10/lib/cancan/matchers.rb:7:in `block in '. - - -If you need more of the backtrace for any of these deprecations to -identify where to make the necessary changes, you can configure -`config.raise_errors_for_deprecations!`, and it will turn the -deprecation warnings into errors, giving you the full backtrace. - -5 deprecation warnings total - -Finished in 13 minutes 38 seconds (files took 23.1 seconds to load) -2138 examples, 849 failures, 20 pending - -Failed examples: - -rspec ./spec/controllers/admin/documents_controller_spec.rb:35 # Admin::DocumentsController index GET index search runs a full text search on title -rspec ./spec/controllers/admin/event_documents_controller_spec.rb:22 # Admin::EventDocumentsController ordering POST update_order updates sort index for collection of documents -rspec ./spec/controllers/admin/exports_controller_spec.rb:18 # Admin::ExportsController GET download with data_type=Names all returns taxon concepts names file -rspec ./spec/controllers/admin/exports_controller_spec.rb:31 # Admin::ExportsController GET download with data_type=Names CITES_EU returns CITES_EU taxon concepts names file -rspec ./spec/controllers/admin/exports_controller_spec.rb:44 # Admin::ExportsController GET download with data_type=Names CMS returns CMS taxon concepts names file -rspec ./spec/controllers/admin/exports_controller_spec.rb:62 # Admin::ExportsController GET download with data_type=Distributions all returns taxon concepts distributions file -rspec ./spec/controllers/admin/exports_controller_spec.rb:76 # Admin::ExportsController GET download with data_type=Distributions CITES_EU returns CITES_EU taxon concepts distributions file -rspec ./spec/controllers/admin/exports_controller_spec.rb:90 # Admin::ExportsController GET download with data_type=Distributions CMS returns CMS taxon concepts distributions file -rspec ./spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb:7 # Api::V1::AutoCompleteTaxonConceptsController GET index returns 1 result when searching for species name and filtering for rank SPECIES -rspec ./spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb:14 # Api::V1::AutoCompleteTaxonConceptsController GET index returns 3 results when searching for species name and not filtering by rank -rspec ./spec/controllers/api/document_geo_entities_controller_spec.rb:26 # Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns Poland when searching by wolf -rspec ./spec/controllers/api/document_geo_entities_controller_spec.rb:31 # Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns 0 geo entities when no match for taxon name -rspec ./spec/controllers/api/document_geo_entities_controller_spec.rb:36 # Api::V1::DocumentGeoEntitiesController when searching by taxon concept name returns all geo entities when no taxon name given -rspec ./spec/controllers/api/events_controller_spec.rb:10 # Api::V1::EventsController GET index returns only E-library events most recent first -rspec ./spec/controllers/api/purposes_controller_spec.rb:8 # Api::V1::PurposesController GET index returns purposes -rspec ./spec/controllers/api/sources_controller_spec.rb:8 # Api::V1::SourcesController GET index returns sources -rspec ./spec/controllers/api/taxon_concepts_controller_spec.rb:5 # Api::V1::TaxonConceptsController GET index logs with Ahoy with different parameters -rspec ./spec/controllers/api/terms_controller_spec.rb:8 # Api::V1::TermsController GET index returns terms -rspec ./spec/controllers/api/units_controller_spec.rb:8 # Api::V1::UnitsController GET index returns units -rspec ./spec/controllers/checklist/taxon_concepts_controller_spec.rb:6 # Checklist::TaxonConceptsController XHR GET JSON autocomplete when searching by accepted name returns 1 result -rspec ./spec/controllers/checklist/taxon_concepts_controller_spec.rb:13 # Checklist::TaxonConceptsController XHR GET JSON autocomplete when query blank returns 0 results -rspec ./spec/controllers/cites_trade/exports_controller_spec.rb:14 # CitesTrade::ExportsController GET download comptab returns comptab shipments file -rspec ./spec/controllers/cites_trade/exports_controller_spec.rb:23 # CitesTrade::ExportsController GET download comptab logs download information from public interface to the TradeDataDownload model -rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:28 # CitesTrade::ShipmentsController GET index should return all comptab shipments -rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:32 # CitesTrade::ShipmentsController GET index should return all gross_exports shipments -rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:40 # CitesTrade::ShipmentsController GET index should return genus & species shipments when searching by genus -rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:47 # CitesTrade::ShipmentsController GET index should return family, genus & species shipments when searching by family -rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:54 # CitesTrade::ShipmentsController GET index should return genus shipments when searching by taxon -rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:9 # CitesTrade::ShipmentsController GET index serializer should return comptab export when report_type invalid -rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:15 # CitesTrade::ShipmentsController GET index serializer should return comptab export when report_type = comptab -rspec ./spec/controllers/cites_trade/shipments_controller_spec.rb:21 # CitesTrade::ShipmentsController GET index serializer should return gross net export when report_type = gross_exports -rspec ./spec/controllers/registrations_controller_spec.rb:49 # RegistrationsController when signing up should create an account with the role set to api -rspec ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:35 # Trade::AnnualReportUploadsController GET index should return all annual report uploads -rspec ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:39 # Trade::AnnualReportUploadsController GET index should return annual report uploads in progress -rspec ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:46 # Trade::AnnualReportUploadsController GET show should return success -rspec ./spec/controllers/trade/annual_report_uploads_controller_spec.rb:53 # Trade::AnnualReportUploadsController POST create should return success in jQuery File Upload way -rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:35 # Trade::SandboxShipmentsController PUT update should return success when taxon_name not set -rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:42 # Trade::SandboxShipmentsController PUT update should return success when taxon_name does not exist -rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:52 # Trade::SandboxShipmentsController DELETE destroy should return success -rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:61 # Trade::SandboxShipmentsController POST update_batch should return success -rspec ./spec/controllers/trade/sandbox_shipments_controller_spec.rb:74 # Trade::SandboxShipmentsController POST destroy_batch should return success -rspec ./spec/controllers/trade/shipments_controller_spec.rb:10 # Trade::ShipmentsController GET index should return all shipments -rspec ./spec/controllers/trade/shipments_controller_spec.rb:14 # Trade::ShipmentsController GET index should return genus & species shipments when searching by genus -rspec ./spec/controllers/trade/shipments_controller_spec.rb:19 # Trade::ShipmentsController GET index should return 1 shipment when searching for reporter_type I -rspec ./spec/controllers/trade/shipments_controller_spec.rb:28 # Trade::ShipmentsController PUT update should auto resolve accepted taxon when blank -rspec ./spec/controllers/trade/shipments_controller_spec.rb:35 # Trade::ShipmentsController PUT update should not auto resolve accepted taxon when given -rspec ./spec/controllers/trade/shipments_controller_spec.rb:43 # Trade::ShipmentsController PUT update should delete orphaned permits -rspec ./spec/controllers/trade/shipments_controller_spec.rb:54 # Trade::ShipmentsController POST update_batch should change reporter type from I to E -rspec ./spec/controllers/trade/shipments_controller_spec.rb:71 # Trade::ShipmentsController POST update_batch should change reporter type from E to I -rspec ./spec/controllers/trade/shipments_controller_spec.rb:89 # Trade::ShipmentsController POST update_batch should update year -rspec ./spec/controllers/trade/shipments_controller_spec.rb:106 # Trade::ShipmentsController POST update_batch should auto resolve accepted taxon when blank -rspec ./spec/controllers/trade/shipments_controller_spec.rb:122 # Trade::ShipmentsController POST update_batch should not auto resolve accepted taxon when given -rspec ./spec/controllers/trade/shipments_controller_spec.rb:139 # Trade::ShipmentsController POST update_batch should set permit number to blank and delete orphaned permits -rspec ./spec/controllers/trade/shipments_controller_spec.rb:161 # Trade::ShipmentsController POST destroy_batch should delete 1 shipment -rspec ./spec/controllers/trade/shipments_controller_spec.rb:172 # Trade::ShipmentsController POST destroy_batch should delete 5 shipment -rspec ./spec/controllers/trade/shipments_controller_spec.rb:183 # Trade::ShipmentsController POST destroy_batch should delete 2 shipments -rspec ./spec/controllers/trade/shipments_controller_spec.rb:188 # Trade::ShipmentsController POST destroy_batch should delete 1 shipments -rspec ./spec/controllers/trade/shipments_controller_spec.rb:193 # Trade::ShipmentsController POST destroy_batch should delete all shipments -rspec ./spec/controllers/trade/shipments_controller_spec.rb:198 # Trade::ShipmentsController POST destroy_batch shouldn't delete any shipments -rspec ./spec/controllers/trade/shipments_controller_spec.rb:203 # Trade::ShipmentsController POST destroy_batch should delete 1 shipment -rspec ./spec/controllers/trade/shipments_controller_spec.rb:208 # Trade::ShipmentsController POST destroy_batch should delete 3 shipment -rspec ./spec/controllers/trade/shipments_controller_spec.rb:213 # Trade::ShipmentsController POST destroy_batch should delete 0 shipments -rspec ./spec/controllers/trade/shipments_controller_spec.rb:219 # Trade::ShipmentsController POST destroy_batch should delete 4 shipments -rspec ./spec/controllers/trade/shipments_controller_spec.rb:225 # Trade::ShipmentsController POST destroy_batch should delete orphaned permits -rspec ./spec/controllers/trade/shipments_controller_spec.rb:241 # Trade::ShipmentsController DELETE destroy should delete 1 shipment -rspec ./spec/controllers/trade/shipments_controller_spec.rb:245 # Trade::ShipmentsController DELETE destroy should delete orphaned permits -rspec ./spec/controllers/trade/validation_errors_controller_spec.rb:34 # Trade::ValidationErrorsController PUT update should update is_ignored -rspec ./spec/controllers/trade/validation_errors_controller_spec.rb:45 # Trade::ValidationErrorsController GET show should return success -rspec ./spec/models/api_request_spec.rb:63 # ApiRequest recent_requests -rspec ./spec/models/checklist/annotations_spec.rb:16 # Checklist ann_symbol for species Caiman latirostris -rspec ./spec/models/checklist/annotations_spec.rb:20 # Checklist ann_symbol for species Panax ginseng -rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:14 # Checklist search by cites populations when America -rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:25 # Checklist search by cites populations when Mexico -rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:36 # Checklist search by cites populations when Canada -rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:47 # Checklist search by cites populations when Argentina -rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:58 # Checklist search by cites populations when South America -rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:69 # Checklist search by cites populations when North America -rspec ./spec/models/checklist/appendix_population_and_region_spec.rb:81 # Checklist search by cites populations when North America and Argentina -rspec ./spec/models/checklist/appendix_population_spec.rb:15 # Checklist search by cites populations when Nepal -rspec ./spec/models/checklist/appendix_population_spec.rb:26 # Checklist search by cites populations when Poland -rspec ./spec/models/checklist/appendix_population_spec.rb:40 # Checklist search by cites appendices when App I -rspec ./spec/models/checklist/appendix_population_spec.rb:51 # Checklist search by cites appendices when App II -rspec ./spec/models/checklist/appendix_population_spec.rb:62 # Checklist search by cites appendices when App III -rspec ./spec/models/checklist/appendix_population_spec.rb:78 # Checklist search by cites populations and appendices when Nepal when App I -rspec ./spec/models/checklist/appendix_population_spec.rb:90 # Checklist search by cites populations and appendices when Nepal when App II -rspec ./spec/models/checklist/appendix_population_spec.rb:104 # Checklist search by cites populations and appendices when Poland when App I -rspec ./spec/models/checklist/appendix_population_spec.rb:116 # Checklist search by cites populations and appendices when Poland when App II -rspec ./spec/models/checklist/appendix_population_spec.rb:130 # Checklist search by cites populations and appendices when Poland or Nepal when App I -rspec ./spec/models/checklist/appendix_population_spec.rb:142 # Checklist search by cites populations and appendices when Poland or Nepal when App II -rspec ./spec/models/checklist/appendix_population_spec.rb:156 # Checklist search by cites populations and appendices when App I or II when Poland -rspec ./spec/models/checklist/appendix_population_spec.rb:168 # Checklist search by cites populations and appendices when App I or II when Nepal -rspec ./spec/models/checklist/appendix_spec.rb:14 # Checklist when filtering by appendix I should return Cacatua goffiniana -rspec ./spec/models/checklist/appendix_spec.rb:18 # Checklist when filtering by appendix I should not return Agapornis roseicollis -rspec ./spec/models/checklist/common_names_spec.rb:19 # Checklist when common names displayed should return all English names for Arctocephalus australis: 'South American Fur Seal, Southern Fur Seal' -rspec ./spec/models/checklist/common_names_spec.rb:23 # Checklist when common names displayed should return all Spanish names for Arctocephalus australis: 'Lobo fino sudamericano, Oso marino austral' -rspec ./spec/models/checklist/common_names_spec.rb:27 # Checklist when common names displayed should return all French names for Arctocephalus australis: 'Otarie à fourrure australe' -rspec ./spec/models/checklist/common_names_spec.rb:31 # Checklist when common names displayed should return all English names for Arctocephalus spp.: 'Fur seals, Southern fur seals' -rspec ./spec/models/checklist/common_names_spec.rb:35 # Checklist when common names displayed should return all Spanish names for Arctocephalus spp.: 'Osos marinos' -rspec ./spec/models/checklist/common_names_spec.rb:39 # Checklist when common names displayed should return all French names for Arctocephalus spp.: 'Arctocéphales du sud, Otaries à fourrure, Otaries à fourrure du sud' -rspec ./spec/models/checklist/common_names_spec.rb:43 # Checklist when common names displayed should include a species without any common names defined -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:122 # Checklist::HigherTaxaInjector run when same phylum when two species from different classes -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:139 # Checklist::HigherTaxaInjector run when same phylum when two species from different classes and expand_headers set -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:158 # Checklist::HigherTaxaInjector run when same order when two species from different families -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:171 # Checklist::HigherTaxaInjector run when same order when two species from different families and skip family set -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:188 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:201 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species and skip family set -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:213 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when one species and expand headers set -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:228 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when two species -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:241 # Checklist::HigherTaxaInjector higher_taxa_headers when same genus when species and subspecies -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:256 # Checklist::HigherTaxaInjector higher_taxa_headers when same family when two species from different genera -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:271 # Checklist::HigherTaxaInjector higher_taxa_headers when same order when two species from different families -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:286 # Checklist::HigherTaxaInjector higher_taxa_headers when same order when two species from different families and expand headers set -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:301 # Checklist::HigherTaxaInjector higher_taxa_headers when same order when genus and different family -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:316 # Checklist::HigherTaxaInjector higher_taxa_headers when same order when family and genus in different family -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:333 # Checklist::HigherTaxaInjector higher_taxa_headers when same class when order and genus from different order -rspec ./spec/models/checklist/higher_taxa_injector_spec.rb:348 # Checklist::HigherTaxaInjector higher_taxa_headers when same class when order and genus from different order and expand headers set -rspec ./spec/models/checklist/order_spec.rb:17 # Checklist when taxonomic order Plantae should include Agave (Agavaceae) before Panax (Araliaceae) -rspec ./spec/models/checklist/order_spec.rb:28 # Checklist when taxonomic order Animalia should include birds after last mammal -rspec ./spec/models/checklist/order_spec.rb:32 # Checklist when taxonomic order Animalia should include Falconiformes (Aves) before Psittaciformes (Aves) -rspec ./spec/models/checklist/order_spec.rb:36 # Checklist when taxonomic order Animalia should include Cathartidae within Falconiformes -rspec ./spec/models/checklist/order_spec.rb:42 # Checklist when taxonomic order Animalia should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) -rspec ./spec/models/checklist/order_spec.rb:46 # Checklist when taxonomic order Animalia should include Cathartidae (Falconiformes) before Cacatuidae (Psittaciformes) -rspec ./spec/models/checklist/order_spec.rb:50 # Checklist when taxonomic order Animalia should include Hirudo medicinalis at the very end (after all Chordata) -rspec ./spec/models/checklist/order_spec.rb:61 # Checklist when alphabetical order should include Falconiformes (Aves) before Psittaciformes (Aves) -rspec ./spec/models/checklist/order_spec.rb:65 # Checklist when alphabetical order should include Cathartidae before Falconiformes -rspec ./spec/models/checklist/order_spec.rb:69 # Checklist when alphabetical order should include Cathartidae (Falconiformes) before Falconidae (Falconiformes) -rspec ./spec/models/checklist/order_spec.rb:73 # Checklist when alphabetical order should include Cathartidae (Falconiformes) after Cacatuidae (Psittaciformes) -rspec ./spec/models/checklist/pdf/history_annotations_key_spec.rb:59 # Checklist::Pdf::HistoryAnnotationsKey hash_annotations_key -rspec ./spec/models/checklist/pdf/history_spec.rb:38 # Checklist::Pdf::History higher_taxon_name when family -rspec ./spec/models/checklist/pdf/history_spec.rb:56 # Checklist::Pdf::History listed_taxon_name when family -rspec ./spec/models/checklist/pdf/history_spec.rb:71 # Checklist::Pdf::History listed_taxon_name when genus -rspec ./spec/models/checklist/pdf/history_spec.rb:99 # Checklist::Pdf::History annotation_for_language annotation with footnote -rspec ./spec/models/checklist/pdf/index_annotations_key_spec.rb:46 # Checklist::Pdf::IndexAnnotationsKey hash_annotations_key -rspec ./spec/models/checklist/pdf/index_annotations_key_spec.rb:102 # Checklist::Pdf::IndexAnnotationsKey non_hash_annotations_key -rspec ./spec/models/checklist/pdf/index_fetcher_spec.rb:49 # Checklist::Pdf::IndexFetcher with common names -rspec ./spec/models/checklist/pdf/index_fetcher_spec.rb:77 # Checklist::Pdf::IndexFetcher with synonyms and authors -rspec ./spec/models/checklist/scientific_name_spec.rb:15 # Checklist when filtering by name by scientific name -rspec ./spec/models/checklist/scientific_name_spec.rb:28 # Checklist when filtering by name by common name -rspec ./spec/models/checklist/synonyms_spec.rb:15 # Checklist when synonyms displayed should return Alligator cynocephalus as synonym for Caiman latirostris -rspec ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:13 # Species::TaxonConceptPrefixMatcher results when query in capital letters -rspec ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:22 # Species::TaxonConceptPrefixMatcher results when match on accepted name -rspec ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:31 # Species::TaxonConceptPrefixMatcher results when match on synonym -rspec ./spec/models/checklist/taxon_concept_prefix_matcher_spec.rb:40 # Species::TaxonConceptPrefixMatcher results when match on common name -rspec ./spec/models/checklist/timeline_spec.rb:23 # Checklist::Timeline when deleted -rspec ./spec/models/checklist/timeline_spec.rb:24 # Checklist::Timeline when deleted -rspec ./spec/models/checklist/timeline_spec.rb:25 # Checklist::Timeline when deleted -rspec ./spec/models/checklist/timeline_spec.rb:83 # Checklist::Timeline when deleted from III multiple times -rspec ./spec/models/checklist/timeline_spec.rb:84 # Checklist::Timeline when deleted from III multiple times -rspec ./spec/models/checklist/timeline_spec.rb:85 # Checklist::Timeline when deleted from III multiple times -rspec ./spec/models/checklist/timeline_spec.rb:112 # Checklist::Timeline when deleted and then readded -rspec ./spec/models/checklist/timeline_spec.rb:113 # Checklist::Timeline when deleted and then readded -rspec ./spec/models/checklist/timeline_spec.rb:114 # Checklist::Timeline when deleted and then readded -rspec ./spec/models/checklist/timeline_spec.rb:154 # Checklist::Timeline when reservation withdrawn -rspec ./spec/models/checklist/timeline_spec.rb:155 # Checklist::Timeline when reservation withdrawn -rspec ./spec/models/checklist/timeline_spec.rb:156 # Checklist::Timeline when reservation withdrawn -rspec ./spec/models/checklist/timeline_spec.rb:202 # Checklist::Timeline when reservation withdrawn and then readded -rspec ./spec/models/checklist/timeline_spec.rb:203 # Checklist::Timeline when reservation withdrawn and then readded -rspec ./spec/models/checklist/timeline_spec.rb:204 # Checklist::Timeline when reservation withdrawn and then readded -rspec ./spec/models/checklist/timeline_spec.rb:205 # Checklist::Timeline when reservation withdrawn and then readded -rspec ./spec/models/checklist/timeline_spec.rb:227 # Checklist::Timeline when added multiple times -rspec ./spec/models/checklist/timeline_spec.rb:231 # Checklist::Timeline when added multiple times -rspec ./spec/models/checklist/timeline_spec.rb:232 # Checklist::Timeline when added multiple times -rspec ./spec/models/checklist/timeline_spec.rb:256 # Checklist::Timeline when automatic deletion from ancestor listing -rspec ./spec/models/checklist/timeline_spec.rb:260 # Checklist::Timeline when automatic deletion from ancestor listing -rspec ./spec/models/checklist/timeline_spec.rb:261 # Checklist::Timeline when automatic deletion from ancestor listing -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:25 # Checklist::TimelinesForTaxonConcept timelines when Appendix I -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:26 # Checklist::TimelinesForTaxonConcept timelines when Appendix I -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:46 # Checklist::TimelinesForTaxonConcept timelines when Appendix III -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:47 # Checklist::TimelinesForTaxonConcept timelines when Appendix III -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:67 # Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:68 # Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:69 # Checklist::TimelinesForTaxonConcept timelines when Appendix III reservation -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:81 # Checklist::TimelinesForTaxonConcept timeline_years when in 1990 -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:82 # Checklist::TimelinesForTaxonConcept timeline_years when in 1990 -rspec ./spec/models/checklist/timelines_for_taxon_concept_spec.rb:83 # Checklist::TimelinesForTaxonConcept timeline_years when in 1990 -rspec ./spec/models/cites_suspension_notification_spec.rb:85 # CitesSuspensionNotification destroy when dependent objects attached when confirmation notification, make sure it gets destroyed -rspec ./spec/models/dashboard_stats_species_spec.rb:35 # DashboardStats#species has one results for argentina -rspec ./spec/models/dashboard_stats_species_spec.rb:38 # DashboardStats#species has no results for ghana -rspec ./spec/models/dashboard_stats_trade_spec.rb:46 # DashboardStats#trade when no time range specified argentina should have 40 exported animals and no imports -rspec ./spec/models/dashboard_stats_trade_spec.rb:60 # DashboardStats#trade when time range specified argentina should have no exports in 2012-2012 -rspec ./spec/models/eu_decision_spec.rb:68 # EuDecision create downloads cache should be populated -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:101 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:102 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:108 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:115 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:122 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:129 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:136 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:142 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:149 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:150 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:156 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:163 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:170 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:177 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:26 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:27 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/reassignment_copy_processor_spec.rb:28 # NomenclatureChange::ReassignmentCopyProcessor run when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:101 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:102 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:108 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:115 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:122 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:129 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:136 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:142 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:149 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:150 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:156 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:163 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:170 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/legislation_reassignments_processor_examples.rb:177 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:26 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:27 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/reassignment_transfer_processor_spec.rb:28 # NomenclatureChange::ReassignmentTransferProcessor run input reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:70 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:71 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:77 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:84 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:91 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:98 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:104 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:111 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:112 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:118 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:125 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:132 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:139 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:140 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:141 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/nomenclature_change/shared/output_legislation_reassignments_processor_examples.rb:142 # NomenclatureChange::ReassignmentTransferProcessor run output reassignments when legislation -rspec ./spec/models/species/common_names_export_spec.rb:32 # Species::CommonNamesExport export when results when file not cached -rspec ./spec/models/species/hybrid_prefix_matcher_spec.rb:14 # Species::TaxonConceptPrefixMatcher results when searching for hybrid when trade visibility -rspec ./spec/models/species/hybrid_prefix_matcher_spec.rb:24 # Species::TaxonConceptPrefixMatcher results when searching for hybrid when trade internal visibility -rspec ./spec/models/species/hybrid_prefix_matcher_spec.rb:33 # Species::TaxonConceptPrefixMatcher results when searching for hybrid when speciesplus visibility -rspec ./spec/models/species/invisible_subspecies_search_spec.rb:8 # Species::Search results when searching by scientific name when subspecies never listed -rspec ./spec/models/species/invisible_subspecies_search_spec.rb:9 # Species::Search results when searching by scientific name when subspecies never listed -rspec ./spec/models/species/listings_export_spec.rb:10 # Species::ListingsExport path -rspec ./spec/models/species/listings_export_spec.rb:21 # Species::ListingsExport export when no results -rspec ./spec/models/species/listings_export_spec.rb:42 # Species::ListingsExport export when results when file not cached -rspec ./spec/models/species/listings_export_spec.rb:48 # Species::ListingsExport export when results when file cached -rspec ./spec/models/species/listings_export_spec.rb:65 # Species::ListingsExport query when CITES when Appendix I -rspec ./spec/models/species/listings_export_spec.rb:75 # Species::ListingsExport query when CITES when Appendix I when Poland -rspec ./spec/models/species/listings_export_spec.rb:86 # Species::ListingsExport query when CITES when Appendix I when Nepal -rspec ./spec/models/species/listings_export_spec.rb:96 # Species::ListingsExport query when CITES when higher taxon ids -rspec ./spec/models/species/listings_export_spec.rb:111 # Species::ListingsExport query when CITES when implicitly listed subspecies present -rspec ./spec/models/species/listings_export_spec.rb:122 # Species::ListingsExport query when EU when Annex A -rspec ./spec/models/species/listings_export_spec.rb:132 # Species::ListingsExport query when EU when Annex A when Spain -rspec ./spec/models/species/listings_export_spec.rb:143 # Species::ListingsExport query when EU when Annex A when Nepal -rspec ./spec/models/species/listings_export_spec.rb:153 # Species::ListingsExport query when EU when higher taxon ids -rspec ./spec/models/species/orphaned_taxon_concepts_export_spec.rb:33 # Species::OrphanedTaxonConceptsExport export when results when file not cached -rspec ./spec/models/species/search_spec.rb:8 # Species::Search results when searching by scientific name when regular query -rspec ./spec/models/species/search_spec.rb:12 # Species::Search results when searching by scientific name when malicious query -rspec ./spec/models/species/search_spec.rb:16 # Species::Search results when searching by scientific name when leading whitespace -rspec ./spec/models/species/search_spec.rb:20 # Species::Search results when searching by scientific name when trailing whitespace -rspec ./spec/models/species/species_reference_output_spec.rb:32 # Species::SpeciesReferenceOutputExport export when results when file not cached -rspec ./spec/models/species/standard_reference_output_spec.rb:32 # Species::StandardReferenceOutputExport export when results when file not cached -rspec ./spec/models/species/synonyms_and_trade_names_export_spec.rb:38 # Species::SynonymsAndTradeNamesExport export when results when file not cached -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:14 # Species::TaxonConceptPrefixMatcher results when searching by common name when searching by hyphenated common name -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:23 # Species::TaxonConceptPrefixMatcher results when searching by common name when searching by hyphenated common name without hyphens -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:32 # Species::TaxonConceptPrefixMatcher results when searching by common name when searching by part of hyphenated common name -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:43 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when regular query -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:52 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when malicious query -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:61 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when leading whitespace -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:70 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when trailing whitespace -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:79 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when implicitly listed subspecies -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:88 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed subspecies -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:97 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when implicitly listed higher taxon (without an explicitly listed ancestor) -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:106 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:117 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon but ranks expected FAMILY -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:127 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when explicitly listed higher taxon but ranks expected SPECIES -rspec ./spec/models/species/taxon_concept_prefix_matcher_spec.rb:137 # Species::TaxonConceptPrefixMatcher results when searching by scientific name when searching for name that matches Species and Subspecies but ranks expected SUBSPECIES -rspec ./spec/models/species/taxon_concepts_export_spec.rb:32 # Species::TaxonConceptsNamesExport export when results when file not cached -rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:39 # Species::TaxonConceptPrefixMatcher results when searching for status N species when trade visibility -rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:49 # Species::TaxonConceptPrefixMatcher results when searching for status N species when trade internal visibility -rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:58 # Species::TaxonConceptPrefixMatcher results when searching for status N species when speciesplus visibility -rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:70 # Species::TaxonConceptPrefixMatcher results when searching for trade name when trade visibility -rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:71 # Species::TaxonConceptPrefixMatcher results when searching for trade name when trade visibility -rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:81 # Species::TaxonConceptPrefixMatcher results when searching for trade name when trade internal visibility -rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:82 # Species::TaxonConceptPrefixMatcher results when searching for trade name when trade internal visibility -rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:91 # Species::TaxonConceptPrefixMatcher results when searching for trade name when speciesplus visibility -rspec ./spec/models/species/trade_name_prefix_matcher_spec.rb:92 # Species::TaxonConceptPrefixMatcher results when searching for trade name when speciesplus visibility -rspec ./spec/models/species/visible_subspecies_search_spec.rb:8 # Species::Search results when searching by scientific name when subspecies previously listed -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:10 # TaxonConcept Agalychnis REFERENCES cites_accepted for class Amphibia -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:13 # TaxonConcept Agalychnis REFERENCES cites_accepted for family Hylidae -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:16 # TaxonConcept Agalychnis REFERENCES cites_accepted for genus Agalychnis -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:21 # TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for class Amphibia -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:24 # TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for family Hylidae -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:27 # TaxonConcept Agalychnis REFERENCES standard_taxon_concept_references for genus Agalychnis -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:34 # TaxonConcept Agalychnis LISTING cites_listing for genus Agalychnis -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:40 # TaxonConcept Agalychnis LISTING eu_listing for genus Agalychnis -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:46 # TaxonConcept Agalychnis LISTING cites_listed for family Hylidae -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:49 # TaxonConcept Agalychnis LISTING cites_listed for genus Agalychnis -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:55 # TaxonConcept Agalychnis LISTING eu_listed for family Hylidae -rspec ./spec/models/taxon_concept/agalychnis_spec.rb:58 # TaxonConcept Agalychnis LISTING eu_listed for genus Agalychnis -rspec ./spec/models/taxon_concept/agave_spec.rb:10 # TaxonConcept Agave LISTING cites_listing for species Agave parviflora -rspec ./spec/models/taxon_concept/agave_spec.rb:13 # TaxonConcept Agave LISTING cites_listing for species Agave arizonica -rspec ./spec/models/taxon_concept/agave_spec.rb:19 # TaxonConcept Agave LISTING cites_listed for species Agave parviflora -rspec ./spec/models/taxon_concept/agave_spec.rb:22 # TaxonConcept Agave LISTING cites_listed for species Agave arizonica -rspec ./spec/models/taxon_concept/agave_spec.rb:28 # TaxonConcept Agave LISTING cites_show for species Agave parviflora -rspec ./spec/models/taxon_concept/agave_spec.rb:31 # TaxonConcept Agave LISTING cites_show for species Agave arizonica -rspec ./spec/models/taxon_concept/agave_spec.rb:37 # TaxonConcept Agave LISTING eu_listing for species Agave parviflora -rspec ./spec/models/taxon_concept/agave_spec.rb:40 # TaxonConcept Agave LISTING eu_listing for species Agave arizonica -rspec ./spec/models/taxon_concept/agave_spec.rb:46 # TaxonConcept Agave LISTING eu_listed for species Agave parviflora -rspec ./spec/models/taxon_concept/agave_spec.rb:49 # TaxonConcept Agave LISTING eu_listed for species Agave arizonica -rspec ./spec/models/taxon_concept/agave_spec.rb:55 # TaxonConcept Agave LISTING eu_show for species Agave parviflora -rspec ./spec/models/taxon_concept/agave_spec.rb:58 # TaxonConcept Agave LISTING eu_show for species Agave arizonica -rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:10 # TaxonConcept Ailuropoda LISTING cites_listing for species Ailuropoda melanoleuca -rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:13 # TaxonConcept Ailuropoda LISTING cites_listing for genus level Ailuropoda -rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:19 # TaxonConcept Ailuropoda LISTING eu_listing for species Ailuropoda melanoleuca -rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:22 # TaxonConcept Ailuropoda LISTING eu_listing for genus level Ailuropoda -rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:28 # TaxonConcept Ailuropoda LISTING cites_listed for genus Ailuropoda -rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:31 # TaxonConcept Ailuropoda LISTING cites_listed for species Ailuropoda melanoleuca -rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:37 # TaxonConcept Ailuropoda LISTING eu_listed for genus Ailuropoda -rspec ./spec/models/taxon_concept/ailuropoda_spec.rb:40 # TaxonConcept Ailuropoda LISTING eu_listed for species Ailuropoda melanoleuca -rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:9 # TaxonConcept Arctocephalus LISTING cites_listing should be II at species level Arctocephalus australis -rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:12 # TaxonConcept Arctocephalus LISTING cites_listing should be I at species level Arctocephalus townsendi -rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:15 # TaxonConcept Arctocephalus LISTING cites_listing should be I/II at genus level Arctocephalus -rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:21 # TaxonConcept Arctocephalus LISTING cites_listed should be true for genus Arctocephalus -rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:24 # TaxonConcept Arctocephalus LISTING cites_listed should be true for species Arctocephalus townsendi -rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:27 # TaxonConcept Arctocephalus LISTING cites_listed should be false for species Arctocephalus australis (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:33 # TaxonConcept Arctocephalus LISTING eu_listed should be true for genus Arctocephalus -rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:36 # TaxonConcept Arctocephalus LISTING eu_listed should be true for species Arctocephalus townsendi -rspec ./spec/models/taxon_concept/arctocephalus_spec.rb:39 # TaxonConcept Arctocephalus LISTING eu_listed should be false for species Arctocephalus australis (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:9 # TaxonConcept Boa constrictor TAXONOMY full_name for subspecies Boa constrictor occidentalis -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:12 # TaxonConcept Boa constrictor TAXONOMY full_name for species Boa constrictor -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:15 # TaxonConcept Boa constrictor TAXONOMY full_name for genus Boa -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:21 # TaxonConcept Boa constrictor TAXONOMY ancestors family -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:24 # TaxonConcept Boa constrictor TAXONOMY ancestors order -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:27 # TaxonConcept Boa constrictor TAXONOMY ancestors class -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:35 # TaxonConcept Boa constrictor LISTING cites_listing for subspecies Boa constrictor occidentalis -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:38 # TaxonConcept Boa constrictor LISTING cites_listing for subspecies Boa constrictor constrictor -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:41 # TaxonConcept Boa constrictor LISTING cites_listing for species Boa constrictor -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:47 # TaxonConcept Boa constrictor LISTING eu_listing for subspecies Boa constrictor occidentalis -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:50 # TaxonConcept Boa constrictor LISTING eu_listing for subspecies Boa constrictor constrictor -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:53 # TaxonConcept Boa constrictor LISTING eu_listing for species Boa constrictor -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:59 # TaxonConcept Boa constrictor LISTING cites_listed for family Boidae -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:62 # TaxonConcept Boa constrictor LISTING cites_listed for genus Boa -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:65 # TaxonConcept Boa constrictor LISTING cites_listed for species Boa constrictor (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:68 # TaxonConcept Boa constrictor LISTING cites_listed for subspecies Boa constrictor occidentalis -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:71 # TaxonConcept Boa constrictor LISTING cites_listed for subspecies Boa constrictor constrictor -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:77 # TaxonConcept Boa constrictor LISTING cites_show for family Boidae -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:80 # TaxonConcept Boa constrictor LISTING cites_show for genus Boa -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:83 # TaxonConcept Boa constrictor LISTING cites_show for species Boa constrictor (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:86 # TaxonConcept Boa constrictor LISTING cites_show for subspecies Boa constrictor occidentalis -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:89 # TaxonConcept Boa constrictor LISTING cites_show for subspecies Boa constrictor constrictor -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:95 # TaxonConcept Boa constrictor LISTING cites_listed_descendants for family Boidae -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:98 # TaxonConcept Boa constrictor LISTING cites_listed_descendants for genus Boa -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:101 # TaxonConcept Boa constrictor LISTING cites_listed_descendants for species Boa constrictor (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:104 # TaxonConcept Boa constrictor LISTING cites_listed_descendants for subspecies Boa constrictor occidentalis -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:110 # TaxonConcept Boa constrictor LISTING eu_listed for family Boidae -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:113 # TaxonConcept Boa constrictor LISTING eu_listed for genus Boa -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:116 # TaxonConcept Boa constrictor LISTING eu_listed for species Boa constrictor (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:119 # TaxonConcept Boa constrictor LISTING eu_listed for subspecies Boa constrictor occidentalis -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:125 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for family Boidae -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:128 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for genus Boa -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:131 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for species Boa constrictor (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:134 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for subspecies Boa constrictor occidentalis -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:137 # TaxonConcept Boa constrictor LISTING show_in_species_plus_ac for subspecies Boa constrictor constrictor -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:143 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for family Boidae -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:146 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for genus Boa -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:149 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for species Boa constrictor (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:152 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for subspecies Boa constrictor occidentalis -rspec ./spec/models/taxon_concept/boa_constrictor_spec.rb:155 # TaxonConcept Boa constrictor LISTING show_in_checklist_ac for subspecies Boa constrictor constrictor -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:10 # TaxonConcept Caiman latirostris TAXONOMY full_name for species synonym Alligator cynocephalus -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:15 # TaxonConcept Caiman latirostris TAXONOMY rank_name for species synonym Alligator cynocephalus -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:23 # TaxonConcept Caiman latirostris REFERENCES cites_accepted for species Caiman latirostris -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:26 # TaxonConcept Caiman latirostris REFERENCES cites_accepted for synonym species Alligator cynocephalus -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:31 # TaxonConcept Caiman latirostris REFERENCES standard_taxon_concept_references for species Caiman latirostris -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:38 # TaxonConcept Caiman latirostris LISTING cites_listing for species Caiman latirostris -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:44 # TaxonConcept Caiman latirostris LISTING eu_listing for species Caiman latirostris -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:50 # TaxonConcept Caiman latirostris LISTING cites_listed for order Crocodylia -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:53 # TaxonConcept Caiman latirostris LISTING cites_listed for family Alligatoridae -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:56 # TaxonConcept Caiman latirostris LISTING cites_listed for genus Caiman -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:59 # TaxonConcept Caiman latirostris LISTING cites_listed for species Caiman latoristris -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:65 # TaxonConcept Caiman latirostris LISTING eu_listed for order Crocodylia -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:68 # TaxonConcept Caiman latirostris LISTING eu_listed for family Alligatoridae -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:71 # TaxonConcept Caiman latirostris LISTING eu_listed for genus Caiman -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:74 # TaxonConcept Caiman latirostris LISTING eu_listed for species Caiman latoristris -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:80 # TaxonConcept Caiman latirostris LISTING cites_show for order Crocodylia -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:83 # TaxonConcept Caiman latirostris LISTING cites_show for family Alligatoridae -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:86 # TaxonConcept Caiman latirostris LISTING cites_show for genus Caiman -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:89 # TaxonConcept Caiman latirostris LISTING cites_show for species Caiman latoristris -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:92 # TaxonConcept Caiman latirostris LISTING cites_show for synonym species Alligator cynocephalus -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:98 # TaxonConcept Caiman latirostris LISTING ann_symbol for species Caiman latirostris -rspec ./spec/models/taxon_concept/caiman_latirostris_spec.rb:104 # TaxonConcept Caiman latirostris LISTING hash_ann_symbol for species Caiman latirostris -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:9 # TaxonConcept Canis lupus LISTING cites_listing for species Canis lupus (population split listing) -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:15 # TaxonConcept Canis lupus LISTING eu_listing for species Canis lupus (population split listing) -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:21 # TaxonConcept Canis lupus LISTING cites_listed for species Canis lupus -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:24 # TaxonConcept Canis lupus LISTING cites_listed for subspecies Canis lupus crassodon -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:30 # TaxonConcept Canis lupus LISTING eu_listed for species Canis lupus -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:36 # TaxonConcept Canis lupus LISTING show_in_species_plus_ac for species Canis lupus -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:39 # TaxonConcept Canis lupus LISTING show_in_species_plus_ac for subspecies Canis lupus crassodon -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:45 # TaxonConcept Canis lupus LISTING show_in_checklist_ac for species Canis lupus -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:48 # TaxonConcept Canis lupus LISTING show_in_checklist_ac for subspecies Canis lupus crassodon -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:54 # TaxonConcept Canis lupus LISTING show_in_species_plus for species Canis lupus -rspec ./spec/models/taxon_concept/canis_lupus_spec.rb:57 # TaxonConcept Canis lupus LISTING show_in_species_plus for subspecies Canis lupus crassodon -rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:10 # TaxonConcept Caretta caretta CMS LISTING cms_listing for family Cheloniidae -rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:13 # TaxonConcept Caretta caretta CMS LISTING cms_listing for species Caretta caretta -rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:19 # TaxonConcept Caretta caretta CMS LISTING cms_listed for family Cheloniidae -rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:22 # TaxonConcept Caretta caretta CMS LISTING cms_listed for species Caretta caretta -rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:30 # TaxonConcept Caretta caretta CMS CASCADING LISTING current_cms_additions for family Cheloniidae -rspec ./spec/models/taxon_concept/caretta_caretta_cms_spec.rb:35 # TaxonConcept Caretta caretta CMS CASCADING LISTING current_cms_additions for species Caretta caretta -rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:10 # TaxonConcept Cedrela montana LISTING cites_listing for species Cedrela montana -rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:16 # TaxonConcept Cedrela montana LISTING cites_listed for species Cedrela montana -rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:22 # TaxonConcept Cedrela montana LISTING cites_show for species Cedrela montana -rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:28 # TaxonConcept Cedrela montana LISTING eu_listing for species Cedrela montana -rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:34 # TaxonConcept Cedrela montana LISTING eu_listed for species Cedrela montana -rspec ./spec/models/taxon_concept/cedrela_montana_spec.rb:40 # TaxonConcept Cedrela montana LISTING eu_show for species Cedrela montana -rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:10 # TaxonConcept Cervus elphus CMS LISTING cms_listing for species Cervus elaphus -rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:13 # TaxonConcept Cervus elphus CMS LISTING cms_listing for subspecies Cervus elaphus bactrianus -rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:16 # TaxonConcept Cervus elphus CMS LISTING cms_listing for subspecies Cervus elaphus barbarus -rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:22 # TaxonConcept Cervus elphus CMS LISTING show_in_species_plus_ac for subspecies Cervus elaphus bactrianus (instrument) -rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:25 # TaxonConcept Cervus elphus CMS LISTING show_in_species_plus_ac for subspecies Cervus elaphus barbarus (listing) -rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:31 # TaxonConcept Cervus elphus CMS LISTING show_in_species_plus for subspecies Cervus elaphus bactrianus (instrument) -rspec ./spec/models/taxon_concept/cervus_elaphus_cms_spec.rb:34 # TaxonConcept Cervus elphus CMS LISTING show_in_species_plus for subspecies Cervus elaphus barbarus (listing) -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:10 # TaxonConcept Cervus elaphus TAXONOMY full_name for subspecies Cervus elaphus bactrianus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:13 # TaxonConcept Cervus elaphus TAXONOMY full_name for species Cervus elaphus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:16 # TaxonConcept Cervus elaphus TAXONOMY full_name for genus Cervus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:24 # TaxonConcept Cervus elaphus LISTING cites_listing for species Cervus elaphus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:27 # TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus bactrianus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:30 # TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus barbarus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:33 # TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus hanglu -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:36 # TaxonConcept Cervus elaphus LISTING cites_listing for subspecies Cervus elaphus canadensis -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:42 # TaxonConcept Cervus elaphus LISTING eu_listing for species Cervus elaphus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:45 # TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus bactrianus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:48 # TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus barbarus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:51 # TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus hanglu -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:54 # TaxonConcept Cervus elaphus LISTING eu_listing for subspecies Cervus elaphus canadensis -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:60 # TaxonConcept Cervus elaphus LISTING cites_listed for order Artiodactyla -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:63 # TaxonConcept Cervus elaphus LISTING cites_listed for family Cervidae -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:66 # TaxonConcept Cervus elaphus LISTING cites_listed for genus Cervus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:69 # TaxonConcept Cervus elaphus LISTING cites_listed for species Cervus elaphus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:72 # TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus bactrianus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:75 # TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus barbarus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:78 # TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus hanglu -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:81 # TaxonConcept Cervus elaphus LISTING cites_listed for subspecies Cervus elaphus canadensis -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:87 # TaxonConcept Cervus elaphus LISTING eu_listed for order Artiodactyla -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:90 # TaxonConcept Cervus elaphus LISTING eu_listed for family Cervidae -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:93 # TaxonConcept Cervus elaphus LISTING eu_listed for genus Cervus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:96 # TaxonConcept Cervus elaphus LISTING eu_listed for species Cervus elaphus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:99 # TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus bactrianus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:102 # TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus barbarus -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:105 # TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus hanglu -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:108 # TaxonConcept Cervus elaphus LISTING eu_listed for subspecies Cervus elaphus canadensis -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:114 # TaxonConcept Cervus elaphus LISTING cites_show for subspecies Cervus elaphus hanglu -rspec ./spec/models/taxon_concept/cervus_elaphus_spec.rb:117 # TaxonConcept Cervus elaphus LISTING cites_show for subspecies Cervus elaphus canadensis -rspec ./spec/models/taxon_concept/colophon_spec.rb:10 # TaxonConcept Colophon LISTING cites_listing for genus Colophon -rspec ./spec/models/taxon_concept/colophon_spec.rb:13 # TaxonConcept Colophon LISTING cites_listing for species Colophon barnardi -rspec ./spec/models/taxon_concept/colophon_spec.rb:19 # TaxonConcept Colophon LISTING eu_listing for genus Colophon -rspec ./spec/models/taxon_concept/colophon_spec.rb:22 # TaxonConcept Colophon LISTING eu_listing for species Colophon barnardi -rspec ./spec/models/taxon_concept/colophon_spec.rb:28 # TaxonConcept Colophon LISTING cites_listed for genus Colophon -rspec ./spec/models/taxon_concept/colophon_spec.rb:31 # TaxonConcept Colophon LISTING cites_listed for species Colophon barnardi -rspec ./spec/models/taxon_concept/colophon_spec.rb:37 # TaxonConcept Colophon LISTING eu_listed for genus Colophon -rspec ./spec/models/taxon_concept/colophon_spec.rb:40 # TaxonConcept Colophon LISTING eu_listed for species Colophon barnardi -rspec ./spec/models/taxon_concept/colophon_spec.rb:46 # TaxonConcept Colophon LISTING cites_show for order Coleoptera -rspec ./spec/models/taxon_concept/colophon_spec.rb:49 # TaxonConcept Colophon LISTING cites_show for family Lucanidae -rspec ./spec/models/taxon_concept/colophon_spec.rb:55 # TaxonConcept Colophon LISTING current_party_ids for genus Colophon -rspec ./spec/models/taxon_concept/colophon_spec.rb:58 # TaxonConcept Colophon LISTING current_party_ids for species Colophon barnardi -rspec ./spec/models/taxon_concept/dalbergia_spec.rb:10 # TaxonConcept Dalbergia LISTING cites_listing for species Dalbergia abbreviata -rspec ./spec/models/taxon_concept/dalbergia_spec.rb:13 # TaxonConcept Dalbergia LISTING cites_listing for species Dalbergia abrahamii -rspec ./spec/models/taxon_concept/dalbergia_spec.rb:19 # TaxonConcept Dalbergia LISTING cites_listed for species Dalbergia abbreviata -rspec ./spec/models/taxon_concept/dalbergia_spec.rb:22 # TaxonConcept Dalbergia LISTING cites_listed for species Dalbergia abrahamii -rspec ./spec/models/taxon_concept/dalbergia_spec.rb:28 # TaxonConcept Dalbergia LISTING cites_show for species Dalbergia abbreviata -rspec ./spec/models/taxon_concept/dalbergia_spec.rb:31 # TaxonConcept Dalbergia LISTING cites_show for species Dalbergia abrahamii -rspec ./spec/models/taxon_concept/diospyros_spec.rb:10 # TaxonConcept Diospyros LISTING cites_listing for species Diospyros aculeata -rspec ./spec/models/taxon_concept/diospyros_spec.rb:13 # TaxonConcept Diospyros LISTING cites_listing for species Diospyros acuta -rspec ./spec/models/taxon_concept/diospyros_spec.rb:19 # TaxonConcept Diospyros LISTING cites_listed for species Diospyros aculeata -rspec ./spec/models/taxon_concept/diospyros_spec.rb:22 # TaxonConcept Diospyros LISTING cites_listed for species Diospyros acuta -rspec ./spec/models/taxon_concept/diospyros_spec.rb:28 # TaxonConcept Diospyros LISTING cites_show for species Diospyros aculeata -rspec ./spec/models/taxon_concept/diospyros_spec.rb:31 # TaxonConcept Diospyros LISTING cites_show for species Diospyros acuta -rspec ./spec/models/taxon_concept/diospyros_spec.rb:37 # TaxonConcept Diospyros LISTING eu_listing for species Diospyros aculeata -rspec ./spec/models/taxon_concept/diospyros_spec.rb:40 # TaxonConcept Diospyros LISTING eu_listing for species Diospyros acuta -rspec ./spec/models/taxon_concept/diospyros_spec.rb:46 # TaxonConcept Diospyros LISTING eu_listed for species Diospyros aculeata -rspec ./spec/models/taxon_concept/diospyros_spec.rb:49 # TaxonConcept Diospyros LISTING eu_listed for species Diospyros acuta -rspec ./spec/models/taxon_concept/diospyros_spec.rb:55 # TaxonConcept Diospyros LISTING eu_show for species Diospyros aculeata -rspec ./spec/models/taxon_concept/diospyros_spec.rb:58 # TaxonConcept Diospyros LISTING eu_show for species Diospyros acuta -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:10 # TaxonConcept Falconiformes TAXONOMY rank_name for Falco hybrid -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:18 # TaxonConcept Falconiformes LISTING cites_listing for order Falconiformes -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:21 # TaxonConcept Falconiformes LISTING cites_listing for species Falco araea -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:24 # TaxonConcept Falconiformes LISTING cites_listing for species Falco alopex (H) -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:27 # TaxonConcept Falconiformes LISTING cites_listing for species Gymnogyps californianus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:30 # TaxonConcept Falconiformes LISTING cites_listing for species Sarcoramphus papa -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:33 # TaxonConcept Falconiformes LISTING cites_listing for species Vultur atratus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:39 # TaxonConcept Falconiformes LISTING eu_listing for order Falconiformes -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:42 # TaxonConcept Falconiformes LISTING eu_listing for species Falco araea -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:45 # TaxonConcept Falconiformes LISTING eu_listing for species Falco alopex (H) -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:48 # TaxonConcept Falconiformes LISTING eu_listing for species Gymnogyps californianus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:51 # TaxonConcept Falconiformes LISTING eu_listing for species Sarcoramphus papa -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:54 # TaxonConcept Falconiformes LISTING eu_listing for species Vultur atratus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:60 # TaxonConcept Falconiformes LISTING cites_status for genus Vultur -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:63 # TaxonConcept Falconiformes LISTING cites_status for species Vultur atratus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:69 # TaxonConcept Falconiformes LISTING cites_listed for order Falconiformes -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:72 # TaxonConcept Falconiformes LISTING cites_listed for family Falconidae (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:75 # TaxonConcept Falconiformes LISTING cites_listed for genus Falco -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:78 # TaxonConcept Falconiformes LISTING cites_listed for species Falco araea -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:81 # TaxonConcept Falconiformes LISTING cites_listed for species Falco alopex -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:84 # TaxonConcept Falconiformes LISTING cites_listed for species Vultur atratus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:87 # TaxonConcept Falconiformes LISTING cites_listed for subspecies Falco peregrinus peregrinus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:93 # TaxonConcept Falconiformes LISTING eu_listed for order Falconiformes -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:96 # TaxonConcept Falconiformes LISTING eu_listed for family Falconidae (inclusion in higher taxa listing) -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:99 # TaxonConcept Falconiformes LISTING eu_listed for genus Falco -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:102 # TaxonConcept Falconiformes LISTING eu_listed for species Falco araea -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:105 # TaxonConcept Falconiformes LISTING eu_listed for species Falco alopex -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:108 # TaxonConcept Falconiformes LISTING eu_listed for species Vultur atratus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:111 # TaxonConcept Falconiformes LISTING eu_listed for subspecies Falco peregrinus peregrinus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:117 # TaxonConcept Falconiformes LISTING cites_show for order Falconiformes -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:120 # TaxonConcept Falconiformes LISTING cites_show for family Falconidae -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:123 # TaxonConcept Falconiformes LISTING cites_show for Falco hybrid -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:129 # TaxonConcept Falconiformes LISTING show_in_checklist_ac for subspecies Falco peregrinus peregrinus -rspec ./spec/models/taxon_concept/falconiformes_spec.rb:135 # TaxonConcept Falconiformes LISTING show_in_species_plus_ac for subspecies Falco peregrinus peregrinus -rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:9 # TaxonConcept Loxodonta africana CMS TAXONOMY full_name for species Loxodonta africana -rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:12 # TaxonConcept Loxodonta africana CMS TAXONOMY full_name for genus Loxodonta -rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:17 # TaxonConcept Loxodonta africana CMS TAXONOMY rank for species Loxodonta africana -rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:22 # TaxonConcept Loxodonta africana CMS TAXONOMY ancestors family -rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:25 # TaxonConcept Loxodonta africana CMS TAXONOMY ancestors order -rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:28 # TaxonConcept Loxodonta africana CMS TAXONOMY ancestors class -rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:36 # TaxonConcept Loxodonta africana CMS LISTING cms_listing for species Loxodonta africana -rspec ./spec/models/taxon_concept/loxodonta_africana_cms_spec.rb:42 # TaxonConcept Loxodonta africana CMS LISTING cms_listed for species Loxodonta africana -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:9 # TaxonConcept Loxodonta africana TAXONOMY full_name for species Loxodonta africana -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:12 # TaxonConcept Loxodonta africana TAXONOMY full_name for genus Loxodonta -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:17 # TaxonConcept Loxodonta africana TAXONOMY rank for species Loxodonta africana -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:22 # TaxonConcept Loxodonta africana TAXONOMY ancestors family -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:25 # TaxonConcept Loxodonta africana TAXONOMY ancestors order -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:28 # TaxonConcept Loxodonta africana TAXONOMY ancestors class -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:36 # TaxonConcept Loxodonta africana LISTING cites_listing for species Loxodonta africana (population split listing) -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:42 # TaxonConcept Loxodonta africana LISTING eu_listing for species Loxodonta africana (population split listing) -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:48 # TaxonConcept Loxodonta africana LISTING cites_listed for species Loxodonta africana -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:51 # TaxonConcept Loxodonta africana LISTING cites_listed for family Elephantidae -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:57 # TaxonConcept Loxodonta africana LISTING eu_listed for species Loxodonta africana -rspec ./spec/models/taxon_concept/loxodonta_africana_spec.rb:60 # TaxonConcept Loxodonta africana LISTING eu_listed for family Elephantidae -rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:9 # TaxonConcept Mellivora capensis LISTING cites_listing for species Mellivora capensis -rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:15 # TaxonConcept Mellivora capensis LISTING eu_listing for species Mellivora capensis -rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:21 # TaxonConcept Mellivora capensis LISTING cites_listed for family Mustelinae -rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:24 # TaxonConcept Mellivora capensis LISTING cites_listed for genus Mellivora -rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:27 # TaxonConcept Mellivora capensis LISTING cites_listed for species Mellivora capensis -rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:33 # TaxonConcept Mellivora capensis LISTING eu_listed for family Mustelinae -rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:36 # TaxonConcept Mellivora capensis LISTING eu_listed for genus Mellivora -rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:39 # TaxonConcept Mellivora capensis LISTING eu_listed for species Mellivora capensis -rspec ./spec/models/taxon_concept/mellivora_capensis_spec.rb:45 # TaxonConcept Mellivora capensis LISTING current_party_ids for species Mellivora capensis -rspec ./spec/models/taxon_concept/moschus_spec.rb:10 # TaxonConcept Moschus LISTING cites_listing for genus Moschus -rspec ./spec/models/taxon_concept/moschus_spec.rb:13 # TaxonConcept Moschus LISTING cites_listing for species Moschus leucogaster -rspec ./spec/models/taxon_concept/moschus_spec.rb:16 # TaxonConcept Moschus LISTING cites_listing for species Moschus moschiferus -rspec ./spec/models/taxon_concept/moschus_spec.rb:19 # TaxonConcept Moschus LISTING cites_listing for subspecies Moschus moschiferus moschiferus -rspec ./spec/models/taxon_concept/moschus_spec.rb:25 # TaxonConcept Moschus LISTING cites_listed for genus Moschus -rspec ./spec/models/taxon_concept/moschus_spec.rb:28 # TaxonConcept Moschus LISTING cites_listed for species Moschus leucogaster -rspec ./spec/models/taxon_concept/moschus_spec.rb:31 # TaxonConcept Moschus LISTING cites_listed for species Moschus moschiferus -rspec ./spec/models/taxon_concept/moschus_spec.rb:34 # TaxonConcept Moschus LISTING cites_listed for subspecies Moschus moschiferus moschiferus -rspec ./spec/models/taxon_concept/moschus_spec.rb:42 # TaxonConcept Moschus CASCADING LISTING current_cites_additions for species Moschus leucogaster -rspec ./spec/models/taxon_concept/moschus_spec.rb:51 # TaxonConcept Moschus CASCADING LISTING current_cites_additions for species Moschus moschiferus -rspec ./spec/models/taxon_concept/moschus_spec.rb:60 # TaxonConcept Moschus CASCADING LISTING current_cites_additions for subspecies Moschus moschiferus moschiferus -rspec ./spec/models/taxon_concept/natator_depressus_spec.rb:10 # TaxonConcept Natator depressus LISTING cites_listing for family Cheloniidae -rspec ./spec/models/taxon_concept/natator_depressus_spec.rb:13 # TaxonConcept Natator depressus LISTING cites_listing for species Natator depressus -rspec ./spec/models/taxon_concept/notomys_aquilo_spec.rb:10 # TaxonConcept Notomys aquilo LISTING cites_listing for genus Notomys -rspec ./spec/models/taxon_concept/notomys_aquilo_spec.rb:13 # TaxonConcept Notomys aquilo LISTING cites_listing for species Notomys aquilo -rspec ./spec/models/taxon_concept/notomys_aquilo_spec.rb:19 # TaxonConcept Notomys aquilo LISTING cites_show for genus Notomys -rspec ./spec/models/taxon_concept/notomys_aquilo_spec.rb:22 # TaxonConcept Notomys aquilo LISTING cites_show for species Notomys aquilo -rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:11 # TaxonConcept Panax ginseng LISTING cites_listed for species Panax ginseng -rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:14 # TaxonConcept Panax ginseng LISTING cites_listed for genus Panax -rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:20 # TaxonConcept Panax ginseng LISTING eu_listed for species Panax ginseng -rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:23 # TaxonConcept Panax ginseng LISTING eu_listed for genus Panax -rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:29 # TaxonConcept Panax ginseng LISTING cites_listing for species Panax ginseng -rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:35 # TaxonConcept Panax ginseng LISTING eu_listing for species Panax ginseng -rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:41 # TaxonConcept Panax ginseng LISTING ann_symbol for species Panax ginseng -rspec ./spec/models/taxon_concept/panax_ginseng_spec.rb:47 # TaxonConcept Panax ginseng LISTING hash_ann_symbol for species Panax ginseng -rspec ./spec/models/taxon_concept/pereskia_spec.rb:10 # TaxonConcept Pereskia LISTING cites_listing for genus Pereskia (not listed, shown) -rspec ./spec/models/taxon_concept/pereskia_spec.rb:13 # TaxonConcept Pereskia LISTING cites_listing for genus Ariocarpus -rspec ./spec/models/taxon_concept/pereskia_spec.rb:16 # TaxonConcept Pereskia LISTING cites_listing for family Cactaceae -rspec ./spec/models/taxon_concept/pereskia_spec.rb:22 # TaxonConcept Pereskia LISTING eu_listing for genus Pereskia (not listed, shown) -rspec ./spec/models/taxon_concept/pereskia_spec.rb:25 # TaxonConcept Pereskia LISTING eu_listing for genus Ariocarpus -rspec ./spec/models/taxon_concept/pereskia_spec.rb:28 # TaxonConcept Pereskia LISTING eu_listing for family Cactaceae -rspec ./spec/models/taxon_concept/pereskia_spec.rb:34 # TaxonConcept Pereskia LISTING cites_listed for family Cactaceae -rspec ./spec/models/taxon_concept/pereskia_spec.rb:37 # TaxonConcept Pereskia LISTING cites_listed for genus Pereskia -rspec ./spec/models/taxon_concept/pereskia_spec.rb:43 # TaxonConcept Pereskia LISTING eu_listed for family Cactaceae -rspec ./spec/models/taxon_concept/pereskia_spec.rb:46 # TaxonConcept Pereskia LISTING eu_listed for genus Pereskia -rspec ./spec/models/taxon_concept/pereskia_spec.rb:52 # TaxonConcept Pereskia LISTING cites_status for genus Pereskia -rspec ./spec/models/taxon_concept/pereskia_spec.rb:58 # TaxonConcept Pereskia LISTING cites_show for genus Pereskia -rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:10 # TaxonConcept Platysternon megacephalum LISTING cites_listing for family Platysternidae -rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:13 # TaxonConcept Platysternon megacephalum LISTING cites_listing for species Platysternon megacephalum -rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:19 # TaxonConcept Platysternon megacephalum LISTING cites_listed for species Platysternon megacephalum -rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:25 # TaxonConcept Platysternon megacephalum LISTING cites_show for species Platysternon megacephalum -rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:31 # TaxonConcept Platysternon megacephalum LISTING eu_listing for family Platysternidae -rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:34 # TaxonConcept Platysternon megacephalum LISTING eu_listing for species Platysternon megacephalum -rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:40 # TaxonConcept Platysternon megacephalum LISTING eu_listed for species Platysternon megacephalum -rspec ./spec/models/taxon_concept/platysternon_megacephalum_spec.rb:46 # TaxonConcept Platysternon megacephalum LISTING eu_show for species Platysternon megacephalum -rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:10 # TaxonConcept Pristis microdon LISTING cites_listing for family Pristidae -rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:13 # TaxonConcept Pristis microdon LISTING cites_listing for species Pristis microdon -rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:19 # TaxonConcept Pristis microdon LISTING cites_listed for species Pristis microdon -rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:25 # TaxonConcept Pristis microdon LISTING cites_show for species Pristis microdon -rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:31 # TaxonConcept Pristis microdon LISTING eu_listing for family Pristidae -rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:34 # TaxonConcept Pristis microdon LISTING eu_listing for species Pristis microdon -rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:40 # TaxonConcept Pristis microdon LISTING eu_listed for species Pristis microdon -rspec ./spec/models/taxon_concept/pristis_microdon_spec.rb:46 # TaxonConcept Pristis microdon LISTING eu_show for species Pristis microdon -rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:10 # TaxonConcept Pseudomys fieldi LISTING cites_listing for subspecies Pseudomys fieldi preaconis -rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:13 # TaxonConcept Pseudomys fieldi LISTING cites_listing for species Pseudomys fieldi -rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:19 # TaxonConcept Pseudomys fieldi LISTING eu_listing for subspecies Pseudomys fieldi preaconis -rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:22 # TaxonConcept Pseudomys fieldi LISTING eu_listing for species Pseudomys fieldi -rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:28 # TaxonConcept Pseudomys fieldi LISTING cites_show for subspecies Pseudomys fieldi preaconis -rspec ./spec/models/taxon_concept/pseudomys_fieldi_spec.rb:31 # TaxonConcept Pseudomys fieldi LISTING cites_show for species Pseudomys fieldi -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:10 # TaxonConcept Psittaciformes LISTING cites_listing for order Psittaciformes -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:13 # TaxonConcept Psittaciformes LISTING cites_listing for species Cacatua goffiniana -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:16 # TaxonConcept Psittaciformes LISTING cites_listing for species Cacatua ducorpsi (H) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:19 # TaxonConcept Psittaciformes LISTING cites_listing for species Probosciger aterrimus -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:22 # TaxonConcept Psittaciformes LISTING cites_listing for species Amazona aestiva -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:25 # TaxonConcept Psittaciformes LISTING cites_listing for species Agapornis roseicollis (DEL II, not listed, not shown) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:28 # TaxonConcept Psittaciformes LISTING cites_listing for species Psittacula krameri (DEL III, not listed, not shown) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:31 # TaxonConcept Psittaciformes LISTING cites_listing for subspecies Amazona festiva festiva -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:37 # TaxonConcept Psittaciformes LISTING eu_listing for order Psittaciformes -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:40 # TaxonConcept Psittaciformes LISTING eu_listing for species Cacatua goffiniana -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:43 # TaxonConcept Psittaciformes LISTING eu_listing for species Cacatua ducorpsi (H) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:46 # TaxonConcept Psittaciformes LISTING eu_listing for species Probosciger aterrimus -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:49 # TaxonConcept Psittaciformes LISTING eu_listing for species Amazona aestiva -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:52 # TaxonConcept Psittaciformes LISTING eu_listing for species Agapornis roseicollis (DEL II, not listed, not shown) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:55 # TaxonConcept Psittaciformes LISTING eu_listing for species Psittacula krameri (DEL III, not listed, not shown) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:58 # TaxonConcept Psittaciformes LISTING eu_listing for subspecies Amazona festiva festiva -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:64 # TaxonConcept Psittaciformes LISTING cites_listed for order Psittaciformes -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:67 # TaxonConcept Psittaciformes LISTING cites_listed for family Cacatuidae -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:70 # TaxonConcept Psittaciformes LISTING cites_listed for genus Cacatua -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:73 # TaxonConcept Psittaciformes LISTING cites_listed for species Cacatua goffiniana -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:76 # TaxonConcept Psittaciformes LISTING cites_listed for species Cacatua ducorpsi -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:79 # TaxonConcept Psittaciformes LISTING cites_listed for subspecies Amazona festiva festiva -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:85 # TaxonConcept Psittaciformes LISTING eu_listed for order Psittaciformes -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:88 # TaxonConcept Psittaciformes LISTING eu_listed for family Cacatuidae -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:91 # TaxonConcept Psittaciformes LISTING eu_listed for genus Cacatua -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:94 # TaxonConcept Psittaciformes LISTING eu_listed for species Cacatua goffiniana -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:97 # TaxonConcept Psittaciformes LISTING eu_listed for species Cacatua ducorpsi -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:100 # TaxonConcept Psittaciformes LISTING eu_listed for subspecies Amazona festiva festiva -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:106 # TaxonConcept Psittaciformes LISTING cites_show for species Agapornis roseicollis (DEL II) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:109 # TaxonConcept Psittaciformes LISTING cites_show for species Amazona aestiva -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:112 # TaxonConcept Psittaciformes LISTING cites_show for species Psittacula krameri (DEL III) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:118 # TaxonConcept Psittaciformes LISTING cites_status for species Agapornis roseicollis (DEL II) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:121 # TaxonConcept Psittaciformes LISTING cites_status for species Psittacula krameri (DEL III) -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:127 # TaxonConcept Psittaciformes LISTING show_in_checklist_ac for subspecies Amazona festiva festiva -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:133 # TaxonConcept Psittaciformes LISTING show_in_species_plus_ac for subspecies Amazona festiva festiva -rspec ./spec/models/taxon_concept/psittaciformes_spec.rb:139 # TaxonConcept Psittaciformes LISTING show_in_species_plus for subspecies Amazona festiva festiva -rspec ./spec/models/taxon_concept/synonyms_spec.rb:93 # TaxonConcept create when has accepted parent overnight calculations -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:9 # TaxonConcept Tapiridae TAXONOMY full_name for family Tapiridae -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:14 # TaxonConcept Tapiridae TAXONOMY rank for family Tapiridae -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:19 # TaxonConcept Tapiridae TAXONOMY ancestors order -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:22 # TaxonConcept Tapiridae TAXONOMY ancestors class -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:30 # TaxonConcept Tapiridae LISTING cites_listing for family Tapiridae -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:33 # TaxonConcept Tapiridae LISTING cites_listing for species Tapirus terrestris -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:39 # TaxonConcept Tapiridae LISTING eu_listing for family Tapiridae -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:42 # TaxonConcept Tapiridae LISTING eu_listing for species Tapirus terrestris -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:48 # TaxonConcept Tapiridae LISTING cites_listed for family Tapiridae -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:51 # TaxonConcept Tapiridae LISTING cites_listed for genus Tapirus -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:54 # TaxonConcept Tapiridae LISTING cites_listed for species Tapirus terrestris -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:60 # TaxonConcept Tapiridae LISTING eu_listed for family Tapiridae -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:63 # TaxonConcept Tapiridae LISTING eu_listed for genus Tapirus -rspec ./spec/models/taxon_concept/tapiridae_spec.rb:66 # TaxonConcept Tapiridae LISTING eu_listed for species Tapirus terrestris -rspec ./spec/models/taxon_concept/trade_names_spec.rb:93 # TaxonConcept create when has accepted parent overnight calculations -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:10 # TaxonConcept Uroplatus REFERENCES cites_accepted for genus Uroplatus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:13 # TaxonConcept Uroplatus REFERENCES cites_accepted for species Uroplatus alluaudi -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:16 # TaxonConcept Uroplatus REFERENCES cites_accepted for species Uroplatus giganteus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:21 # TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for family Gekkonidae -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:24 # TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for genus Uroplatus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:27 # TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for species Uroplatus alluaudi -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:30 # TaxonConcept Uroplatus REFERENCES standard_taxon_concept_references for species Uroplatus giganteus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:37 # TaxonConcept Uroplatus LISTING cites_listing for genus Uroplatus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:40 # TaxonConcept Uroplatus LISTING cites_listing for species Uroplatus giganteus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:46 # TaxonConcept Uroplatus LISTING eu_listing for genus Uroplatus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:49 # TaxonConcept Uroplatus LISTING eu_listing for species Uroplatus giganteus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:55 # TaxonConcept Uroplatus LISTING cites_listed for family Gekkonidae -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:58 # TaxonConcept Uroplatus LISTING cites_listed for genus Uroplatus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:61 # TaxonConcept Uroplatus LISTING cites_listed for species Uroplatus giganteus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:67 # TaxonConcept Uroplatus LISTING eu_listed for family Gekkonidae -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:70 # TaxonConcept Uroplatus LISTING eu_listed for genus Uroplatus -rspec ./spec/models/taxon_concept/uroplatus_spec.rb:73 # TaxonConcept Uroplatus LISTING eu_listed for species Uroplatus giganteus -rspec ./spec/models/taxon_concept/varanidae_spec.rb:10 # TaxonConcept Varanidae REFERENCES cites_accepted for species Varanus bengalensis -rspec ./spec/models/taxon_concept/varanidae_spec.rb:15 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for order Sauria -rspec ./spec/models/taxon_concept/varanidae_spec.rb:18 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for family Varanidae -rspec ./spec/models/taxon_concept/varanidae_spec.rb:21 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bengalensis -rspec ./spec/models/taxon_concept/varanidae_spec.rb:24 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bushi -rspec ./spec/models/taxon_concept/varanidae_spec.rb:25 # TaxonConcept Varanidae REFERENCES standard_taxon_concept_references for species Varanus bushi -rspec ./spec/models/taxon_concept/varanidae_spec.rb:32 # TaxonConcept Varanidae LISTING cites_listing for genus Varanus -rspec ./spec/models/taxon_concept/varanidae_spec.rb:35 # TaxonConcept Varanidae LISTING cites_listing for species Varanus bengalensis -rspec ./spec/models/taxon_concept/varanidae_spec.rb:41 # TaxonConcept Varanidae LISTING eu_listing for genus Varanus -rspec ./spec/models/taxon_concept/varanidae_spec.rb:44 # TaxonConcept Varanidae LISTING eu_listing for species Varanus bengalensis -rspec ./spec/models/taxon_concept/varanidae_spec.rb:50 # TaxonConcept Varanidae LISTING cites_listed for family Varanidae -rspec ./spec/models/taxon_concept/varanidae_spec.rb:53 # TaxonConcept Varanidae LISTING cites_listed for genus Varanus -rspec ./spec/models/taxon_concept/varanidae_spec.rb:56 # TaxonConcept Varanidae LISTING cites_listed for species Varanus bengalensis -rspec ./spec/models/taxon_concept/varanidae_spec.rb:62 # TaxonConcept Varanidae LISTING eu_listed for family Varanidae -rspec ./spec/models/taxon_concept/varanidae_spec.rb:65 # TaxonConcept Varanidae LISTING eu_listed for genus Varanus -rspec ./spec/models/taxon_concept/varanidae_spec.rb:68 # TaxonConcept Varanidae LISTING eu_listed for species Varanus bengalensis -rspec ./spec/models/trade/annual_report_upload_spec.rb:54 # Trade::AnnualReportUpload valid? when uploaded file as exporter with exporter column headers -rspec ./spec/models/trade/annual_report_upload_spec.rb:64 # Trade::AnnualReportUpload valid? when uploaded file as importer with exporter column headers -rspec ./spec/models/trade/annual_report_upload_spec.rb:74 # Trade::AnnualReportUpload valid? when uploaded file as importer with importer column headers -rspec ./spec/models/trade/annual_report_upload_spec.rb:84 # Trade::AnnualReportUpload valid? when uploaded file as exporter with importer column headers -rspec ./spec/models/trade/annual_report_upload_spec.rb:99 # Trade::AnnualReportUpload validation_errors -rspec ./spec/models/trade/annual_report_upload_spec.rb:112 # Trade::AnnualReportUpload create when blank lines in import file -rspec ./spec/models/trade/annual_report_upload_spec.rb:127 # Trade::AnnualReportUpload destroy -rspec ./spec/models/trade/distinct_values_validation_rule_spec.rb:52 # Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal importer (E) -rspec ./spec/models/trade/distinct_values_validation_rule_spec.rb:69 # Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal importer (I) -rspec ./spec/models/trade/distinct_values_validation_rule_spec.rb:82 # Trade::DistinctValuesValidationRule validation_errors_for_aru exporter should not equal country of origin -rspec ./spec/models/trade/filter_spec.rb:15 # Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank -rspec ./spec/models/trade/filter_spec.rb:16 # Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank -rspec ./spec/models/trade/filter_spec.rb:17 # Trade::Filter results when searching by taxon concepts ids in the public interface at GENUS rank -rspec ./spec/models/trade/filter_spec.rb:25 # Trade::Filter results when searching by taxon concepts ids in the public interface at FAMILY rank -rspec ./spec/models/trade/filter_spec.rb:34 # Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank -rspec ./spec/models/trade/filter_spec.rb:35 # Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank -rspec ./spec/models/trade/filter_spec.rb:36 # Trade::Filter results when searching by taxon concepts ids in the admin interface at GENUS rank -rspec ./spec/models/trade/filter_spec.rb:43 # Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank -rspec ./spec/models/trade/filter_spec.rb:44 # Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank -rspec ./spec/models/trade/filter_spec.rb:45 # Trade::Filter results when searching by taxon concepts ids in the admin interface at FAMILY rank -rspec ./spec/models/trade/filter_spec.rb:54 # Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks -rspec ./spec/models/trade/filter_spec.rb:55 # Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks -rspec ./spec/models/trade/filter_spec.rb:56 # Trade::Filter results when searching by taxon concepts ids in the admin interface at mixed ranks -rspec ./spec/models/trade/filter_spec.rb:68 # Trade::Filter results when searching by taxon concepts ids when status N shipments present -rspec ./spec/models/trade/filter_spec.rb:79 # Trade::Filter results when searching by taxon concepts ids when subspecies shipments present -rspec ./spec/models/trade/filter_spec.rb:95 # Trade::Filter results when searching by taxon concepts ids when synonym subspecies shipments present when searching by taxonomic parent -rspec ./spec/models/trade/filter_spec.rb:103 # Trade::Filter results when searching by taxon concepts ids when synonym subspecies shipments present when searching by accepted name -rspec ./spec/models/trade/filter_spec.rb:122 # Trade::Filter results when searching by reported taxon concepts ids when trade names shipments present -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:65 # Trade::InclusionValidationRule matching_records_for_aru_and_error -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:104 # Trade::InclusionValidationRule refresh_errors_if_needed when no updates -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:112 # Trade::InclusionValidationRule refresh_errors_if_needed when updates and error fixed for all records error record is destroyed -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:123 # Trade::InclusionValidationRule refresh_errors_if_needed when updates and error fixed for some records error record is updated to reflect new error_count -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:148 # Trade::InclusionValidationRule validation_errors_for_aru species name may have extra whitespace between name segments -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:175 # Trade::InclusionValidationRule validation_errors_for_aru trading partner should be a valid iso code -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:202 # Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with unit as defined by term_trade_codes_pairs table when invalid combination -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:214 # Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with unit as defined by term_trade_codes_pairs table when required unit blank -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:234 # Trade::InclusionValidationRule validation_errors_for_aru term can only be paired with purpose as defined by term_trade_codes_pairs table -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:255 # Trade::InclusionValidationRule validation_errors_for_aru taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table when accepted name -rspec ./spec/models/trade/inclusion_validation_rule_spec.rb:272 # Trade::InclusionValidationRule validation_errors_for_aru taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table when hybrid -rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:74 # Trade::InclusionValidationRule validation_errors_for_aru when W source and country of origin blank and exporter doesn't match distribution (E) -rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:97 # Trade::InclusionValidationRule validation_errors_for_aru when W source and country of origin blank and exporter doesn't match distribution (I) -rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:120 # Trade::InclusionValidationRule validation_errors_for_aru when W source and country XX -rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:143 # Trade::InclusionValidationRule validation_errors_for_aru when W source and country doesn't match distribution of higher taxa -rspec ./spec/models/trade/pov_inclusion_validation_rule_spec.rb:160 # Trade::InclusionValidationRule validation_errors_for_aru when invalid scope specified -rspec ./spec/models/trade/sandbox_filter_spec.rb:64 # Trade::SandboxFilter results -rspec ./spec/models/trade/sandbox_filter_spec.rb:65 # Trade::SandboxFilter results -rspec ./spec/models/trade/sandbox_spec.rb:47 # Trade::Sandbox destroy -rspec ./spec/models/trade/sandbox_template_spec.rb:56 # Trade::SandboxTemplate update -rspec ./spec/models/trade/sandbox_template_spec.rb:78 # Trade::SandboxTemplate update_batch -rspec ./spec/models/trade/scoped_inclusion_validation_rule_spec.rb:21 # Trade::InclusionValidationRule validation_errors when W source and country of origin matches distribution -rspec ./spec/models/trade/scoped_inclusion_validation_rule_spec.rb:48 # Trade::InclusionValidationRule validation_errors when W source and country of origin blank -rspec ./spec/models/trade/shipment_spec.rb:123 # Trade::Shipment secondary validations when species name + appendix + year invalid -rspec ./spec/models/trade/shipment_spec.rb:132 # Trade::Shipment secondary validations when species name + appendix + year invalid -rspec ./spec/models/trade/shipment_spec.rb:141 # Trade::Shipment secondary validations when species name + appendix + year valid -rspec ./spec/models/trade/shipment_spec.rb:163 # Trade::Shipment secondary validations when species name + appendix N + year valid -rspec ./spec/models/trade/shipment_spec.rb:184 # Trade::Shipment secondary validations when species name + appendix N + year not CITES listed and not EU listed -rspec ./spec/models/trade/shipment_spec.rb:445 # Trade::Shipment secondary validations when species name + source code invalid -rspec ./spec/models/trade/shipment_spec.rb:455 # Trade::Shipment secondary validations when species name + source code valid -rspec ./spec/models/trade/shipments_comptab_export_spec.rb:12 # Trade::ShipmentsComptabExport total_cnt when internal -rspec ./spec/models/trade/shipments_comptab_export_spec.rb:16 # Trade::ShipmentsComptabExport total_cnt when public -rspec ./spec/models/trade/shipments_comptab_export_spec.rb:23 # Trade::ShipmentsComptabExport query when internal -rspec ./spec/models/trade/shipments_comptab_export_spec.rb:27 # Trade::ShipmentsComptabExport query when public -rspec ./spec/models/trade/shipments_export_spec.rb:23 # Trade::ShipmentsExport query when internal -rspec ./spec/models/trade/shipments_export_spec.rb:27 # Trade::ShipmentsExport query when public -rspec ./spec/models/trade/shipments_gross_exports_export_spec.rb:12 # Trade::ShipmentsGrossExportsExport total_cnt when internal -rspec ./spec/models/trade/shipments_gross_exports_export_spec.rb:16 # Trade::ShipmentsGrossExportsExport total_cnt when public -rspec ./spec/models/trade/shipments_gross_exports_export_spec.rb:23 # Trade::ShipmentsGrossExportsExport query when internal -rspec ./spec/models/trade/shipments_gross_exports_export_spec.rb:27 # Trade::ShipmentsGrossExportsExport query when public -rspec ./spec/models/trade/shipments_gross_imports_export_spec.rb:12 # Trade::ShipmentsGrossImportsExport total_cnt when internal -rspec ./spec/models/trade/shipments_gross_imports_export_spec.rb:16 # Trade::ShipmentsGrossImportsExport total_cnt when public -rspec ./spec/models/trade/shipments_gross_imports_export_spec.rb:23 # Trade::ShipmentsGrossImportsExport query when internal -rspec ./spec/models/trade/shipments_gross_imports_export_spec.rb:27 # Trade::ShipmentsGrossImportsExport query when public -rspec ./spec/models/trade/shipments_net_exports_export_spec.rb:12 # Trade::ShipmentsNetExportsExport total_cnt when internal -rspec ./spec/models/trade/shipments_net_exports_export_spec.rb:16 # Trade::ShipmentsNetExportsExport total_cnt when public -rspec ./spec/models/trade/shipments_net_exports_export_spec.rb:23 # Trade::ShipmentsNetExportsExport query when internal -rspec ./spec/models/trade/shipments_net_exports_export_spec.rb:27 # Trade::ShipmentsNetExportsExport query when public -rspec ./spec/models/trade/shipments_net_imports_export_spec.rb:12 # Trade::ShipmentsNetImportsExport total_cnt when internal -rspec ./spec/models/trade/shipments_net_imports_export_spec.rb:16 # Trade::ShipmentsNetImportsExport total_cnt when public -rspec ./spec/models/trade/shipments_net_imports_export_spec.rb:23 # Trade::ShipmentsNetImportsExport query when internal -rspec ./spec/models/trade/shipments_net_imports_export_spec.rb:27 # Trade::ShipmentsNetImportsExport query when public -rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:77 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when split listing -rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:94 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when old listing -rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:98 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when old listing -rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:113 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when appendix N and CITES listed -rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:117 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when appendix N and CITES listed -rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:132 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when reported under a synonym, but otherwise fine -rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:169 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when CITES listed when hybrid -rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:185 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when not CITES listed but EU listed -rspec ./spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb:200 # Trade::TaxonConceptAppendixYearValidationRule validation_errors_for_aru when not CITES listed and not EU listed -rspec ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:42 # Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Animalia, source_code can't be A -rspec ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:46 # Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Animalia, source_code can't be A -rspec ./spec/models/trade/taxon_concept_source_validation_rule_spec.rb:63 # Trade::TaxonConceptSourceValidationRule validation_errors_for_aru when species name is from Kingdom Plantae, source_code can't be C or R -rspec ./spec/models/trade/validation_rule_spec.rb:56 # Trade::ValidationRule matching_records_for_aru_and_error -rspec ./spec/models/trade/validation_rule_spec.rb:94 # Trade::ValidationRule refresh_errors_if_needed when no updates -rspec ./spec/models/trade/validation_rule_spec.rb:102 # Trade::ValidationRule refresh_errors_if_needed when updates and error fixed for all records error record is destroyed -rspec ./spec/models/trade/validation_rule_spec.rb:113 # Trade::ValidationRule refresh_errors_if_needed when updates and error fixed for some records error record is updated to reflect new error_count -rspec ./spec/models/trade/validation_rule_spec.rb:136 # Trade::ValidationRule Trade::PresenceValidationRule validation_errors_for_aru trading_partner should not be blank -rspec ./spec/models/trade/validation_rule_spec.rb:157 # Trade::ValidationRule Trade::NumericalityValidationRule validation_errors_for_aru quantity should be a number -rspec ./spec/models/trade/validation_rule_spec.rb:174 # Trade::ValidationRule Trade::FormatValidationRule validation_errors_for_aru year should be a 4 digit value -rspec ./spec/workers/eu_regulation_activation_worker_spec.rb:32 # EuRegulationActivationWorker Set new EU regulation to true -rspec ./spec/workers/eu_regulation_activation_worker_spec.rb:33 # EuRegulationActivationWorker Set new EU regulation to true -rspec ./spec/workers/eu_regulation_activation_worker_spec.rb:40 # EuRegulationActivationWorker Set new EU regulation to true Set old EU regulation to false -rspec ./spec/workers/eu_regulation_activation_worker_spec.rb:41 # EuRegulationActivationWorker Set new EU regulation to true Set old EU regulation to false -rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:42 # EventListingChangesCopyWorker when copy into non-current regulation -rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:43 # EventListingChangesCopyWorker when copy into non-current regulation -rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:48 # EventListingChangesCopyWorker when copy into current regulation -rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:49 # EventListingChangesCopyWorker when copy into current regulation -rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:70 # EventListingChangesCopyWorker when exclusion -rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:71 # EventListingChangesCopyWorker when exclusion -rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:72 # EventListingChangesCopyWorker when exclusion -rspec ./spec/workers/event_listing_changes_copy_worker_spec.rb:73 # EventListingChangesCopyWorker when exclusion -rspec ./spec/workers/quotas_copy_worker_spec.rb:47 # QuotasCopyWorker Copy single quota, for a given year -rspec ./spec/workers/quotas_copy_worker_spec.rb:48 # QuotasCopyWorker Copy single quota, for a given year -rspec ./spec/workers/quotas_copy_worker_spec.rb:49 # QuotasCopyWorker Copy single quota, for a given year -rspec ./spec/workers/quotas_copy_worker_spec.rb:50 # QuotasCopyWorker Copy single quota, for a given year -rspec ./spec/workers/quotas_copy_worker_spec.rb:59 # QuotasCopyWorker Try to copy quota from wrong year -rspec ./spec/workers/quotas_copy_worker_spec.rb:60 # QuotasCopyWorker Try to copy quota from wrong year -rspec ./spec/workers/quotas_copy_worker_spec.rb:61 # QuotasCopyWorker Try to copy quota from wrong year -rspec ./spec/workers/quotas_copy_worker_spec.rb:70 # QuotasCopyWorker Copy quota when there are no current quotas -rspec ./spec/workers/quotas_copy_worker_spec.rb:71 # QuotasCopyWorker Copy quota when there are no current quotas -rspec ./spec/workers/quotas_copy_worker_spec.rb:72 # QuotasCopyWorker Copy quota when there are no current quotas -rspec ./spec/workers/quotas_copy_worker_spec.rb:90 # QuotasCopyWorker When multiple quotas copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:91 # QuotasCopyWorker When multiple quotas copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:92 # QuotasCopyWorker When multiple quotas copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:93 # QuotasCopyWorker When multiple quotas copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:94 # QuotasCopyWorker When multiple quotas copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:112 # QuotasCopyWorker When multiple quotas copy quota for both countries -rspec ./spec/workers/quotas_copy_worker_spec.rb:113 # QuotasCopyWorker When multiple quotas copy quota for both countries -rspec ./spec/workers/quotas_copy_worker_spec.rb:114 # QuotasCopyWorker When multiple quotas copy quota for both countries -rspec ./spec/workers/quotas_copy_worker_spec.rb:115 # QuotasCopyWorker When multiple quotas copy quota for both countries -rspec ./spec/workers/quotas_copy_worker_spec.rb:116 # QuotasCopyWorker When multiple quotas copy quota for both countries -rspec ./spec/workers/quotas_copy_worker_spec.rb:134 # QuotasCopyWorker When multiple quotas don't copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:135 # QuotasCopyWorker When multiple quotas don't copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:136 # QuotasCopyWorker When multiple quotas don't copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:137 # QuotasCopyWorker When multiple quotas don't copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:138 # QuotasCopyWorker When multiple quotas don't copy quota for given country -rspec ./spec/workers/quotas_copy_worker_spec.rb:155 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:156 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:157 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:158 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:159 # QuotasCopyWorker When multiple quotas copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:177 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts -rspec ./spec/workers/quotas_copy_worker_spec.rb:178 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts -rspec ./spec/workers/quotas_copy_worker_spec.rb:179 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts -rspec ./spec/workers/quotas_copy_worker_spec.rb:180 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts -rspec ./spec/workers/quotas_copy_worker_spec.rb:181 # QuotasCopyWorker When multiple quotas copy quota for both taxon_concepts -rspec ./spec/workers/quotas_copy_worker_spec.rb:198 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:199 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:200 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:201 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:202 # QuotasCopyWorker When multiple quotas don't copy quota for given taxon_concept -rspec ./spec/workers/quotas_copy_worker_spec.rb:222 # QuotasCopyWorker When text to replace passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:223 # QuotasCopyWorker When text to replace passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:224 # QuotasCopyWorker When text to replace passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:225 # QuotasCopyWorker When text to replace passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:226 # QuotasCopyWorker When text to replace passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:227 # QuotasCopyWorker When text to replace passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:228 # QuotasCopyWorker When text to replace passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:229 # QuotasCopyWorker When text to replace passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:245 # QuotasCopyWorker When url passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:246 # QuotasCopyWorker When url passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:247 # QuotasCopyWorker When url passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:248 # QuotasCopyWorker When url passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:249 # QuotasCopyWorker When url passed, should be replaced -rspec ./spec/workers/quotas_copy_worker_spec.rb:250 # QuotasCopyWorker When url passed, should be replaced -[Coveralls] Outside the Travis environment, not sending data. -Coverage report generated for RSpec to /SAPI/coverage. 7170 / 10441 LOC (68.67%) covered. From 4a2477a9e4d7d706cb287674199b84125a7de934 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 15:33:13 +0000 Subject: [PATCH 055/334] Requiring `rspec/autorun` when running RSpec via the `rspec` command is deprecated. --- spec/spec_helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8baeb9fd4e..6ecce131b9 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -14,7 +14,6 @@ ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' -require 'rspec/autorun' require 'sidekiq/testing' require 'capybara/rspec' require 'capybara/rails' From a6782a8c75cc07b3e483d9a98eb7cf4332b2edd5 Mon Sep 17 00:00:00 2001 From: Daniel Perrett Date: Wed, 10 Jan 2024 11:35:38 +0000 Subject: [PATCH 056/334] Fix an issue in Rails 4.2 where NULL was being sent to a NOT NULL column --- app/models/document_batch.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/document_batch.rb b/app/models/document_batch.rb index 5bf95d60e5..32929f68f9 100644 --- a/app/models/document_batch.rb +++ b/app/models/document_batch.rb @@ -49,8 +49,10 @@ def initialize_documents(documents_attributes, files) end def common_attributes - is_public = ActiveRecord::Type::Boolean.new.type_cast_from_database(@is_public) # Rails 4 - # is_public = ActiveRecord::Type::Boolean.new.cast(@is_public) # TODO Rails 5 + # Coalesce nil to false, because there is a NOT NULL constraint on this field, + # with a DEFAULT of FALSE. (This was not required prior to Rails 4.2). + is_public = ActiveRecord::Type::Boolean.new.type_cast_from_database(@is_public || false) # Rails 4 + # is_public = ActiveRecord::Type::Boolean.new.cast(@is_public || false) # TODO Rails 5 { 'event_id' => @event_id, From 8dd2af7af0b9d1f03358a93eaef132b00a976bda Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 15:37:50 +0000 Subject: [PATCH 057/334] transpec --- spec/workers/submission_worker_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/workers/submission_worker_spec.rb b/spec/workers/submission_worker_spec.rb index 083aebefb8..180d35177f 100644 --- a/spec/workers/submission_worker_spec.rb +++ b/spec/workers/submission_worker_spec.rb @@ -64,7 +64,7 @@ def deliver } specify "leading space is stripped" do SubmissionWorker.new.perform(@aru.id, @submitter.id) - Trade::Permit.find_by_number('BBB').should_not be_nil + expect(Trade::Permit.find_by_number('BBB')).not_to be_nil end context "when permit previously reported" do before(:each) { create(:permit, :number => 'xxx') } @@ -127,11 +127,11 @@ def deliver } specify { SubmissionWorker.new.perform(@aru.id, @submitter.id) - Trade::Shipment.first.taxon_concept_id.should == @species.id + expect(Trade::Shipment.first.taxon_concept_id).to eq(@species.id) } specify { SubmissionWorker.new.perform(@aru.id, @submitter.id) - Trade::Shipment.first.reported_taxon_concept_id.should == @synonym.id + expect(Trade::Shipment.first.reported_taxon_concept_id).to eq(@synonym.id) } end end From ace9dfda57ac9fd575da169ee55d056aa73538c2 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 15:50:32 +0000 Subject: [PATCH 058/334] enhance the boolean check --- app/models/document_batch.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/document_batch.rb b/app/models/document_batch.rb index 32929f68f9..29821bfa4c 100644 --- a/app/models/document_batch.rb +++ b/app/models/document_batch.rb @@ -51,8 +51,8 @@ def initialize_documents(documents_attributes, files) def common_attributes # Coalesce nil to false, because there is a NOT NULL constraint on this field, # with a DEFAULT of FALSE. (This was not required prior to Rails 4.2). - is_public = ActiveRecord::Type::Boolean.new.type_cast_from_database(@is_public || false) # Rails 4 - # is_public = ActiveRecord::Type::Boolean.new.cast(@is_public || false) # TODO Rails 5 + is_public = ActiveRecord::Type::Boolean.new.type_cast_from_database(@is_public) || false # Rails 4 + # is_public = ActiveRecord::Type::Boolean.new.cast(@is_public) || false # TODO Rails 5 { 'event_id' => @event_id, From 250f197e4d495365d00038dbff14d75855fc62ff Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 16:49:43 +0000 Subject: [PATCH 059/334] Revert "https://stackoverflow.com/questions/35379535/how-to-resolve-rspecs-deprecation-warning-about-the-new-expect-syntax" This reverts commit aa1702c5801a7c1f733157e3c9cbb4a7f9691fdf. --- .../controllers/admin/exports_controller_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/controllers/admin/exports_controller_spec.rb b/spec/controllers/admin/exports_controller_spec.rb index 5db3a6f2e9..769dc71159 100644 --- a/spec/controllers/admin/exports_controller_spec.rb +++ b/spec/controllers/admin/exports_controller_spec.rb @@ -6,8 +6,8 @@ describe "GET index" do it "renders the index template" do get :index - expect(response).to render_template("index") - expect(response).to render_template("layouts/admin") + response.should render_template("index") + response.should render_template("layouts/admin") end end describe "GET download with data_type=Names" do @@ -24,7 +24,7 @@ end it "redirects when no results" do get :download, :data_type => "Names" - expect(response).to redirect_to(admin_exports_path) + response.should redirect_to(admin_exports_path) end end context "CITES_EU" do @@ -37,7 +37,7 @@ end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } - expect(response).to redirect_to(admin_exports_path) + response.should redirect_to(admin_exports_path) end end context "CMS" do @@ -50,7 +50,7 @@ end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } - expect(response).to redirect_to(admin_exports_path) + response.should redirect_to(admin_exports_path) end end end @@ -69,7 +69,7 @@ end it "redirects when no results" do get :download, :data_type => "Distributions" - expect(response).to redirect_to(admin_exports_path) + response.should redirect_to(admin_exports_path) end end context "CITES_EU" do @@ -83,7 +83,7 @@ end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } - expect(response).to redirect_to(admin_exports_path) + response.should redirect_to(admin_exports_path) end end context "CMS" do @@ -97,7 +97,7 @@ end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } - expect(response).to redirect_to(admin_exports_path) + response.should redirect_to(admin_exports_path) end end end From 69cd56f33e10d3fe582794f9ae4537df48a5240c Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 16:53:14 +0000 Subject: [PATCH 060/334] revert commit c1582b3811306f0b326c583295fd6a6ade5354b6 --- .../admin/taxon_relationships_controller_spec.rb | 2 +- .../controllers/cites_trade/exports_controller_spec.rb | 10 +++++----- .../checklist/pdf/history_annotations_key_spec.rb | 6 +++--- .../models/checklist/pdf/index_annotations_key_spec.rb | 10 +++++----- spec/models/sapi/geoip_spec.rb | 2 +- spec/workers/submission_worker_spec.rb | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spec/controllers/admin/taxon_relationships_controller_spec.rb b/spec/controllers/admin/taxon_relationships_controller_spec.rb index 131f7d7255..56274f9dc7 100644 --- a/spec/controllers/admin/taxon_relationships_controller_spec.rb +++ b/spec/controllers/admin/taxon_relationships_controller_spec.rb @@ -27,7 +27,7 @@ describe "XHR POST create" do let(:taxon_relationship_attributes) { build_attributes(:taxon_relationship) } before do - allow(TaxonRelationshipType).to receive(:find).and_return(equal_relationship_type) + TaxonRelationshipType.stub(:find).and_return(equal_relationship_type) end it "renders create when successful" do xhr :post, :create, :taxon_relationship => taxon_relationship_attributes, diff --git a/spec/controllers/cites_trade/exports_controller_spec.rb b/spec/controllers/cites_trade/exports_controller_spec.rb index 4058e10aa9..be9de21807 100644 --- a/spec/controllers/cites_trade/exports_controller_spec.rb +++ b/spec/controllers/cites_trade/exports_controller_spec.rb @@ -14,8 +14,8 @@ it "returns comptab shipments file" do create(:shipment) expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') - allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) - allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") + Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) + Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") get :download, :filters => { :report_type => :comptab } expect(response.content_type).to eq("text/csv") expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"shipments.csv\"") @@ -23,9 +23,9 @@ it "logs download information from public interface to the TradeDataDownload model" do create(:shipment) expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') - allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) - allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") - expect do + Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) + Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") + lambda do get :download, :filters => { :report_type => 'comptab', :exporters_ids => ['40'], diff --git a/spec/models/checklist/pdf/history_annotations_key_spec.rb b/spec/models/checklist/pdf/history_annotations_key_spec.rb index 15d0d94d51..31d4cd23be 100644 --- a/spec/models/checklist/pdf/history_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/history_annotations_key_spec.rb @@ -6,9 +6,9 @@ describe :annotations_key do subject { Checklist::Pdf::HistoryAnnotationsKey.new } specify { - allow(subject).to receive(:non_hash_annotations_key).and_return('x') - allow(subject).to receive(:hash_annotations_key).and_return('x') - expect(subject.annotations_key).to eq("\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in") + subject.stub(:non_hash_annotations_key).and_return('x') + subject.stub(:hash_annotations_key).and_return('x') + subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in" } end diff --git a/spec/models/checklist/pdf/index_annotations_key_spec.rb b/spec/models/checklist/pdf/index_annotations_key_spec.rb index c91a65e21e..108230cb77 100644 --- a/spec/models/checklist/pdf/index_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/index_annotations_key_spec.rb @@ -6,9 +6,9 @@ describe :annotations_key do subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - allow(subject).to receive(:non_hash_annotations_key).and_return('x') - allow(subject).to receive(:hash_annotations_key).and_return('x') - expect(subject.annotations_key).to eq("\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in") + subject.stub(:non_hash_annotations_key).and_return('x') + subject.stub(:hash_annotations_key).and_return('x') + subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in" } end @@ -100,8 +100,8 @@ end subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - allow(LatexToPdf).to receive(:html2latex).and_return('x') - expect(subject.non_hash_annotations_key).to eq("\\section*{\\nonHashAnnotations}\n\\cfbox{orange}{\\superscript{1} \\textbf{\\textit{Foobarus bizarrus}}}\n\nx\n\n\\cfbox{green}{\\superscript{2} \\textbf{\\textit{Foobaria curiosa}}}\n\nx\n\n") + LatexToPdf.stub(:html2latex).and_return('x') + subject.non_hash_annotations_key.should == "\\section*{\\nonHashAnnotations}\n\\cfbox{orange}{\\superscript{1} \\textbf{\\textit{Foobarus bizarrus}}}\n\nx\n\n\\cfbox{green}{\\superscript{2} \\textbf{\\textit{Foobaria curiosa}}}\n\nx\n\n" } end diff --git a/spec/models/sapi/geoip_spec.rb b/spec/models/sapi/geoip_spec.rb index ff9c1a7c44..519f6388c8 100644 --- a/spec/models/sapi/geoip_spec.rb +++ b/spec/models/sapi/geoip_spec.rb @@ -5,7 +5,7 @@ subject { Sapi::GeoIP.instance } before(:each) do bogota_latin1 = "Bogotá".encode('ISO-8859-1', 'UTF-8') - allow(subject).to receive(:country_and_city).and_return( + subject.stub(:country_and_city).and_return( { country: 'Colombia', city: bogota_latin1 diff --git a/spec/workers/submission_worker_spec.rb b/spec/workers/submission_worker_spec.rb index 180d35177f..53396f3f2a 100644 --- a/spec/workers/submission_worker_spec.rb +++ b/spec/workers/submission_worker_spec.rb @@ -32,7 +32,7 @@ def deliver :iso_code2 => 'PT' ) @submitter = FactoryGirl.create(:user, role: User::MANAGER) - allow(Trade::ChangelogCsvGenerator).to receive(:call).and_return(Tempfile.new('changelog.csv')) + Trade::ChangelogCsvGenerator.stub(:call).and_return(Tempfile.new('changelog.csv')) expect_any_instance_of(SubmissionWorker).to receive(:upload_on_S3) expect_any_instance_of(NotificationMailer).to receive(:mail).and_return(EmailMessageStub.new()) end From c46bcd3e6edb851fd5ba6ac4aa5f932fc6c11ffe Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 16:53:26 +0000 Subject: [PATCH 061/334] Revert "https://stackoverflow.com/a/24595681/556780" This reverts commit 16689f65a07fe4e9509437be59f806f8aee10525. --- .../admin/exports_controller_spec.rb | 12 +++++----- .../cites_trade/exports_controller_spec.rb | 6 ++--- .../species/exports_controller_spec.rb | 22 +++++++++---------- .../trade/exports_controller_spec.rb | 4 ++-- .../species/common_names_export_spec.rb | 3 ++- spec/models/species/documents_export_spec.rb | 3 ++- spec/models/species/listings_export_spec.rb | 3 ++- .../orphaned_taxon_concepts_export_spec.rb | 3 ++- .../species/species_reference_output_spec.rb | 3 ++- .../species/standard_reference_output_spec.rb | 3 ++- .../synonyms_and_trade_names_export_spec.rb | 3 ++- .../species/taxon_concepts_export_spec.rb | 3 ++- spec/workers/submission_worker_spec.rb | 4 ++-- 13 files changed, 40 insertions(+), 32 deletions(-) diff --git a/spec/controllers/admin/exports_controller_spec.rb b/spec/controllers/admin/exports_controller_spec.rb index 769dc71159..f12b0e9d7a 100644 --- a/spec/controllers/admin/exports_controller_spec.rb +++ b/spec/controllers/admin/exports_controller_spec.rb @@ -17,7 +17,7 @@ context "all" do it "returns taxon concepts names file" do create(:taxon_concept) - expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') + Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names" expect(response.content_type).to eq("text/csv") expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") @@ -30,7 +30,7 @@ context "CITES_EU" do it "returns CITES_EU taxon concepts names file" do create_cites_eu_species - expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') + Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } expect(response.content_type).to eq("text/csv") expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") @@ -43,7 +43,7 @@ context "CMS" do it "returns CMS taxon concepts names file" do create_cms_species - expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') + Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } expect(response.content_type).to eq("text/csv") expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") @@ -62,7 +62,7 @@ it "returns taxon concepts distributions file" do tc = create(:taxon_concept) create(:distribution, :taxon_concept_id => tc.id) - expect_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') + Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions" expect(response.content_type).to eq("text/csv") expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") @@ -76,7 +76,7 @@ it "returns CITES_EU taxon concepts distributions file" do tc = create_cites_eu_species create(:distribution, :taxon_concept_id => tc.id) - expect_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') + Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } expect(response.content_type).to eq("text/csv") expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") @@ -90,7 +90,7 @@ it "returns CMS taxon concepts distributions file" do tc = create_cms_species create(:distribution, :taxon_concept_id => tc.id) - expect_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') + Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } expect(response.content_type).to eq("text/csv") expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") diff --git a/spec/controllers/cites_trade/exports_controller_spec.rb b/spec/controllers/cites_trade/exports_controller_spec.rb index be9de21807..b809c0a051 100644 --- a/spec/controllers/cites_trade/exports_controller_spec.rb +++ b/spec/controllers/cites_trade/exports_controller_spec.rb @@ -13,7 +13,7 @@ context "comptab" do it "returns comptab shipments file" do create(:shipment) - expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') + Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") get :download, :filters => { :report_type => :comptab } @@ -22,7 +22,7 @@ end it "logs download information from public interface to the TradeDataDownload model" do create(:shipment) - expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') + Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") lambda do @@ -37,7 +37,7 @@ end context 'when shipments cannot be retrieved' do before(:each) do - expect_any_instance_of(Trade::ShipmentsExport).to receive(:export).and_return(false) + Trade::ShipmentsExport.any_instance.stub(:export).and_return(false) end it "redirects to home page" do get :download, :filters => { :report_type => :comptab } diff --git a/spec/controllers/species/exports_controller_spec.rb b/spec/controllers/species/exports_controller_spec.rb index 0290ea1ff6..edef05d280 100644 --- a/spec/controllers/species/exports_controller_spec.rb +++ b/spec/controllers/species/exports_controller_spec.rb @@ -9,7 +9,7 @@ end context 'with ip address to csv separator conversion' do it 'sets separator to comma with local ip address' do - expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("127.0.0.1") + ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("127.0.0.1") get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -20,8 +20,8 @@ end it 'sets separator to comma with UK ip address' do - expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("194.59.188.126") - expect_any_instance_of(Sapi::GeoIP).to receive(:country_and_city).and_return({ :country => "GB", :city => "Cambridge" }) + ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("194.59.188.126") + Sapi::GeoIP.any_instance.stub(:country_and_city).and_return({ :country => "GB", :city => "Cambridge" }) get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -31,8 +31,8 @@ end it 'sets separator to semicolon with AF ip address' do - expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("175.106.59.78") - expect_any_instance_of(Sapi::GeoIP).to receive(:country_and_city).and_return({ :country => "AF", :city => "Kabul" }) + ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("175.106.59.78") + Sapi::GeoIP.any_instance.stub(:country_and_city).and_return({ :country => "AF", :city => "Kabul" }) get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -42,7 +42,7 @@ end it 'sets separator back to comma when a user overrides the encoded default' do - expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("175.106.59.78") + ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("175.106.59.78") get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => 'comma' } @@ -52,7 +52,7 @@ end it 'sets separator to comma when IP address is nil' do - expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return(nil) + ActionDispatch::Request.any_instance.stub(:remote_ip).and_return(nil) get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -62,7 +62,7 @@ end it 'sets separator to comma when IP address is unknown' do - expect_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return('unknown') + ActionDispatch::Request.any_instance.stub(:remote_ip).and_return('unknown') get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -86,7 +86,7 @@ # it "returns listed species file" do # create_cites_I_addition(:taxon_concept => create_cites_eu_species, :is_current => true) # Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings -# expect_any_instance_of(Species::ListingsExport).to receive(:public_file_name).and_return('cites_listings.csv') +# Species::ListingsExport.any_instance.stub(:public_file_name).and_return('cites_listings.csv') # get :download, :data_type => 'Listings', :filters => {:designation => 'CITES'} # response.content_type.should eq("text/csv") # response.headers["Content-Disposition"].should eq("attachment; filename=\"cites_listings.csv\"") @@ -107,7 +107,7 @@ # it "returns listed species file" do # create_eu_A_addition(:taxon_concept => create_cites_eu_species, :event =>reg2013, :effective_at => '2013-08-10', :is_current => true) # Sapi::StoredProcedures.rebuild_eu_taxonomy_and_listings -# expect_any_instance_of(Species::ListingsExport).to receive(:public_file_name).and_return('eu_listings.csv') +# Species::ListingsExport.any_instance.stub(:public_file_name).and_return('eu_listings.csv') # get :download, :data_type => 'Listings', :filters => {:designation => 'EU'} # response.content_type.should eq("text/csv") # response.headers["Content-Disposition"].should eq("attachment; filename=\"eu_listings.csv\"") @@ -128,7 +128,7 @@ # it "returns listed species file" do # create_cms_I_addition(:taxon_concept => create_cms_species, :is_current => true) # Sapi::StoredProcedures.rebuild_cms_taxonomy_and_listings -# expect_any_instance_of(Species::ListingsExport).to receive(:public_file_name).and_return('cms_listings.csv') +# Species::ListingsExport.any_instance.stub(:public_file_name).and_return('cms_listings.csv') # get :download, :data_type => 'Listings', :filters => {:designation => 'CMS'} # response.content_type.should eq("text/csv") # response.headers["Content-Disposition"].should eq("attachment; filename=\"cms_listings.csv\"") diff --git a/spec/controllers/trade/exports_controller_spec.rb b/spec/controllers/trade/exports_controller_spec.rb index a2d5069909..e902dfda74 100644 --- a/spec/controllers/trade/exports_controller_spec.rb +++ b/spec/controllers/trade/exports_controller_spec.rb @@ -12,7 +12,7 @@ end it "does not log download information from the admin interface" do create(:shipment) - expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') + Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') expect { get :download, :filters => { :report_type => :raw, @@ -25,7 +25,7 @@ end context 'when shipments cannot be retrieved' do before(:each) do - expect_any_instance_of(Trade::ShipmentsExport).to receive(:export).and_return(false) + Trade::ShipmentsExport.any_instance.stub(:export).and_return(false) end it "redirects to home page" do get :download, :filters => { :report_type => :comptab } diff --git a/spec/models/species/common_names_export_spec.rb b/spec/models/species/common_names_export_spec.rb index aacd4d6d86..abcf2e5ecb 100644 --- a/spec/models/species/common_names_export_spec.rb +++ b/spec/models/species/common_names_export_spec.rb @@ -19,7 +19,8 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/common_names") ) - expect_any_instance_of(Species::CommonNamesExport).to receive(:path).and_return("spec/public/downloads/common_names/") + Species::CommonNamesExport.any_instance.stub(:path). + and_return("spec/public/downloads/common_names/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/common_names", true) diff --git a/spec/models/species/documents_export_spec.rb b/spec/models/species/documents_export_spec.rb index 5330024e36..8c0dc043bf 100644 --- a/spec/models/species/documents_export_spec.rb +++ b/spec/models/species/documents_export_spec.rb @@ -12,7 +12,8 @@ FileUtils.mkpath( File.expand_path("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}") ) - expect_any_instance_of(Species::DocumentsExport).to receive(:path).and_return("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}/") + Species::DocumentsExport.any_instance.stub(:path). + and_return("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}/") end after(:each) do FileUtils.remove_dir("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}", true) diff --git a/spec/models/species/listings_export_spec.rb b/spec/models/species/listings_export_spec.rb index abee7fe65e..7ef6332e64 100644 --- a/spec/models/species/listings_export_spec.rb +++ b/spec/models/species/listings_export_spec.rb @@ -25,7 +25,8 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/cites_listings") ) - expect_any_instance_of(Species::ListingsExport).to receive(:path).and_return("spec/public/downloads/cites_listings/") + Species::ListingsExport.any_instance.stub(:path). + and_return("spec/public/downloads/cites_listings/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/cites_listings", true) diff --git a/spec/models/species/orphaned_taxon_concepts_export_spec.rb b/spec/models/species/orphaned_taxon_concepts_export_spec.rb index d5c8a0d506..739a18d14a 100644 --- a/spec/models/species/orphaned_taxon_concepts_export_spec.rb +++ b/spec/models/species/orphaned_taxon_concepts_export_spec.rb @@ -20,7 +20,8 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/orphaned_taxon_concepts") ) - expect_any_instance_of(Species::OrphanedTaxonConceptsExport).to receive(:path).and_return("spec/public/downloads/orphaned_taxon_concepts/") + Species::OrphanedTaxonConceptsExport.any_instance.stub(:path). + and_return("spec/public/downloads/orphaned_taxon_concepts/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/orphaned_taxon_concepts", true) diff --git a/spec/models/species/species_reference_output_spec.rb b/spec/models/species/species_reference_output_spec.rb index 1b1a2b0ac5..e8ee5bce91 100644 --- a/spec/models/species/species_reference_output_spec.rb +++ b/spec/models/species/species_reference_output_spec.rb @@ -19,7 +19,8 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/species_reference_output") ) - expect_any_instance_of(Species::SpeciesReferenceOutputExport).to receive(:path).and_return("spec/public/downloads/species_reference_output/") + Species::SpeciesReferenceOutputExport.any_instance.stub(:path). + and_return("spec/public/downloads/species_reference_output/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/species_reference_output", true) diff --git a/spec/models/species/standard_reference_output_spec.rb b/spec/models/species/standard_reference_output_spec.rb index 7b5d4ef5ad..fcd7402d09 100644 --- a/spec/models/species/standard_reference_output_spec.rb +++ b/spec/models/species/standard_reference_output_spec.rb @@ -19,7 +19,8 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/standard_reference_output") ) - expect_any_instance_of(Species::StandardReferenceOutputExport).to receive(:path).and_return("spec/public/downloads/standard_reference_output/") + Species::StandardReferenceOutputExport.any_instance.stub(:path). + and_return("spec/public/downloads/standard_reference_output/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/standard_reference_output", true) diff --git a/spec/models/species/synonyms_and_trade_names_export_spec.rb b/spec/models/species/synonyms_and_trade_names_export_spec.rb index 9463b5a86e..45167fb1a7 100644 --- a/spec/models/species/synonyms_and_trade_names_export_spec.rb +++ b/spec/models/species/synonyms_and_trade_names_export_spec.rb @@ -25,7 +25,8 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/synonyms_and_trade_names") ) - expect_any_instance_of(Species::SynonymsAndTradeNamesExport).to receive(:path).and_return("spec/public/downloads/synonyms_and_trade_names/") + Species::SynonymsAndTradeNamesExport.any_instance.stub(:path). + and_return("spec/public/downloads/synonyms_and_trade_names/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/synonyms_and_trade_names", true) diff --git a/spec/models/species/taxon_concepts_export_spec.rb b/spec/models/species/taxon_concepts_export_spec.rb index e9d6bb7e5c..da237b5c43 100644 --- a/spec/models/species/taxon_concepts_export_spec.rb +++ b/spec/models/species/taxon_concepts_export_spec.rb @@ -19,7 +19,8 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/taxon_concepts_names") ) - expect_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:path).and_return("spec/public/downloads/taxon_concepts_names/") + Species::TaxonConceptsNamesExport.any_instance.stub(:path). + and_return("spec/public/downloads/taxon_concepts_names/") } after(:each) { FileUtils.remove_dir("spec/public/downloads/taxon_concepts_names", true) diff --git a/spec/workers/submission_worker_spec.rb b/spec/workers/submission_worker_spec.rb index 53396f3f2a..9279eb300f 100644 --- a/spec/workers/submission_worker_spec.rb +++ b/spec/workers/submission_worker_spec.rb @@ -33,8 +33,8 @@ def deliver ) @submitter = FactoryGirl.create(:user, role: User::MANAGER) Trade::ChangelogCsvGenerator.stub(:call).and_return(Tempfile.new('changelog.csv')) - expect_any_instance_of(SubmissionWorker).to receive(:upload_on_S3) - expect_any_instance_of(NotificationMailer).to receive(:mail).and_return(EmailMessageStub.new()) + SubmissionWorker.any_instance.stub(:upload_on_S3) + NotificationMailer.any_instance.stub(:mail).and_return(EmailMessageStub.new()) end context "when no primary errors" do pending(PENDING_REASON) if PENDING_REASON From 3eaf83b8bf6ba4f00cb1017d0a4ddc0e9ea90f1e Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 17:10:20 +0000 Subject: [PATCH 062/334] rollbar 4f07ea3574be84b71565b3fff4884646609b5b6c --- .../admin/change_types_controller_spec.rb | 14 +- .../admin/cites_acs_controller_spec.rb | 4 +- .../admin/cites_cops_controller_spec.rb | 4 +- ..._extraordinary_meetings_controller_spec.rb | 4 +- .../cites_hash_annotations_controller_spec.rb | 4 +- .../admin/cites_pcs_controller_spec.rb | 4 +- ...uspension_notifications_controller_spec.rb | 4 +- .../cites_suspensions_controller_spec.rb | 20 +-- .../admin/cites_tcs_controller_spec.rb | 4 +- .../admin/designations_controller_spec.rb | 18 +-- .../admin/distributions_controller_spec.rb | 26 ++-- .../admin/document_batches_controller_spec.rb | 12 +- .../admin/documents_controller_spec.rb | 66 ++++----- .../admin/ec_srgs_controller_spec.rb | 4 +- .../eu_council_regulations_controller_spec.rb | 4 +- .../eu_hash_annotations_controller_spec.rb | 4 +- ...mplementing_regulations_controller_spec.rb | 4 +- .../admin/eu_opinions_controller_spec.rb | 42 +++--- .../admin/eu_regulations_controller_spec.rb | 6 +- ..._suspension_regulations_controller_spec.rb | 6 +- .../admin/eu_suspensions_controller_spec.rb | 6 +- .../admin/events_controller_spec.rb | 22 +-- .../admin/exports_controller_spec.rb | 24 ++-- .../admin/geo_entities_controller_spec.rb | 14 +- .../hybrid_relationships_controller_spec.rb | 18 +-- .../admin/instruments_controller_spec.rb | 28 ++-- .../admin/languages_controller_spec.rb | 14 +- .../admin/listing_changes_controller_spec.rb | 10 +- .../lump_controller_spec.rb | 32 ++--- .../split_controller_spec.rb | 60 ++++---- .../status_swap_controller_spec.rb | 22 +-- .../status_to_accepted_controller_spec.rb | 16 +-- .../status_to_synonym_controller_spec.rb | 18 +-- .../nomenclature_changes_controller_spec.rb | 6 +- .../admin/ranks_controller_spec.rb | 14 +- .../admin/references_controller_spec.rb | 18 +-- .../admin/species_listings_controller_spec.rb | 14 +- .../admin/srg_histories_controller_spec.rb | 12 +- .../synonym_relationships_controller_spec.rb | 18 +-- .../controllers/admin/tags_controller_spec.rb | 14 +- ...taxon_cites_suspensions_controller_spec.rb | 26 ++-- .../admin/taxon_commons_controller_spec.rb | 36 ++--- .../taxon_concept_comments_controller_spec.rb | 10 +- ...axon_concept_references_controller_spec.rb | 18 +-- .../admin/taxon_concepts_controller_spec.rb | 42 +++--- .../taxon_eu_suspensions_controller_spec.rb | 36 ++--- .../taxon_listing_changes_controller_spec.rb | 40 +++--- .../admin/taxon_quotas_controller_spec.rb | 30 ++-- .../taxon_relationships_controller_spec.rb | 26 ++-- .../admin/taxonomies_controller_spec.rb | 24 ++-- ...ade_names_relationships_controller_spec.rb | 18 +-- .../admin/users_controller_spec.rb | 18 +-- ...complete_taxon_concepts_controller_spec.rb | 4 +- .../document_geo_entities_controller_spec.rb | 6 +- .../api/document_tags_controller.rb | 2 +- .../api/documents_controller_spec.rb | 20 +-- .../controllers/api/events_controller_spec.rb | 4 +- .../api/geo_entities_controller_spec.rb | 4 +- .../api/purposes_controller_spec.rb | 2 +- .../api/sources_controller_spec.rb | 2 +- spec/controllers/api/terms_controller_spec.rb | 2 +- spec/controllers/api/units_controller_spec.rb | 2 +- .../checklist/geo_entities_controller_spec.rb | 4 +- .../taxon_concepts_controller_spec.rb | 4 +- .../cites_trade/exports_controller_spec.rb | 14 +- .../cites_trade/shipments_controller_spec.rb | 16 +-- spec/controllers/pages_controller_spec.rb | 4 +- .../registrations_controller_spec.rb | 8 +- .../annual_report_uploads_controller_spec.rb | 10 +- .../trade/ember_controller_spec.rb | 2 +- .../trade/exports_controller_spec.rb | 2 +- .../sandbox_shipments_controller_spec.rb | 16 +-- .../trade/shipments_controller_spec.rb | 54 ++++---- .../validation_errors_controller_spec.rb | 2 +- .../trade/validation_rules_controller_spec.rb | 2 +- spec/helpers/admin_helper_spec.rb | 8 +- spec/helpers/listing_changes_helper_spec.rb | 16 +-- spec/models/annotation_spec.rb | 6 +- spec/models/change_type_spec.rb | 4 +- spec/models/checklist/annotations_spec.rb | 4 +- .../appendix_population_and_region_spec.rb | 14 +- .../checklist/appendix_population_spec.rb | 26 ++-- spec/models/checklist/appendix_spec.rb | 4 +- spec/models/checklist/checklist_spec.rb | 6 +- spec/models/checklist/common_names_spec.rb | 14 +- .../checklist/higher_taxa_injector_spec.rb | 39 +++--- .../models/checklist/higher_taxa_item_spec.rb | 4 +- spec/models/checklist/order_spec.rb | 25 ++-- .../pdf/history_annotations_key_spec.rb | 6 +- spec/models/checklist/pdf/history_spec.rb | 8 +- .../pdf/index_annotations_key_spec.rb | 8 +- .../checklist/pdf/index_fetcher_spec.rb | 4 +- spec/models/checklist/scientific_name_spec.rb | 8 +- spec/models/checklist/synonyms_spec.rb | 2 +- .../taxon_concept_prefix_matcher_spec.rb | 8 +- spec/models/checklist/timeline_spec.rb | 46 +++---- .../timelines_for_taxon_concept_spec.rb | 20 +-- spec/models/cites_cop_spec.rb | 12 +- .../cites_suspension_notification_spec.rb | 18 +-- spec/models/cites_suspension_spec.rb | 14 +- spec/models/common_name_spec.rb | 6 +- spec/models/dashboard_stats_species_spec.rb | 6 +- spec/models/dashboard_stats_trade_spec.rb | 8 +- spec/models/designation_spec.rb | 28 ++-- spec/models/eu_decision_spec.rb | 12 +- spec/models/eu_opinion_spec.rb | 14 +- spec/models/eu_regulation_spec.rb | 22 +-- spec/models/eu_suspension_spec.rb | 36 ++--- spec/models/event_spec.rb | 16 +-- spec/models/geo_entity_spec.rb | 16 +-- spec/models/html_to_latex_spec.rb | 12 +- spec/models/hybrid_relationship_spec.rb | 6 +- spec/models/listing_change_spec.rb | 10 +- spec/models/nomenclature_change/lump_spec.rb | 2 +- .../models/nomenclature_change/output_spec.rb | 2 +- spec/models/nomenclature_change/split_spec.rb | 2 +- .../status_to_accepted_spec.rb | 4 +- .../status_to_synonym_spec.rb | 8 +- spec/models/preset_tag_spec.rb | 10 +- spec/models/purpose_spec.rb | 6 +- spec/models/quota_spec.rb | 18 +-- spec/models/rank_spec.rb | 18 +-- spec/models/sapi/geoip_spec.rb | 2 +- spec/models/source_spec.rb | 8 +- .../species/common_names_export_spec.rb | 8 +- spec/models/species/documents_export_spec.rb | 10 +- .../species/hybrid_prefix_matcher_spec.rb | 6 +- .../invisible_subspecies_search_spec.rb | 4 +- spec/models/species/listings_export_spec.rb | 26 ++-- .../orphaned_taxon_concepts_export_spec.rb | 8 +- spec/models/species/search_spec.rb | 8 +- .../species/species_reference_output_spec.rb | 8 +- .../species/standard_reference_output_spec.rb | 8 +- .../synonyms_and_trade_names_export_spec.rb | 8 +- .../taxon_concept_prefix_matcher_spec.rb | 30 ++-- .../species/taxon_concepts_export_spec.rb | 8 +- .../species/trade_name_prefix_matcher_spec.rb | 18 +-- .../species/visible_subspecies_search_spec.rb | 2 +- spec/models/synonym_relationship_spec.rb | 6 +- spec/models/taxon_common_spec.rb | 2 +- spec/models/taxon_concept/agalychnis_spec.rb | 24 ++-- spec/models/taxon_concept/agave_spec.rb | 24 ++-- spec/models/taxon_concept/ailuropoda_spec.rb | 16 +-- .../taxon_concept/arctocephalus_spec.rb | 18 +-- .../taxon_concept/boa_constrictor_spec.rb | 80 +++++------ .../taxon_concept/caiman_latirostris_spec.rb | 44 +++--- spec/models/taxon_concept/canis_lupus_spec.rb | 22 +-- .../taxon_concept/caretta_caretta_cms_spec.rb | 12 +- .../taxon_concept/cedrela_montana_spec.rb | 12 +- .../taxon_concept/cervus_elaphus_cms_spec.rb | 14 +- .../taxon_concept/cervus_elaphus_spec.rb | 62 ++++----- spec/models/taxon_concept/colophon_spec.rb | 24 ++-- spec/models/taxon_concept/dalbergia_spec.rb | 12 +- spec/models/taxon_concept/destroy_spec.rb | 26 ++-- spec/models/taxon_concept/diospyros_spec.rb | 24 ++-- .../taxon_concept/falconiformes_spec.rb | 68 +++++----- spec/models/taxon_concept/hybrids_spec.rb | 16 +-- .../loxodonta_africana_cms_spec.rb | 16 +-- .../taxon_concept/loxodonta_africana_spec.rb | 18 +-- .../taxon_concept/mellivora_capensis_spec.rb | 18 +-- spec/models/taxon_concept/moschus_spec.rb | 34 ++--- .../taxon_concept/natator_depressus_spec.rb | 4 +- .../taxon_concept/notomys_aquilo_spec.rb | 8 +- .../taxon_concept/panax_ginseng_spec.rb | 16 +-- spec/models/taxon_concept/pereskia_spec.rb | 24 ++-- .../platysternon_megacephalum_spec.rb | 16 +-- .../taxon_concept/pristis_microdon_spec.rb | 16 +-- .../taxon_concept/pseudomys_fieldi_spec.rb | 12 +- .../taxon_concept/psittaciformes_spec.rb | 72 +++++----- spec/models/taxon_concept/synonyms_spec.rb | 20 +-- spec/models/taxon_concept/tapiridae_spec.rb | 24 ++-- spec/models/taxon_concept/trade_names_spec.rb | 20 +-- spec/models/taxon_concept/uroplatus_spec.rb | 34 ++--- spec/models/taxon_concept/validation_spec.rb | 32 ++--- spec/models/taxon_concept/varanidae_spec.rb | 32 ++--- .../taxon_concept_prefix_matcher_spec.rb | 23 ++-- spec/models/taxon_relationship_spec.rb | 14 +- spec/models/taxonomy_spec.rb | 20 +-- spec/models/term_spec.rb | 8 +- .../models/trade/annual_report_upload_spec.rb | 14 +- .../distinct_values_validation_rule_spec.rb | 6 +- spec/models/trade/filter_spec.rb | 128 +++++++++--------- .../trade/inclusion_validation_rule_spec.rb | 14 +- spec/models/trade/permit_matcher_spec.rb | 10 +- .../pov_inclusion_validation_rule_spec.rb | 8 +- spec/models/trade/sandbox_spec.rb | 2 +- spec/models/trade/sandbox_template_spec.rb | 6 +- .../scoped_inclusion_validation_rule_spec.rb | 4 +- spec/models/trade/shipment_spec.rb | 62 ++++----- .../trade/shipments_comptab_export_spec.rb | 8 +- spec/models/trade/shipments_export_spec.rb | 8 +- .../shipments_gross_exports_export_spec.rb | 8 +- .../shipments_gross_imports_export_spec.rb | 8 +- .../shipments_net_exports_export_spec.rb | 8 +- .../shipments_net_imports_export_spec.rb | 8 +- ...cept_appendix_year_validation_rule_spec.rb | 18 +-- ...xon_concept_source_validation_rule_spec.rb | 6 +- spec/models/trade/validation_rule_spec.rb | 6 +- spec/models/trade_restriction_spec.rb | 16 +-- spec/models/unit_spec.rb | 6 +- spec/models/user_spec.rb | 26 ++-- .../eu_regulation_activation_worker_spec.rb | 8 +- .../event_listing_changes_copy_worker_spec.rb | 16 +-- spec/workers/quotas_copy_worker_spec.rb | 108 +++++++-------- 204 files changed, 1687 insertions(+), 1704 deletions(-) diff --git a/spec/controllers/admin/change_types_controller_spec.rb b/spec/controllers/admin/change_types_controller_spec.rb index 166354d29a..04bd95bc65 100644 --- a/spec/controllers/admin/change_types_controller_spec.rb +++ b/spec/controllers/admin/change_types_controller_spec.rb @@ -11,22 +11,22 @@ change_type2_2 = create(:change_type, :designation => designation2, :name => 'DEL') change_type1 = create(:change_type, :designation => designation1, :name => 'ADD') get :index - expect(assigns(:change_types)).to eq([change_type1, change_type2_1, change_type2_2]) + assigns(:change_types).should eq([change_type1, change_type2_1, change_type2_2]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, change_type: build_attributes(:change_type) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, change_type: {} - expect(response).to render_template("new") + response.should render_template("new") end end @@ -34,11 +34,11 @@ let(:change_type) { create(:change_type) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => change_type.id, :change_type => { :name => 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => change_type.id, :change_type => { :name => nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -46,7 +46,7 @@ let(:change_type) { create(:change_type) } it "redirects after delete" do delete :destroy, :id => change_type.id - expect(response).to redirect_to(admin_change_types_url) + response.should redirect_to(admin_change_types_url) end end diff --git a/spec/controllers/admin/cites_acs_controller_spec.rb b/spec/controllers/admin/cites_acs_controller_spec.rb index fc922035c7..084851a8a5 100644 --- a/spec/controllers/admin/cites_acs_controller_spec.rb +++ b/spec/controllers/admin/cites_acs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_acs sorted by name" do get :index - expect(assigns(:cites_acs)).to eq([@cites_ac1, @cites_ac2]) + assigns(:cites_acs).should eq([@cites_ac1, @cites_ac2]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/cites_cops_controller_spec.rb b/spec/controllers/admin/cites_cops_controller_spec.rb index a42f74943d..523a9dd898 100644 --- a/spec/controllers/admin/cites_cops_controller_spec.rb +++ b/spec/controllers/admin/cites_cops_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_cops sorted by name" do get :index - expect(assigns(:cites_cops)).to eq([@cites_cop2, @cites_cop1]) + assigns(:cites_cops).should eq([@cites_cop2, @cites_cop1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb b/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb index 00ff71be23..6045ec8fce 100644 --- a/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb +++ b/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_extraordinary_meetings sorted by name" do get :index - expect(assigns(:cites_extraordinary_meetings)).to eq([@cites_ex1, @cites_ex2]) + assigns(:cites_extraordinary_meetings).should eq([@cites_ex1, @cites_ex2]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/cites_hash_annotations_controller_spec.rb b/spec/controllers/admin/cites_hash_annotations_controller_spec.rb index 8ab9bf1523..03813a42cd 100644 --- a/spec/controllers/admin/cites_hash_annotations_controller_spec.rb +++ b/spec/controllers/admin/cites_hash_annotations_controller_spec.rb @@ -20,11 +20,11 @@ describe "GET index" do it "assigns @annotations sorted by parent_symbol and symbol" do get :index - expect(assigns(:annotations)).to eq([@annotation2, @annotation1]) + assigns(:annotations).should eq([@annotation2, @annotation1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/cites_pcs_controller_spec.rb b/spec/controllers/admin/cites_pcs_controller_spec.rb index 8256cf5b21..828cf1886f 100644 --- a/spec/controllers/admin/cites_pcs_controller_spec.rb +++ b/spec/controllers/admin/cites_pcs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_pcs sorted by name" do get :index - expect(assigns(:cites_pcs)).to eq([@cites_pc1, @cites_pc2]) + assigns(:cites_pcs).should eq([@cites_pc1, @cites_pc2]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb b/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb index d658fd1419..3fcb985475 100644 --- a/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb +++ b/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb @@ -12,13 +12,13 @@ describe "GET index" do it "assigns @cites_suspension_notifications sorted by name" do get :index - expect(assigns(:cites_suspension_notifications)).to eq([ + assigns(:cites_suspension_notifications).should eq([ @cites_suspension_notification2, @cites_suspension_notification1 ]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/cites_suspensions_controller_spec.rb b/spec/controllers/admin/cites_suspensions_controller_spec.rb index cfa6ce7e5d..e350f2e175 100644 --- a/spec/controllers/admin/cites_suspensions_controller_spec.rb +++ b/spec/controllers/admin/cites_suspensions_controller_spec.rb @@ -10,7 +10,7 @@ describe "GET index" do it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end it "assigns @cites_suspensions" do get :index @@ -21,14 +21,14 @@ describe "GET new" do it "renders the new template" do get :new - expect(response).to render_template('new') + response.should render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) country = create(:geo_entity) get :new - expect(assigns(:geo_entities).size).to eq(2) + assigns(:geo_entities).size.should == 2 end end @@ -39,14 +39,14 @@ :cites_suspension => { :start_notification_id => create_cites_suspension_notification.id } - expect(response).to redirect_to( + response.should redirect_to( admin_cites_suspensions_url ) end end it "renders new when not successful" do post :create, :cites_suspension => {} - expect(response).to render_template("new") + response.should render_template("new") end end @@ -59,14 +59,14 @@ end it "renders the edit template" do get :edit, :id => @cites_suspension.id - expect(response).to render_template('edit') + response.should render_template('edit') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) country = create(:geo_entity) get :new, :id => @cites_suspension.id - expect(assigns(:geo_entities).size).to eq(2) + assigns(:geo_entities).size.should == 2 end end @@ -85,7 +85,7 @@ :publication_date => 1.week.ago }, :id => @cites_suspension.id - expect(response).to redirect_to( + response.should redirect_to( admin_cites_suspensions_url ) end @@ -97,7 +97,7 @@ :start_notification_id => nil }, :id => @cites_suspension.id - expect(response).to render_template('edit') + response.should render_template('edit') end end @@ -110,7 +110,7 @@ end it "redirects after delete" do delete :destroy, :id => @cites_suspension.id - expect(response).to redirect_to( + response.should redirect_to( admin_cites_suspensions_url ) end diff --git a/spec/controllers/admin/cites_tcs_controller_spec.rb b/spec/controllers/admin/cites_tcs_controller_spec.rb index 8de97bc2c4..d084dc802c 100644 --- a/spec/controllers/admin/cites_tcs_controller_spec.rb +++ b/spec/controllers/admin/cites_tcs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_tcs sorted by name" do get :index - expect(assigns(:cites_tcs)).to eq([@cites_tc1, @cites_tc2]) + assigns(:cites_tcs).should eq([@cites_tc1, @cites_tc2]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/designations_controller_spec.rb b/spec/controllers/admin/designations_controller_spec.rb index 52c724438c..19add5d096 100644 --- a/spec/controllers/admin/designations_controller_spec.rb +++ b/spec/controllers/admin/designations_controller_spec.rb @@ -11,18 +11,18 @@ describe "GET index" do it "assigns @designations sorted by name" do get :index - expect(assigns(:designations)).to eq([@designation2, @designation1]) + assigns(:designations).should eq([@designation2, @designation1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - expect(response.body).to have_json_size(2) - expect(parse_json(response.body, "0/text")).to eq('AA') + response.body.should have_json_size(2) + parse_json(response.body, "0/text").should == 'AA' end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, designation: build_attributes(:designation) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, designation: {} - expect(response).to render_template("new") + response.should render_template("new") end end @@ -43,11 +43,11 @@ let(:designation) { create(:designation) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => designation.id, :designation => { :name => 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => designation.id, :designation => { :name => nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -55,7 +55,7 @@ let(:designation) { create(:designation) } it "redirects after delete" do delete :destroy, :id => designation.id - expect(response).to redirect_to(admin_designations_url) + response.should redirect_to(admin_designations_url) end end diff --git a/spec/controllers/admin/distributions_controller_spec.rb b/spec/controllers/admin/distributions_controller_spec.rb index 08665f8e0c..c8697e97db 100644 --- a/spec/controllers/admin/distributions_controller_spec.rb +++ b/spec/controllers/admin/distributions_controller_spec.rb @@ -9,21 +9,21 @@ describe "XHR GET 'new'" do it "returns http success and renders the new template" do xhr :get, :new, :taxon_concept_id => @taxon_concept.id - expect(response).to be_success - expect(response).to render_template('new') + response.should be_success + response.should render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) country = create(:geo_entity) xhr :get, :new, :taxon_concept_id => @taxon_concept.id - expect(assigns(:geo_entities).size).to eq(2) + assigns(:geo_entities).size.should == 2 end it "assigns the distribution variable" do xhr :get, :new, :taxon_concept_id => @taxon_concept.id - expect(assigns(:distribution)).not_to be_nil - expect(assigns(:tags)).not_to be_nil - expect(assigns(:geo_entities)).not_to be_nil + assigns(:distribution).should_not be_nil + assigns(:tags).should_not be_nil + assigns(:geo_entities).should_not be_nil end end @@ -39,7 +39,7 @@ :reference => { :reference_id => reference.id } - expect(response).to render_template("create") + response.should render_template("create") end it "renders create when successful and is creating a reference" do xhr :post, :create, @@ -52,7 +52,7 @@ :author => reference.author, :year => reference.year } - expect(response).to render_template("create") + response.should render_template("create") end end @@ -61,19 +61,19 @@ it "renders the new template" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the distribution variable" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - expect(assigns(:distribution)).not_to be_nil + assigns(:distribution).should_not be_nil end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - expect(assigns(:geo_entities).size).to eq(2) + assigns(:geo_entities).size.should == 2 end end @@ -87,7 +87,7 @@ :distribution => { :geo_entity_id => geo_entity.id } - expect(response).to be_success + response.should be_success end end @@ -97,7 +97,7 @@ delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_distributions_url(distribution.taxon_concept) ) end diff --git a/spec/controllers/admin/document_batches_controller_spec.rb b/spec/controllers/admin/document_batches_controller_spec.rb index 5fb0a73e71..4898efb69f 100644 --- a/spec/controllers/admin/document_batches_controller_spec.rb +++ b/spec/controllers/admin/document_batches_controller_spec.rb @@ -10,14 +10,14 @@ let(:document) { create(:document) } it "renders the new template" do get :new - expect(response).to render_template('new') + response.should render_template('new') end end context "when event" do let(:document) { create(:document, event_id: event.id) } it "renders the new template" do get :new - expect(response).to render_template('new') + response.should render_template('new') end end end @@ -45,7 +45,7 @@ post :create, document_batch: { date: Date.today, documents_attributes: { "0" => document_attrs }, files: files } - expect(response).to redirect_to(admin_documents_url) + response.should redirect_to(admin_documents_url) end it "does not create a new Document" do @@ -60,7 +60,7 @@ post :create, document_batch: { date: nil, documents_attributes: { "0" => document_attrs }, files: files } - expect(response).to render_template('new') + response.should render_template('new') end end @@ -71,14 +71,14 @@ post :create, event_id: event.id, document_batch: { date: Date.today, documents_attributes: { "0" => document_attrs }, files: files } - expect(response).to redirect_to(admin_event_documents_url(event)) + response.should redirect_to(admin_event_documents_url(event)) end it "renders new when not successful" do post :create, event_id: event.id, document_batch: { date: nil, documents_attributes: { "0" => document_attrs }, files: files } - expect(response).to render_template('new') + response.should render_template('new') end end end diff --git a/spec/controllers/admin/documents_controller_spec.rb b/spec/controllers/admin/documents_controller_spec.rb index 2039145a4e..0d8c2388b7 100644 --- a/spec/controllers/admin/documents_controller_spec.rb +++ b/spec/controllers/admin/documents_controller_spec.rb @@ -28,41 +28,41 @@ it "assigns @documents sorted by time of creation" do get :index - expect(assigns(:documents)).to eq([@document3, @public_document, @document2, @document1]) + assigns(:documents).should eq([@document3, @public_document, @document2, @document1]) end context "search" do it "runs a full text search on title" do get :index, 'title_query' => 'good' - expect(assigns(:documents)).to eq([@document2]) + assigns(:documents).should eq([@document2]) end it "retrieves documents inclusive of the given start date" do get :index, "document_date_start" => '25/12/2014' - expect(assigns(:documents)).to eq([@public_document, @document2, @document1]) + assigns(:documents).should eq([@public_document, @document2, @document1]) end it "retrieves documents inclusive of the given end date" do get :index, "document_date_end" => '01/01/2014' - expect(assigns(:documents)).to eq([@document3]) + assigns(:documents).should eq([@document3]) end it "retrieves documents after the given date" do get :index, "document_date_start" => '10/01/2014' - expect(assigns(:documents)).to eq([@public_document, @document2, @document1]) + assigns(:documents).should eq([@public_document, @document2, @document1]) end it "retrieves documents before the given date" do get :index, "document_date_end" => '10/01/2014' - expect(assigns(:documents)).to eq([@document3]) + assigns(:documents).should eq([@document3]) end it "ignores invalid dates" do get :index, "document_date_start" => '34/24/12', "document_date_end" => '34/24/12' - expect(assigns(:documents)).to eq([@document3, @public_document, @document2, @document1]) + assigns(:documents).should eq([@document3, @public_document, @document2, @document1]) end it "retrieves documents for taxon concept" do get :index, "taxon_concepts_ids" => taxon_concept.id - expect(assigns(:documents)).to eq([@public_document, @document1]) + assigns(:documents).should eq([@public_document, @document1]) end it "retrieves documents for geo entity" do get :index, "geo_entities_ids" => [geo_entity.id] - expect(assigns(:documents)).to eq([@document2]) + assigns(:documents).should eq([@document2]) end context 'by proposal outcome' do before(:each) do @@ -72,7 +72,7 @@ end it "retrieves documents for tag" do get :index, "document_tags_ids" => [proposal_outcome.id] - expect(assigns(:documents).map(&:id)).to eq([@document3].map(&:id)) + assigns(:documents).map(&:id).should eq([@document3].map(&:id)) end end context 'by document tags' do @@ -83,11 +83,11 @@ end it "retrieves documents for review_phase tag" do get :index, "document_tags_ids" => [review_phase.id] - expect(assigns(:documents).map(&:id)).to eq([@document3].map(&:id)) + assigns(:documents).map(&:id).should eq([@document3].map(&:id)) end it "retrieves documents for process_stage tag" do get :index, "document_tags_ids" => [process_stage.id] - expect(assigns(:documents).map(&:id)).to eq([@document3].map(&:id)) + assigns(:documents).map(&:id).should eq([@document3].map(&:id)) end end end @@ -95,27 +95,27 @@ context "when no event" do it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end context "when event" do it "renders the event/documents/index template" do get :index, events_ids: [event.id] - expect(response).to render_template('admin/event_documents/index') + response.should render_template('admin/event_documents/index') end it "assigns @documents for event, sorted by title" do @document3 = create(:document, title: 'CC hello world', event: event2) DocumentSearch.refresh_citations_and_documents get :index, events_ids: [event.id, event2.id] - expect(assigns(:documents)).to eq([@document3, @document2, @document1, @public_document]) + assigns(:documents).should eq([@document3, @document2, @document1, @public_document]) end end context "when secretariat is logged in" do login_secretariat_user it "returns only public documents" do get :index - expect(assigns(:documents)).to eq([@public_document]) + assigns(:documents).should eq([@public_document]) end end end @@ -128,7 +128,7 @@ it "renders the edit template" do get :edit, id: document.id - expect(response).to render_template('new') + response.should render_template('new') end end @@ -138,12 +138,12 @@ let(:document) { create(:document) } it "redirects to index when successful" do put :update, id: document.id, document: { date: Date.today } - expect(response).to redirect_to(admin_documents_url) - expect(flash[:notice]).not_to be_nil + response.should redirect_to(admin_documents_url) + flash[:notice].should_not be_nil end it "renders new when not successful" do put :update, id: document.id, document: { date: nil } - expect(response).to render_template('new') + response.should render_template('new') end end @@ -151,12 +151,12 @@ let(:document) { create(:document, event_id: event.id) } it "redirects to index when successful" do put :update, id: document.id, event_id: event.id, document: { date: Date.today } - expect(response).to redirect_to(admin_event_documents_url(event)) - expect(flash[:notice]).not_to be_nil + response.should redirect_to(admin_event_documents_url(event)) + flash[:notice].should_not be_nil end it "renders new when not successful" do put :update, id: document.id, event_id: event.id, document: { date: nil } - expect(response).to render_template('new') + response.should render_template('new') end end @@ -170,7 +170,7 @@ put :update, id: document.id, document: { date: Date.today, review_details_attributes: { review_phase_id: review_phase.id } } - expect(response).to redirect_to(admin_documents_url) + response.should redirect_to(admin_documents_url) expect(document.reload.review_details.review_phase_id).to eq(review_phase.id) end @@ -179,7 +179,7 @@ put :update, id: document.id, document: { date: Date.today, review_details_attributes: { process_stage_id: process_stage.id } } - expect(response).to redirect_to(admin_documents_url) + response.should redirect_to(admin_documents_url) expect(document.reload.review_details.process_stage_id).to eq(process_stage.id) end @@ -188,7 +188,7 @@ put :update, id: document.id, document: { date: Date.today, review_details_attributes: { recommended_category: recommended_category } } - expect(response).to redirect_to(admin_documents_url) + response.should redirect_to(admin_documents_url) expect(document.reload.review_details.recommended_category).to eq(recommended_category) end @@ -202,7 +202,7 @@ put :update, id: document.id, document: { date: Date.today, proposal_details_attributes: { proposal_outcome_id: proposal_outcome.id } } - expect(response).to redirect_to(admin_documents_url) + response.should redirect_to(admin_documents_url) expect(document.reload.proposal_details.proposal_outcome_id).to eq(proposal_outcome.id) end @@ -225,7 +225,7 @@ } it "redirects after delete" do delete :destroy, id: document.id - expect(response).to redirect_to(admin_documents_url) + response.should redirect_to(admin_documents_url) end end @@ -243,9 +243,9 @@ it "returns properly formatted json" do xhr :get, :autocomplete, :format => 'json', :title => 'tit' - expect(response.body).to have_json_size(2) - expect(parse_json(response.body, "0/title")).to eq('Title') - expect(parse_json(response.body, "1/title")).to eq('Title2') + response.body.should have_json_size(2) + parse_json(response.body, "0/title").should == 'Title' + parse_json(response.body, "1/title").should == 'Title2' end end @@ -253,8 +253,8 @@ it "returns properly formatted json" do xhr :get, :autocomplete, :format => 'json', :title => 'tit', :event_id => event.id - expect(response.body).to have_json_size(1) - expect(parse_json(response.body, "0/title")).to eq('Title') + response.body.should have_json_size(1) + parse_json(response.body, "0/title").should == 'Title' end end end diff --git a/spec/controllers/admin/ec_srgs_controller_spec.rb b/spec/controllers/admin/ec_srgs_controller_spec.rb index 719c08ef5f..1c3309c1e5 100644 --- a/spec/controllers/admin/ec_srgs_controller_spec.rb +++ b/spec/controllers/admin/ec_srgs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @ec_srgs sorted by name" do get :index - expect(assigns(:ec_srgs).sort).to eq([@cites_srg1, @cites_srg2].sort) + assigns(:ec_srgs).sort.should eq([@cites_srg1, @cites_srg2].sort) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/eu_council_regulations_controller_spec.rb b/spec/controllers/admin/eu_council_regulations_controller_spec.rb index d69f1fff86..dc65da0f49 100644 --- a/spec/controllers/admin/eu_council_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_council_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_regulations sorted by effective_at" do get :index - expect(assigns(:eu_council_regulations)).to eq([@eu_regulation2, @eu_regulation1]) + assigns(:eu_council_regulations).should eq([@eu_regulation2, @eu_regulation1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/eu_hash_annotations_controller_spec.rb b/spec/controllers/admin/eu_hash_annotations_controller_spec.rb index f53a38cba9..58e892e822 100644 --- a/spec/controllers/admin/eu_hash_annotations_controller_spec.rb +++ b/spec/controllers/admin/eu_hash_annotations_controller_spec.rb @@ -20,11 +20,11 @@ describe "GET index" do it "assigns @annotations sorted by parent_symbol and symbol" do get :index - expect(assigns(:annotations)).to eq([@annotation2, @annotation1]) + assigns(:annotations).should eq([@annotation2, @annotation1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb b/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb index d3181c415a..19914088ab 100644 --- a/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_regulations sorted by effective_at" do get :index - expect(assigns(:eu_implementing_regulations)).to eq([@eu_regulation2, @eu_regulation1]) + assigns(:eu_implementing_regulations).should eq([@eu_regulation2, @eu_regulation1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end diff --git a/spec/controllers/admin/eu_opinions_controller_spec.rb b/spec/controllers/admin/eu_opinions_controller_spec.rb index c54d779d05..db3c8fc652 100644 --- a/spec/controllers/admin/eu_opinions_controller_spec.rb +++ b/spec/controllers/admin/eu_opinions_controller_spec.rb @@ -11,24 +11,24 @@ describe "GET index" do it "renders the index template" do get :index, taxon_concept_id: @taxon_concept.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do create(:geo_entity, :geo_entity_type_id => territory_geo_entity_type.id) create(:geo_entity) get :new, taxon_concept_id: @taxon_concept.id - expect(assigns(:geo_entities).size).to eq(2) + assigns(:geo_entities).size.should == 2 end end @@ -54,7 +54,7 @@ ) }, taxon_concept_id: @taxon_concept.id - expect(response).to redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) + response.should redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) end end context "when event is present" do @@ -70,7 +70,7 @@ ) }, taxon_concept_id: @taxon_concept.id - expect(response).to redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) + response.should redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) end end end @@ -79,7 +79,7 @@ it "renders new" do post :create, eu_opinion: {}, taxon_concept_id: @taxon_concept.id - expect(response).to render_template("new") + response.should render_template("new") end end end @@ -94,12 +94,12 @@ end it "renders the edit template" do get :edit, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id, start_event_id: @eu_regulation.id - expect(response).to render_template('edit') + response.should render_template('edit') end it "assigns @geo_entities" do territory = create(:geo_entity, geo_entity_type_id: territory_geo_entity_type.id) get :edit, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id, start_event_id: @eu_regulation.id - expect(assigns(:geo_entities)).to include(territory) + assigns(:geo_entities).should include(territory) end end @@ -125,7 +125,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -141,7 +141,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -156,7 +156,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -172,7 +172,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -190,7 +190,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end @@ -205,7 +205,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end end @@ -220,7 +220,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end @@ -234,7 +234,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end @@ -249,7 +249,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end @@ -264,7 +264,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end @@ -279,7 +279,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end end @@ -295,7 +295,7 @@ it "redirects after delete" do delete :destroy, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id, start_event_id: @eu_regulation.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end diff --git a/spec/controllers/admin/eu_regulations_controller_spec.rb b/spec/controllers/admin/eu_regulations_controller_spec.rb index ad9d058301..263a953e3c 100644 --- a/spec/controllers/admin/eu_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_regulations sorted by effective_at" do get :index - expect(assigns(:eu_regulations)).to eq([@eu_regulation2, @eu_regulation1]) + assigns(:eu_regulations).should eq([@eu_regulation2, @eu_regulation1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end @@ -25,7 +25,7 @@ let(:eu_regulation) { create_eu_regulation } it "renders create when successful" do xhr :post, :activate, :format => 'js', :id => eu_regulation.id - expect(response).to render_template("create") + response.should render_template("create") end end diff --git a/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb b/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb index 758d36195e..bcbf45e332 100644 --- a/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_suspension_regulations sorted by effective_at" do get :index - expect(assigns(:eu_suspension_regulations)).to eq([@eu_suspension_regulation2, @eu_suspension_regulation1]) + assigns(:eu_suspension_regulations).should eq([@eu_suspension_regulation2, @eu_suspension_regulation1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end @@ -25,7 +25,7 @@ let(:eu_suspension_regulation) { create_eu_suspension_regulation(:is_current => true) } it "renders create when successful" do xhr :post, :activate, :format => 'js', :id => eu_suspension_regulation.id - expect(response).to render_template("create") + response.should render_template("create") end end diff --git a/spec/controllers/admin/eu_suspensions_controller_spec.rb b/spec/controllers/admin/eu_suspensions_controller_spec.rb index 08b9bc48b3..97275959ec 100644 --- a/spec/controllers/admin/eu_suspensions_controller_spec.rb +++ b/spec/controllers/admin/eu_suspensions_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "renders the index template" do get :index, :eu_suspension_regulation_id => @eu_suspension_regulation - expect(response).to render_template("index") + response.should render_template("index") end it "renders the admin layout" do get :index, :eu_suspension_regulation_id => @eu_suspension_regulation - expect(response).to render_template('layouts/admin') + response.should render_template('layouts/admin') end end @@ -31,7 +31,7 @@ it "redirects after delete" do delete :destroy, :id => @eu_suspension.id, :eu_suspension_regulation_id => @eu_suspension_regulation.id - expect(response).to redirect_to( + response.should redirect_to( admin_eu_suspension_regulation_eu_suspensions_url(@eu_suspension_regulation) ) end diff --git a/spec/controllers/admin/events_controller_spec.rb b/spec/controllers/admin/events_controller_spec.rb index ac8b1ccb12..6a4d00d483 100644 --- a/spec/controllers/admin/events_controller_spec.rb +++ b/spec/controllers/admin/events_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @events sorted by name" do get :index - expect(assigns(:events)).to eq([@event2, @event1]) + assigns(:events).should eq([@event2, @event1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end @@ -24,22 +24,22 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the event variable" do xhr :get, :new - expect(assigns(:event)).not_to be_nil + assigns(:event).should_not be_nil end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, event: FactoryGirl.attributes_for(:event) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, event: { :name => nil } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -47,11 +47,11 @@ let(:event) { create(:event) } it "renders the edit template" do xhr :get, :edit, :id => event.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :edit, :id => event.id - expect(assigns(:event)).not_to be_nil + assigns(:event).should_not be_nil end end @@ -59,11 +59,11 @@ let(:event) { create(:event) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => event.id, :event => { :name => 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => event.id, :event => { :name => nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -71,7 +71,7 @@ let(:event) { create(:event) } it "redirects after delete" do delete :destroy, :id => event.id - expect(response).to redirect_to(admin_events_url) + response.should redirect_to(admin_events_url) end end diff --git a/spec/controllers/admin/exports_controller_spec.rb b/spec/controllers/admin/exports_controller_spec.rb index f12b0e9d7a..62ecc38bdf 100644 --- a/spec/controllers/admin/exports_controller_spec.rb +++ b/spec/controllers/admin/exports_controller_spec.rb @@ -19,8 +19,8 @@ create(:taxon_concept) Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names" - expect(response.content_type).to eq("text/csv") - expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") + response.content_type.should eq("text/csv") + response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") end it "redirects when no results" do get :download, :data_type => "Names" @@ -32,8 +32,8 @@ create_cites_eu_species Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } - expect(response.content_type).to eq("text/csv") - expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") + response.content_type.should eq("text/csv") + response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } @@ -45,8 +45,8 @@ create_cms_species Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } - expect(response.content_type).to eq("text/csv") - expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") + response.content_type.should eq("text/csv") + response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } @@ -64,8 +64,8 @@ create(:distribution, :taxon_concept_id => tc.id) Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions" - expect(response.content_type).to eq("text/csv") - expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") + response.content_type.should eq("text/csv") + response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") end it "redirects when no results" do get :download, :data_type => "Distributions" @@ -78,8 +78,8 @@ create(:distribution, :taxon_concept_id => tc.id) Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } - expect(response.content_type).to eq("text/csv") - expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") + response.content_type.should eq("text/csv") + response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } @@ -92,8 +92,8 @@ create(:distribution, :taxon_concept_id => tc.id) Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } - expect(response.content_type).to eq("text/csv") - expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") + response.content_type.should eq("text/csv") + response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } diff --git a/spec/controllers/admin/geo_entities_controller_spec.rb b/spec/controllers/admin/geo_entities_controller_spec.rb index 12e244d200..dcbd651c30 100644 --- a/spec/controllers/admin/geo_entities_controller_spec.rb +++ b/spec/controllers/admin/geo_entities_controller_spec.rb @@ -22,11 +22,11 @@ describe "GET index" do it "assigns @geo_entities sorted by name" do get :index - expect(assigns(:geo_entities)).to eq([@geo_entity2, @geo_entity1]) + assigns(:geo_entities).should eq([@geo_entity2, @geo_entity1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end @@ -38,14 +38,14 @@ name_en: 'CC', iso_code2: 'CC' } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, geo_entity: { geo_entity_type_id: country_geo_entity_type.id, iso_code2: nil } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -53,11 +53,11 @@ let(:geo_entity) { create(:geo_entity, geo_entity_type: country_geo_entity_type) } it "responds with 200 when successful" do xhr :put, :update, format: 'json', id: geo_entity.id, geo_entity: { iso_code2: 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, format: 'json', id: geo_entity.id, geo_entity: { iso_code2: nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -65,7 +65,7 @@ let(:geo_entity) { create(:geo_entity) } it "redirects after delete" do delete :destroy, id: geo_entity.id - expect(response).to redirect_to(admin_geo_entities_url) + response.should redirect_to(admin_geo_entities_url) end end diff --git a/spec/controllers/admin/hybrid_relationships_controller_spec.rb b/spec/controllers/admin/hybrid_relationships_controller_spec.rb index 3b6e0337b4..bb76659b5a 100644 --- a/spec/controllers/admin/hybrid_relationships_controller_spec.rb +++ b/spec/controllers/admin/hybrid_relationships_controller_spec.rb @@ -16,11 +16,11 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - expect(assigns(:hybrid_relationship)).not_to be_nil + assigns(:hybrid_relationship).should_not be_nil end end @@ -31,7 +31,7 @@ :taxon_relationship => { other_taxon_concept_id: hybrid.id } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -39,7 +39,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -47,12 +47,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => hybrid_relationship.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => hybrid_relationship.id - expect(assigns(:hybrid_relationship)).not_to be_nil + assigns(:hybrid_relationship).should_not be_nil end end @@ -64,7 +64,7 @@ :taxon_relationship => { other_taxon_concept_id: hybrid.id } - expect(response).to render_template("create") + response.should render_template("create") end it "responds with json when not successful" do xhr :put, :update, :format => 'js', @@ -73,7 +73,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - expect(response).to render_template('new') + response.should render_template('new') end end @@ -82,7 +82,7 @@ delete :destroy, :taxon_concept_id => taxon_concept.id, :id => hybrid_relationship.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_names_url(hybrid_relationship.taxon_concept) ) end diff --git a/spec/controllers/admin/instruments_controller_spec.rb b/spec/controllers/admin/instruments_controller_spec.rb index 335f3cb4c3..6014dcecab 100644 --- a/spec/controllers/admin/instruments_controller_spec.rb +++ b/spec/controllers/admin/instruments_controller_spec.rb @@ -11,18 +11,18 @@ describe "GET index" do it "assigns @instruments sorted by name" do get :index - expect(assigns(:instruments)).to eq([@instrument2, @instrument1]) + assigns(:instruments).should eq([@instrument2, @instrument1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - expect(response.body).to have_json_size(2) - expect(parse_json(response.body, "0/text")).to eq('AA') + response.body.should have_json_size(2) + parse_json(response.body, "0/text").should == 'AA' end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, instrument: build_attributes(:instrument) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, instrument: {} - expect(response).to render_template("new") + response.should render_template("new") end end @@ -43,11 +43,11 @@ let(:instrument) { create(:instrument) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => instrument.id, :instrument => { :name => 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => instrument.id, :instrument => { :name => nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -55,17 +55,17 @@ let(:instrument) { create(:instrument) } it "redirects after delete" do delete :destroy, :id => instrument.id - expect(flash[:notice]).not_to be_nil - expect(flash[:alert]).to be_nil - expect(response).to redirect_to(admin_instruments_url) + flash[:notice].should_not be_nil + flash[:alert].should be_nil + response.should redirect_to(admin_instruments_url) end let(:instrument2) { create(:instrument) } let!(:taxon_instrument) { create(:taxon_instrument, :instrument_id => instrument2.id) } it "fails to delete instrument because there are dependent objects" do delete :destroy, :id => instrument2.id - expect(flash[:notice]).to be_nil - expect(flash[:alert]).not_to be_nil - expect(instrument2.reload).not_to be_nil + flash[:notice].should be_nil + flash[:alert].should_not be_nil + instrument2.reload.should_not be_nil end end diff --git a/spec/controllers/admin/languages_controller_spec.rb b/spec/controllers/admin/languages_controller_spec.rb index 6eab1781cb..5634b95779 100644 --- a/spec/controllers/admin/languages_controller_spec.rb +++ b/spec/controllers/admin/languages_controller_spec.rb @@ -8,22 +8,22 @@ language1 = create(:language, :iso_code1 => 'BB', :iso_code3 => 'BBB') language2 = create(:language, :iso_code1 => 'AA', :iso_code3 => 'AAA') get :index - expect(assigns(:languages)).to eq([language2, language1]) + assigns(:languages).should eq([language2, language1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, language: FactoryGirl.attributes_for(:language) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, language: {} - expect(response).to render_template("new") + response.should render_template("new") end end @@ -31,11 +31,11 @@ let(:language) { create(:language) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => language.id, :language => { :iso_code1 => 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => language.id, :language => { :iso_code1 => 'zzz' } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -43,7 +43,7 @@ let(:language) { create(:language) } it "redirects after delete" do delete :destroy, :id => language.id - expect(response).to redirect_to(admin_languages_url) + response.should redirect_to(admin_languages_url) end end diff --git a/spec/controllers/admin/listing_changes_controller_spec.rb b/spec/controllers/admin/listing_changes_controller_spec.rb index bbcc93854c..73f4d73c8b 100644 --- a/spec/controllers/admin/listing_changes_controller_spec.rb +++ b/spec/controllers/admin/listing_changes_controller_spec.rb @@ -43,16 +43,16 @@ :effective_at => 1.week.ago ) get :index, :eu_regulation_id => @eu_regulation.id - expect(assigns(:listing_changes)).to eq([listing_change2, listing_change1]) - expect(assigns(:eu_regulation)).to eq @eu_regulation + assigns(:listing_changes).should eq([listing_change2, listing_change1]) + assigns(:eu_regulation).should eq @eu_regulation end it "renders the index template" do get :index, :eu_regulation_id => @eu_regulation.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the admin layout" do get :index, :eu_regulation_id => @eu_regulation.id - expect(response).to render_template('layouts/admin') + response.should render_template('layouts/admin') end end @@ -70,7 +70,7 @@ it "redirects after delete" do delete :destroy, :id => @listing_change.id, :eu_regulation_id => @eu_regulation.id - expect(response).to redirect_to( + response.should redirect_to( admin_eu_regulation_listing_changes_url(@eu_regulation) ) end diff --git a/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb index 9d47f43bec..8d6a10a7e7 100644 --- a/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb @@ -10,7 +10,7 @@ end it 'renders the inputs template' do get :show, id: :inputs, nomenclature_change_id: @lump.id - expect(response).to render_template('inputs') + response.should render_template('inputs') end end context 'outputs' do @@ -20,7 +20,7 @@ end it 'renders the outputs template' do get :show, id: :outputs, nomenclature_change_id: @lump.id - expect(response).to render_template('outputs') + response.should render_template('outputs') end end context 'reassignments' do @@ -32,7 +32,7 @@ end it 'renders the notes template' do get :show, id: :notes, nomenclature_change_id: @lump.id - expect(response).to render_template('notes') + response.should render_template('notes') end context "when legislation present" do before(:each) do @@ -40,13 +40,13 @@ end it 'renders the legislation template' do get :show, id: :legislation, nomenclature_change_id: @lump.id - expect(response).to render_template('legislation') + response.should render_template('legislation') end end context "when no legislation" do it 'redirects to next step' do get :show, id: :legislation, nomenclature_change_id: @lump.id - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_lump_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -55,7 +55,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @lump.id - expect(response).to render_template('summary') + response.should render_template('summary') end end end @@ -63,7 +63,7 @@ describe 'POST create' do it 'redirects to lump wizard' do post :create, nomenclature_change_id: 'new' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_lump_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'inputs' ) @@ -83,7 +83,7 @@ 1 => { taxon_concept_id: create_cites_eu_species.id } } }, nomenclature_change_id: @lump.id, id: 'inputs' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_lump_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'outputs' ) @@ -98,7 +98,7 @@ 0 => { taxon_concept_id: nil } } }, nomenclature_change_id: @lump.id, id: 'inputs' - expect(response).to render_template('inputs') + response.should render_template('inputs') end end context 'when last step' do @@ -106,15 +106,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @lump.id, id: 'summary' - expect(response).to redirect_to admin_root_path + response.should redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @lump.id, id: 'summary' - expect(response).to be_successful - expect(response).to render_template("nomenclature_changes") + response.should be_successful + response.should render_template("nomenclature_changes") end end end @@ -130,7 +130,7 @@ context 'when step is legislation' do it 'renders notes step' do get :show, id: :notes, nomenclature_change_id: @lump.id, back: true - expect(response).to render_template('notes') + response.should render_template('notes') end end context 'when step is summary' do @@ -140,15 +140,15 @@ end it 'renders legislation step' do get :show, id: :legislation, nomenclature_change_id: @lump.id, back: true - expect(response).to render_template('legislation') + response.should render_template('legislation') end end context 'when no legislation' do it 'redirects to notes step' do get :show, id: :legislation, nomenclature_change_id: @lump.id, back: true - expect(response).to redirect_to action: :show, id: :notes + response.should redirect_to action: :show, id: :notes get :show, id: :notes, nomenclature_change_id: @lump.id - expect(response).to redirect_to action: :show, id: :notes + response.should redirect_to action: :show, id: :notes end end end diff --git a/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb index f2bc0f7507..61cedb41fa 100644 --- a/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb @@ -11,7 +11,7 @@ end it 'renders the inputs template' do get :show, id: :inputs, nomenclature_change_id: @split.id - expect(response).to render_template('inputs') + response.should render_template('inputs') end end context 'outputs' do @@ -20,7 +20,7 @@ end it 'renders the outputs template' do get :show, id: :outputs, nomenclature_change_id: @split.id - expect(response).to render_template('outputs') + response.should render_template('outputs') end end context 'reassignments' do @@ -29,7 +29,7 @@ end it 'renders the notes template' do get :show, id: :notes, nomenclature_change_id: @split.id - expect(response).to render_template('notes') + response.should render_template('notes') end context "when children present" do before(:each) do @@ -37,13 +37,13 @@ end it 'renders the children template' do get :show, id: :children, nomenclature_change_id: @split.id - expect(response).to render_template('children') + response.should render_template('children') end end context "when no children" do it 'redirects to next step' do get :show, id: :children, nomenclature_change_id: @split.id - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'names' ) @@ -60,13 +60,13 @@ end it 'renders the names template' do get :show, id: :names, nomenclature_change_id: @split.id - expect(response).to render_template('names') + response.should render_template('names') end end context "when no names" do it 'redirects to next step' do get :show, id: :names, nomenclature_change_id: @split.id - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'distribution' ) @@ -79,13 +79,13 @@ end it 'renders the distribution template' do get :show, id: :distribution, nomenclature_change_id: @split.id - expect(response).to render_template('distribution') + response.should render_template('distribution') end end context "when no distribution" do it 'redirects to next step' do get :show, id: :distribution, nomenclature_change_id: @split.id - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'legislation' ) @@ -98,13 +98,13 @@ end it 'renders the legislation template' do get :show, id: :legislation, nomenclature_change_id: @split.id - expect(response).to render_template('legislation') + response.should render_template('legislation') end end context "when no legislation" do it 'redirects to next step' do get :show, id: :legislation, nomenclature_change_id: @split.id - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -113,7 +113,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @split.id - expect(response).to render_template('summary') + response.should render_template('summary') end end end @@ -121,7 +121,7 @@ describe 'POST create' do it 'redirects to split wizard' do post :create, nomenclature_change_id: 'new' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'inputs' ) @@ -138,7 +138,7 @@ put :update, nomenclature_change_split: { input_attributes: { taxon_concept_id: create_cites_eu_species.id } }, nomenclature_change_id: @split.id, id: 'inputs' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'outputs' ) @@ -151,7 +151,7 @@ nomenclature_change_split: { input_attributes: { taxon_concept_id: nil } }, nomenclature_change_id: @split.id, id: 'inputs' - expect(response).to render_template('inputs') + response.should render_template('inputs') end end context 'when last step' do @@ -159,15 +159,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @split.id, id: 'summary' - expect(response).to redirect_to admin_root_path + response.should redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @split.id, id: 'summary' - expect(response).to be_successful - expect(response).to render_template("nomenclature_changes") + response.should be_successful + response.should render_template("nomenclature_changes") end end end @@ -184,15 +184,15 @@ end it 'renders children template' do get :show, id: :children, nomenclature_change_id: @split.id, back: true - expect(response).to render_template('children') + response.should render_template('children') end end context 'when no children' do it 'redirects to notes step' do get :show, id: :children, nomenclature_change_id: @split.id, back: true - expect(response).to redirect_to action: :show, id: :notes + response.should redirect_to action: :show, id: :notes get :show, id: :notes, nomenclature_change_id: @split.id - expect(response).to redirect_to action: :show, id: :notes + response.should redirect_to action: :show, id: :notes end end end @@ -207,15 +207,15 @@ end it 'renders names template' do get :show, id: :names, nomenclature_change_id: @split.id, back: :true - expect(response).to render_template('names') + response.should render_template('names') end end context 'when no names and no children' do it 'redirects to notes step' do get :show, id: :names, nomenclature_change_id: @split.id, back: true - expect(response).to redirect_to action: :show, id: :children + response.should redirect_to action: :show, id: :children get :show, id: :children, nomenclature_change_id: @split.id - expect(response).to redirect_to action: :show, id: :notes + response.should redirect_to action: :show, id: :notes end end end @@ -226,15 +226,15 @@ end it 'renders distribution template' do get :show, id: :distribution, nomenclature_change_id: @split.id, back: true - expect(response).to render_template('distribution') + response.should render_template('distribution') end end context 'when no distribution and no names' do it 'redirects to children step' do get :show, id: :distribution, nomenclature_change_id: @split.id, back: true - expect(response).to redirect_to action: :show, id: :names + response.should redirect_to action: :show, id: :names get :show, id: :names, nomenclature_change_id: @split.id - expect(response).to redirect_to action: :show, id: :children + response.should redirect_to action: :show, id: :children end end end @@ -245,15 +245,15 @@ end it 'renders legislation template' do get :show, id: :legislation, nomenclature_change_id: @split.id, back: true - expect(response).to render_template('legislation') + response.should render_template('legislation') end end context 'when no legislation and no distribution' do it 'redirects to names step' do get :show, id: :legislation, nomenclature_change_id: @split.id, back: true - expect(response).to redirect_to action: :show, id: :distribution + response.should redirect_to action: :show, id: :distribution get :show, id: :distribution, nomenclature_change_id: @split.id - expect(response).to redirect_to action: :show, id: :names + response.should redirect_to action: :show, id: :names end end end diff --git a/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb index 2f124144d0..bb42fdd211 100644 --- a/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb @@ -11,7 +11,7 @@ end it 'renders the primary_output template' do get :show, id: :primary_output, nomenclature_change_id: @status_change.id - expect(response).to render_template('primary_output') + response.should render_template('primary_output') end end context 'swap' do @@ -20,7 +20,7 @@ end it 'renders the swap template' do get :show, id: :secondary_output, nomenclature_change_id: @status_change.id - expect(response).to render_template('secondary_output') + response.should render_template('secondary_output') end end context 'reassignments' do @@ -33,13 +33,13 @@ end it 'renders the legislation template' do get :show, id: :legislation, nomenclature_change_id: @status_change.id - expect(response).to render_template('legislation') + response.should render_template('legislation') end end context "when no legislation" do it 'redirects to next step' do get :show, id: :legislation, nomenclature_change_id: @status_change.id - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_status_swap_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -53,7 +53,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @status_change.id - expect(response).to render_template('summary') + response.should render_template('summary') end end end @@ -61,7 +61,7 @@ describe 'POST create' do it 'redirects to status_change wizard' do post :create, nomenclature_change_id: 'new' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_status_swap_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'primary_output' ) @@ -81,7 +81,7 @@ new_name_status: 'S' } }, nomenclature_change_id: @status_change.id, id: 'primary_output' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_status_swap_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'secondary_output' ) @@ -92,7 +92,7 @@ it 're-renders step' do put :update, nomenclature_change_status_swap: {}, nomenclature_change_id: @status_change.id, id: 'primary_output' - expect(response).to render_template('primary_output') + response.should render_template('primary_output') end end context 'when last step' do @@ -100,15 +100,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @status_change.id, id: 'summary' - expect(response).to redirect_to admin_root_path + response.should redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @status_change.id, id: 'summary' - expect(response).to be_successful - expect(response).to render_template("nomenclature_changes") + response.should be_successful + response.should render_template("nomenclature_changes") end end end diff --git a/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb index 1ad1a65cea..a04996557d 100644 --- a/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb @@ -11,7 +11,7 @@ end it 'renders the primary_output template' do get :show, id: :primary_output, nomenclature_change_id: @status_change.id - expect(response).to render_template('primary_output') + response.should render_template('primary_output') end end context 'summary' do @@ -20,7 +20,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @status_change.id - expect(response).to render_template('summary') + response.should render_template('summary') end end end @@ -28,7 +28,7 @@ describe 'POST create' do it 'redirects to status_change wizard' do post :create, nomenclature_change_id: 'new' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_status_to_accepted_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'primary_output' ) @@ -54,7 +54,7 @@ new_name_status: 'A' } }, nomenclature_change_id: @status_change.id, id: 'primary_output' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_status_to_accepted_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -65,7 +65,7 @@ it 're-renders step' do put :update, nomenclature_change_status_to_accepted: {}, nomenclature_change_id: @status_change.id, id: 'primary_output' - expect(response).to render_template('primary_output') + response.should render_template('primary_output') end end context 'when last step' do @@ -73,15 +73,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @status_change.id, id: 'summary' - expect(response).to redirect_to admin_root_path + response.should redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @status_change.id, id: 'summary' - expect(response).to be_successful - expect(response).to render_template("nomenclature_changes") + response.should be_successful + response.should render_template("nomenclature_changes") end end end diff --git a/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb index f750f8e7d1..95aa5eeba7 100644 --- a/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb @@ -12,7 +12,7 @@ end it 'renders the primary_output template' do get :show, id: :primary_output, nomenclature_change_id: @status_change.id - expect(response).to render_template('primary_output') + response.should render_template('primary_output') end end context 'relay' do @@ -21,7 +21,7 @@ end it 'renders the relay template' do get :show, id: :relay, nomenclature_change_id: @status_change.id - expect(response).to render_template('relay') + response.should render_template('relay') end end @@ -31,7 +31,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @status_change.id - expect(response).to render_template('summary') + response.should render_template('summary') end end end @@ -39,7 +39,7 @@ describe 'POST create' do it 'redirects to status_change wizard' do post :create, nomenclature_change_id: 'new' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_status_to_synonym_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'primary_output' ) @@ -59,7 +59,7 @@ new_name_status: 'S' } }, nomenclature_change_id: @status_change.id, id: 'primary_output' - expect(response).to redirect_to( + response.should redirect_to( admin_nomenclature_change_status_to_synonym_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'relay' ) @@ -70,7 +70,7 @@ it 're-renders step' do put :update, nomenclature_change_status_to_synonym: {}, nomenclature_change_id: @status_change.id, id: 'primary_output' - expect(response).to render_template('primary_output') + response.should render_template('primary_output') end end context 'when last step' do @@ -78,15 +78,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @status_change.id, id: 'summary' - expect(response).to redirect_to admin_root_path + response.should redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @status_change.id, id: 'summary' - expect(response).to be_successful - expect(response).to render_template("nomenclature_changes") + response.should be_successful + response.should render_template("nomenclature_changes") end end end diff --git a/spec/controllers/admin/nomenclature_changes_controller_spec.rb b/spec/controllers/admin/nomenclature_changes_controller_spec.rb index 672f29be57..959ec64f88 100644 --- a/spec/controllers/admin/nomenclature_changes_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes_controller_spec.rb @@ -8,11 +8,11 @@ nomenclature_change1 = create(:nomenclature_change) nomenclature_change2 = create(:nomenclature_change) get :index - expect(assigns(:collection)).to eq([nomenclature_change2, nomenclature_change1]) + assigns(:collection).should eq([nomenclature_change2, nomenclature_change1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end @@ -20,7 +20,7 @@ let(:nomenclature_change) { create(:nomenclature_change) } it "redirects after delete" do delete :destroy, :id => nomenclature_change.id - expect(response).to redirect_to(admin_nomenclature_changes_url) + response.should redirect_to(admin_nomenclature_changes_url) end end diff --git a/spec/controllers/admin/ranks_controller_spec.rb b/spec/controllers/admin/ranks_controller_spec.rb index dbe03df3f3..93961b14c3 100644 --- a/spec/controllers/admin/ranks_controller_spec.rb +++ b/spec/controllers/admin/ranks_controller_spec.rb @@ -8,22 +8,22 @@ rank2 = create(:rank, name: Rank::PHYLUM, taxonomic_position: '2') rank1 = create(:rank, name: Rank::KINGDOM, taxonomic_position: '1') get :index - expect(assigns(:ranks)).to eq([rank1, rank2]) + assigns(:ranks).should eq([rank1, rank2]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, rank: build_attributes(:rank) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, rank: {} - expect(response).to render_template("new") + response.should render_template("new") end end @@ -31,11 +31,11 @@ let(:rank) { create(:rank) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => rank.id, :rank => { :name => 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => rank.id, :rank => { :name => nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -43,7 +43,7 @@ let(:rank) { create(:rank) } it "redirects after delete" do delete :destroy, :id => rank.id - expect(response).to redirect_to(admin_ranks_url) + response.should redirect_to(admin_ranks_url) end end diff --git a/spec/controllers/admin/references_controller_spec.rb b/spec/controllers/admin/references_controller_spec.rb index c1bd708f6c..ee0207cbc5 100644 --- a/spec/controllers/admin/references_controller_spec.rb +++ b/spec/controllers/admin/references_controller_spec.rb @@ -12,18 +12,18 @@ describe "GET index" do it "assigns @references sorted by citation" do get :index - expect(assigns(:references)).to eq([@reference2, @reference1]) + assigns(:references).should eq([@reference2, @reference1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - expect(response.body).to have_json_size(2) - expect(parse_json(response.body, "0/text")).to eq('AA') + response.body.should have_json_size(2) + parse_json(response.body, "0/text").should == 'AA' end end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, reference: FactoryGirl.attributes_for(:reference) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, reference: { :citation => nil } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -43,11 +43,11 @@ let(:reference) { create(:reference) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => reference.id, :reference => { :citation => 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => reference.id, :reference => { :citation => nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -55,7 +55,7 @@ let(:reference) { create(:reference) } it "redirects after delete" do delete :destroy, :id => reference.id - expect(response).to redirect_to(admin_references_url) + response.should redirect_to(admin_references_url) end end diff --git a/spec/controllers/admin/species_listings_controller_spec.rb b/spec/controllers/admin/species_listings_controller_spec.rb index bb8c91a415..e9196e7ca9 100644 --- a/spec/controllers/admin/species_listings_controller_spec.rb +++ b/spec/controllers/admin/species_listings_controller_spec.rb @@ -11,22 +11,22 @@ species_listing2_2 = create(:species_listing, :designation => designation2, :name => 'II') species_listing1 = create(:species_listing, :designation => designation1, :name => 'I') get :index - expect(assigns(:species_listings)).to eq([species_listing1, species_listing2_1, species_listing2_2]) + assigns(:species_listings).should eq([species_listing1, species_listing2_1, species_listing2_2]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, species_listing: build_attributes(:species_listing) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, species_listing: {} - expect(response).to render_template("new") + response.should render_template("new") end end @@ -34,11 +34,11 @@ let(:species_listing) { create(:species_listing) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => species_listing.id, :species_listing => { :name => 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => species_listing.id, :species_listing => { :name => nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -46,7 +46,7 @@ let(:species_listing) { create(:species_listing) } it "redirects after delete" do delete :destroy, :id => species_listing.id - expect(response).to redirect_to(admin_species_listings_url) + response.should redirect_to(admin_species_listings_url) end end diff --git a/spec/controllers/admin/srg_histories_controller_spec.rb b/spec/controllers/admin/srg_histories_controller_spec.rb index 2667db0ae8..187f9afea4 100644 --- a/spec/controllers/admin/srg_histories_controller_spec.rb +++ b/spec/controllers/admin/srg_histories_controller_spec.rb @@ -6,7 +6,7 @@ describe "GET index" do it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end @@ -19,7 +19,7 @@ it "renders the create js template" do post :create, srg_history: { name: 'test' }, format: :js - expect(response).to render_template("create") + response.should render_template("create") end end @@ -27,7 +27,7 @@ it "renders new" do post :create, srg_history: {}, format: :js - expect(response).to render_template("new") + response.should render_template("new") end end end @@ -41,7 +41,7 @@ it "renders the create js template" do put :update, id: @srg_history.id, format: :js - expect(response).to render_template("create") + response.should render_template("create") end end @@ -52,7 +52,7 @@ id: @srg_history.id, format: :js - expect(response).to render_template('new') + response.should render_template('new') end end end @@ -65,7 +65,7 @@ it "redirects after delete" do delete :destroy, id: @srg_history.id - expect(response).to redirect_to(admin_srg_histories_url) + response.should redirect_to(admin_srg_histories_url) end end end diff --git a/spec/controllers/admin/synonym_relationships_controller_spec.rb b/spec/controllers/admin/synonym_relationships_controller_spec.rb index 1a1f7982e9..b6cb176324 100644 --- a/spec/controllers/admin/synonym_relationships_controller_spec.rb +++ b/spec/controllers/admin/synonym_relationships_controller_spec.rb @@ -16,11 +16,11 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the synonym_relationship variable" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - expect(assigns(:synonym_relationship)).not_to be_nil + assigns(:synonym_relationship).should_not be_nil end end @@ -31,7 +31,7 @@ :taxon_relationship => { other_taxon_concept_id: synonym.id } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -39,7 +39,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -47,12 +47,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => synonym_relationship.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the synonym_relationship variable" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => synonym_relationship.id - expect(assigns(:synonym_relationship)).not_to be_nil + assigns(:synonym_relationship).should_not be_nil end end @@ -64,7 +64,7 @@ :taxon_relationship => { other_taxon_concept_id: synonym.id } - expect(response).to render_template('create') + response.should render_template('create') end it "responds with json when not successful" do xhr :put, :update, :format => 'js', @@ -73,7 +73,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - expect(response).to render_template('new') + response.should render_template('new') end end @@ -82,7 +82,7 @@ delete :destroy, :taxon_concept_id => taxon_concept.id, :id => synonym_relationship.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_names_url(synonym_relationship.taxon_concept) ) end diff --git a/spec/controllers/admin/tags_controller_spec.rb b/spec/controllers/admin/tags_controller_spec.rb index 3f4bb6d265..fbe3c6173c 100644 --- a/spec/controllers/admin/tags_controller_spec.rb +++ b/spec/controllers/admin/tags_controller_spec.rb @@ -6,8 +6,8 @@ describe "GET index" do it "renders the index template" do get :index - expect(response).to render_template("index") - expect(response).to render_template("layouts/admin") + response.should render_template("index") + response.should render_template("layouts/admin") end end @@ -15,11 +15,11 @@ it "renders create when successful" do xhr :post, :create, preset_tag: { name: "Test Tag", model: "TaxonConcept" } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, preset_tag: {} - expect(response).to render_template("new") + response.should render_template("new") end end @@ -29,12 +29,12 @@ it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => preset_tag.id, :preset_tag => {} - expect(response).to be_success + response.should be_success end it "responds with json error when not successful" do xhr :put, :update, :format => 'json', :id => preset_tag.id, :preset_tag => { :model => 'FakeCategory' } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end end @@ -43,7 +43,7 @@ let(:preset_tag) { create(:preset_tag) } it "redirects after delete" do delete :destroy, :id => preset_tag.id - expect(response).to redirect_to(admin_tags_url) + response.should redirect_to(admin_tags_url) end end end diff --git a/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb b/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb index ed01e82bd4..05d4151a5b 100644 --- a/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb +++ b/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb @@ -15,18 +15,18 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end @@ -38,7 +38,7 @@ :start_notification_id => create_cites_suspension_notification.id }, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) end @@ -46,14 +46,14 @@ it "renders new when not successful" do post :create, :cites_suspension => {}, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end describe "GET edit" do it "renders the edit template" do get :edit, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('edit') + response.should render_template('edit') end end @@ -66,7 +66,7 @@ }, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) end @@ -79,7 +79,7 @@ }, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('edit') + response.should render_template('edit') end end @@ -87,7 +87,7 @@ it "redirects after delete" do delete :destroy, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) end @@ -99,11 +99,11 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -111,10 +111,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_cites_suspensions_url(@taxon_concept) delete :destroy, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) - expect(CitesSuspension.find(@cites_suspension.id)).not_to be_nil + CitesSuspension.find(@cites_suspension.id).should_not be_nil end end end diff --git a/spec/controllers/admin/taxon_commons_controller_spec.rb b/spec/controllers/admin/taxon_commons_controller_spec.rb index 4682c712a7..61fe953185 100644 --- a/spec/controllers/admin/taxon_commons_controller_spec.rb +++ b/spec/controllers/admin/taxon_commons_controller_spec.rb @@ -11,8 +11,8 @@ describe "XHR GET 'new'" do it "returns http success and renders the new template" do xhr :get, :new, { :taxon_concept_id => @taxon_concept.id, :format => 'js' } - expect(response).to be_success - expect(response).to render_template('new') + response.should be_success + response.should render_template('new') end end @@ -24,14 +24,14 @@ :name => @common_name.name, :language_id => @common_name.language_id } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, :taxon_concept_id => @taxon_concept.id, :taxon_common => { } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -46,12 +46,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_common.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the taxon common variable" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_common.id - expect(assigns(:taxon_common)).not_to be_nil + assigns(:taxon_common).should_not be_nil end end @@ -71,7 +71,7 @@ :name => @common_name.name, :language_id => @common_name.language_id } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :put, :update, :format => 'js', @@ -80,7 +80,7 @@ :taxon_common => { :common_name_id => nil } - expect(response).to render_template('new') + response.should render_template('new') end end @@ -96,7 +96,7 @@ delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => taxon_common.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_names_url(@taxon_concept) ) end @@ -116,11 +116,11 @@ it "updates associated @taxon_concept's dependents_updated_at when taxon common is updated" do - expect(@taxon_concept.dependents_updated_at).to be_nil + @taxon_concept.dependents_updated_at.should be_nil # it gets updated by the creation of the taxon_common # but object needs to be reloaded - expect(@taxon_concept.reload.dependents_updated_at).not_to be_nil + @taxon_concept.reload.dependents_updated_at.should_not be_nil old_date = @taxon_concept.dependents_updated_at xhr :put, :update, :format => 'js', @@ -131,25 +131,25 @@ :language_id => @common_name.language_id } - expect(@taxon_concept.reload.dependents_updated_at).not_to eq(old_date) + @taxon_concept.reload.dependents_updated_at.should_not == old_date end it "updates associated @taxon_concept's dependents_updated_at when taxon common is deleted" do - expect(@taxon_concept.dependents_updated_at).to be_nil + @taxon_concept.dependents_updated_at.should be_nil # it gets updated by the creation of the taxon_common # but object needs to be reloaded - expect(@taxon_concept.reload.dependents_updated_at).not_to be_nil + @taxon_concept.reload.dependents_updated_at.should_not be_nil old_date = @taxon_concept.dependents_updated_at delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => @taxon_common.id - expect(@taxon_concept.reload.dependents_updated_at).not_to eq(old_date) - expect(TaxonCommon.where(:id => @taxon_common.id).size).to eq(0) + @taxon_concept.reload.dependents_updated_at.should_not == old_date + TaxonCommon.where(:id => @taxon_common.id).size.should == 0 end end @@ -167,10 +167,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_names_url(@taxon_concept) delete :destroy, :id => taxon_common.id, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_names_url(@taxon_concept) ) - expect(TaxonCommon.find(taxon_common.id)).not_to be_nil + TaxonCommon.find(taxon_common.id).should_not be_nil end end end diff --git a/spec/controllers/admin/taxon_concept_comments_controller_spec.rb b/spec/controllers/admin/taxon_concept_comments_controller_spec.rb index 4e08a8634e..2a248ec3c5 100644 --- a/spec/controllers/admin/taxon_concept_comments_controller_spec.rb +++ b/spec/controllers/admin/taxon_concept_comments_controller_spec.rb @@ -10,7 +10,7 @@ describe 'GET index' do it 'renders the index template' do get :index, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('index') + response.should render_template('index') end end @@ -19,10 +19,10 @@ post :create, taxon_concept_id: @taxon_concept.id, comment: { note: 'blah' } - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_comments_url(@taxon_concept) ) - expect(flash[:notice]).not_to be_nil + flash[:notice].should_not be_nil end end @@ -33,10 +33,10 @@ id: comment.id, taxon_concept_id: @taxon_concept.id, comment: { note: 'blah' } - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_comments_url(@taxon_concept) ) - expect(flash[:notice]).not_to be_nil + flash[:notice].should_not be_nil end end diff --git a/spec/controllers/admin/taxon_concept_references_controller_spec.rb b/spec/controllers/admin/taxon_concept_references_controller_spec.rb index b6808948e2..a63aa8d539 100644 --- a/spec/controllers/admin/taxon_concept_references_controller_spec.rb +++ b/spec/controllers/admin/taxon_concept_references_controller_spec.rb @@ -16,7 +16,7 @@ :reference_attributes => { :citation => "My nice literature" } } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -24,7 +24,7 @@ :taxon_concept_reference => { :reference_attributes => {} } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -39,12 +39,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_concept_reference.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the taxon concept reference variable" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_concept_reference.id - expect(assigns(:taxon_concept_reference)).not_to be_nil + assigns(:taxon_concept_reference).should_not be_nil end end @@ -64,7 +64,7 @@ :reference_attributes => { :citation => "My nice literature" } } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :put, :update, :format => 'js', @@ -73,15 +73,15 @@ :taxon_concept_reference => { :reference_attributes => {} } - expect(response).to render_template('new') + response.should render_template('new') end end describe "XHR GET 'new'" do it "returns http success and renders the new template" do xhr :get, :new, { :taxon_concept_id => @taxon_concept.id, :format => 'js' } - expect(response).to be_success - expect(response).to render_template('new') + response.should be_success + response.should render_template('new') end end @@ -91,7 +91,7 @@ delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => taxon_concept_reference.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_taxon_concept_references_url(taxon_concept_reference.taxon_concept) ) end diff --git a/spec/controllers/admin/taxon_concepts_controller_spec.rb b/spec/controllers/admin/taxon_concepts_controller_spec.rb index dde27ef34f..f6bbb2eb9f 100644 --- a/spec/controllers/admin/taxon_concepts_controller_spec.rb +++ b/spec/controllers/admin/taxon_concepts_controller_spec.rb @@ -16,20 +16,20 @@ end it "renders the index template" do get :index - expect(response).to render_template("index") - expect(response).to render_template("layouts/admin") + response.should render_template("index") + response.should render_template("layouts/admin") end it "redirects if 1 result" do get :index, search_params: { taxonomy: { id: cites_eu.id }, scientific_name: 'Foobarus i' } - expect(response).to redirect_to(admin_taxon_concept_names_path(@taxon)) + response.should redirect_to(admin_taxon_concept_names_path(@taxon)) end it "assigns taxa in taxonomic order" do get :index, search_params: { taxonomy: { id: cites_eu.id }, scientific_name: 'Foobarus' } - expect(assigns(:taxon_concepts)).to eq([@taxon.parent, @taxon]) + assigns(:taxon_concepts).should eq([@taxon.parent, @taxon]) end end @@ -43,23 +43,23 @@ scientific_name: 'Canis', parent_id: create_cites_eu_family } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, taxon_concept: {} - expect(response).to render_template("new") + response.should render_template("new") end it "renders new_synonym when not successful S" do xhr :post, :create, taxon_concept: { name_status: 'S' } - expect(response).to render_template("new_synonym") + response.should render_template("new_synonym") end it "renders new_hybrid when not successful H" do xhr :post, :create, taxon_concept: { name_status: 'H' } - expect(response).to render_template("new_hybrid") + response.should render_template("new_hybrid") end it "renders new_synonym when not successful N" do xhr :post, :create, taxon_concept: { name_status: 'N' } - expect(response).to render_template("new_n_name") + response.should render_template("new_n_name") end end @@ -69,24 +69,24 @@ it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => taxon_concept.id, :taxon_concept => {} - expect(response).to be_success + response.should be_success end it "responds with json error when not successful" do xhr :put, :update, :format => 'json', :id => taxon_concept.id, :taxon_concept => { :taxonomy_id => nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end context "when HTML" do it "redirects to edit when successful" do put :update, :id => taxon_concept.id, :taxon_commons_attributes => FactoryGirl.attributes_for(:common_name) - expect(response).to redirect_to(edit_admin_taxon_concept_url(taxon_concept)) + response.should redirect_to(edit_admin_taxon_concept_url(taxon_concept)) end it "renders edit when not successful" do put :update, :id => taxon_concept.id, :taxon_concept => { :taxonomy_id => nil } - expect(response).to render_template("edit") + response.should render_template("edit") end end end @@ -95,7 +95,7 @@ let(:taxon_concept) { create(:taxon_concept) } it "redirects after delete" do delete :destroy, :id => taxon_concept.id - expect(response).to redirect_to(admin_taxon_concepts_url) + response.should redirect_to(admin_taxon_concepts_url) end end @@ -105,8 +105,8 @@ it "redirects to admin root path and doesn't delete" do delete :destroy, :id => taxon_concept.id - expect(response).to redirect_to(admin_root_path) - expect(TaxonConcept.where(:id => taxon_concept.id).size).to eq(1) + response.should redirect_to(admin_root_path) + TaxonConcept.where(:id => taxon_concept.id).size.should == 1 end end @@ -116,13 +116,13 @@ it "redirects to root path" do get :index - expect(response).to redirect_to(root_path) + response.should redirect_to(root_path) end it "redirects to root path and doesn't delete" do delete :destroy, :id => taxon_concept.id - expect(response).to redirect_to(root_path) - expect(TaxonConcept.where(:id => taxon_concept.id).size).to eq(1) + response.should redirect_to(root_path) + TaxonConcept.where(:id => taxon_concept.id).size.should == 1 end end @@ -135,8 +135,8 @@ it "returns properly formatted json" do xhr :get, :autocomplete, :format => 'json', :search_params => { :scientific_name => 'AAA' } - expect(response.body).to have_json_size(1) - expect(parse_json(response.body, "0/full_name")).to eq('Aaa') + response.body.should have_json_size(1) + parse_json(response.body, "0/full_name").should == 'Aaa' end end diff --git a/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb b/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb index f3ddd6a42d..f43ded20cf 100644 --- a/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb +++ b/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb @@ -10,24 +10,24 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do territory = create(:geo_entity, :geo_entity_type_id => territory_geo_entity_type.id) country = create(:geo_entity) get :new, :taxon_concept_id => @taxon_concept.id - expect(assigns(:geo_entities).size).to eq(2) + assigns(:geo_entities).size.should == 2 end end @@ -46,7 +46,7 @@ ) }, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to(admin_taxon_concept_eu_suspensions_url(@taxon_concept.id)) + response.should redirect_to(admin_taxon_concept_eu_suspensions_url(@taxon_concept.id)) end end @@ -54,7 +54,7 @@ it "renders new" do post :create, :eu_suspension => {}, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template("new") + response.should render_template("new") end end end @@ -68,12 +68,12 @@ end it "renders the edit template" do get :edit, :id => @eu_suspension.id, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('edit') + response.should render_template('edit') end it "assigns @geo_entities" do territory = create(:geo_entity, :geo_entity_type_id => territory_geo_entity_type.id) get :edit, :id => @eu_suspension.id, :taxon_concept_id => @taxon_concept.id - expect(assigns(:geo_entities)).to include(territory) + assigns(:geo_entities).should include(territory) end end @@ -98,7 +98,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) end @@ -115,7 +115,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) end @@ -132,7 +132,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end context "when eu_decision_type is not present" do @@ -145,7 +145,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end end @@ -160,7 +160,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end end @@ -175,7 +175,7 @@ it "redirects after delete" do delete :destroy, :id => @eu_suspension.id, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) end @@ -192,11 +192,11 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -204,10 +204,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_eu_suspensions_url(@taxon_concept) delete :destroy, :id => eu_suspension.id, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) - expect(EuSuspension.find(eu_suspension.id)).not_to be_nil + EuSuspension.find(eu_suspension.id).should_not be_nil end end end diff --git a/spec/controllers/admin/taxon_listing_changes_controller_spec.rb b/spec/controllers/admin/taxon_listing_changes_controller_spec.rb index 190acd9c39..4a44ef28a5 100644 --- a/spec/controllers/admin/taxon_listing_changes_controller_spec.rb +++ b/spec/controllers/admin/taxon_listing_changes_controller_spec.rb @@ -41,18 +41,18 @@ ) get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(assigns(:listing_changes)).to eq([listing_change2, listing_change1]) - expect(assigns(:taxon_concept)).to eq @taxon_concept + assigns(:listing_changes).should eq([listing_change2, listing_change1]) + assigns(:taxon_concept).should eq @taxon_concept end it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end @@ -60,12 +60,12 @@ it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns @listing_change" do get :new, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(assigns(:listing_change)).not_to be_nil + assigns(:listing_change).should_not be_nil end end @@ -80,7 +80,7 @@ }, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) end @@ -90,7 +90,7 @@ post :create, :listing_change => {}, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to render_template("new") + response.should render_template("new") end end @@ -108,13 +108,13 @@ get :edit, :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to render_template('edit') + response.should render_template('edit') end it "assigns the listing_change variable" do get :edit, :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(assigns(:listing_change)).not_to be_nil + assigns(:listing_change).should_not be_nil end end @@ -141,7 +141,7 @@ :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) end @@ -179,7 +179,7 @@ :taxon_concept_id => taxon_concept.id, :designation_id => eu_designation.id, :redirect_to_eu_reg => "1" - expect(response).to redirect_to( + response.should redirect_to( admin_eu_regulation_listing_changes_url(eu_regulation) ) end @@ -189,7 +189,7 @@ :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to render_template('edit') + response.should render_template('edit') end it "redirects to index page and removes annotation when fields cleared" do @@ -205,11 +205,11 @@ "id" => @annotation.id } } - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_designation_listing_changes_url( @taxon_concept, @designation) ) - expect(@listing_change.reload.annotation).to be_nil + @listing_change.reload.annotation.should be_nil end end @@ -227,7 +227,7 @@ delete :destroy, :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) end @@ -247,12 +247,12 @@ it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -261,10 +261,10 @@ delete :destroy, :id => listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) - expect(ListingChange.find(listing_change.id)).not_to be_nil + ListingChange.find(listing_change.id).should_not be_nil end end end diff --git a/spec/controllers/admin/taxon_quotas_controller_spec.rb b/spec/controllers/admin/taxon_quotas_controller_spec.rb index 368d807315..54e28bfb92 100644 --- a/spec/controllers/admin/taxon_quotas_controller_spec.rb +++ b/spec/controllers/admin/taxon_quotas_controller_spec.rb @@ -12,24 +12,24 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) get :new, :taxon_concept_id => @taxon_concept.id - expect(assigns(:geo_entities).size).to eq(2) + assigns(:geo_entities).size.should == 2 end end @@ -44,7 +44,7 @@ :geo_entity_id => @geo_entity.id }, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) end @@ -52,7 +52,7 @@ it "renders new when not successful" do post :create, :quota => {}, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template("new") + response.should render_template("new") end end @@ -67,13 +67,13 @@ end it "renders the edit template" do get :edit, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('edit') + response.should render_template('edit') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) get :edit, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - expect(assigns(:geo_entities).size).to eq(2) + assigns(:geo_entities).size.should == 2 end end @@ -95,7 +95,7 @@ }, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) end @@ -108,7 +108,7 @@ }, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end end @@ -124,7 +124,7 @@ it "redirects after delete" do delete :destroy, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) end @@ -143,11 +143,11 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -155,10 +155,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_quotas_url(@taxon_concept) delete :destroy, :id => quota.id, :taxon_concept_id => @taxon_concept.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) - expect(Quota.find(quota.id)).not_to be_nil + Quota.find(quota.id).should_not be_nil end end end diff --git a/spec/controllers/admin/taxon_relationships_controller_spec.rb b/spec/controllers/admin/taxon_relationships_controller_spec.rb index 56274f9dc7..bb5f58b11f 100644 --- a/spec/controllers/admin/taxon_relationships_controller_spec.rb +++ b/spec/controllers/admin/taxon_relationships_controller_spec.rb @@ -11,16 +11,16 @@ } it "assigns @taxon_relationships" do get :index, :taxon_concept_id => taxon_concept.id, :type => taxon_relationship.taxon_relationship_type.name - expect(assigns(:taxon_relationships)).to eq([taxon_relationship]) + assigns(:taxon_relationships).should eq([taxon_relationship]) assigns(:taxon_concept) end it "renders the index template" do get :index, :taxon_concept_id => taxon_concept.id - expect(response).to render_template("index") + response.should render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => taxon_concept.id - expect(response).to render_template('layouts/taxon_concepts') + response.should render_template('layouts/taxon_concepts') end end @@ -32,13 +32,13 @@ it "renders create when successful" do xhr :post, :create, :taxon_relationship => taxon_relationship_attributes, :taxon_concept_id => taxon_concept.id - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do taxon_relationship = create(:taxon_relationship, taxon_relationship_attributes) xhr :post, :create, taxon_relationship: taxon_relationship_attributes, :taxon_concept_id => taxon_relationship.taxon_concept_id - expect(response).to render_template("new") + response.should render_template("new") end end @@ -59,16 +59,16 @@ } context "destroys relationship for taxon concept" do specify { - expect do + lambda do delete :destroy, taxon_concept_id: taxon_concept.id, id: rel.id - end.to change(TaxonRelationship, :count).by(-2) + end.should change(TaxonRelationship, :count).by(-2) } end context "destroys relationship for other taxon concept" do specify { - expect do + lambda do delete :destroy, taxon_concept_id: other_taxon_concept.id, id: rel.id - end.to change(TaxonRelationship, :count).by(-2) + end.should change(TaxonRelationship, :count).by(-2) } end end @@ -88,16 +88,16 @@ } context "destroys relationship for taxon concept" do specify { - expect do + lambda do delete :destroy, taxon_concept_id: taxon_concept.id, id: rel.id - end.to change(TaxonRelationship, :count).by(-1) + end.should change(TaxonRelationship, :count).by(-1) } end context "destroys relationship for other taxon concept" do specify { - expect do + lambda do delete :destroy, taxon_concept_id: other_taxon_concept.id, id: rel.id - end.to change(TaxonRelationship, :count).by(-1) + end.should change(TaxonRelationship, :count).by(-1) } end end diff --git a/spec/controllers/admin/taxonomies_controller_spec.rb b/spec/controllers/admin/taxonomies_controller_spec.rb index d6386851d2..bf2983da47 100644 --- a/spec/controllers/admin/taxonomies_controller_spec.rb +++ b/spec/controllers/admin/taxonomies_controller_spec.rb @@ -12,18 +12,18 @@ describe "GET index" do it "assigns @taxonomies sorted by name" do get :index - expect(assigns(:taxonomies)).to eq([@taxonomy2, @taxonomy1]) + assigns(:taxonomies).should eq([@taxonomy2, @taxonomy1]) end it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - expect(response.body).to have_json_size(2) - expect(parse_json(response.body, "0/text")).to eq('AA') + response.body.should have_json_size(2) + parse_json(response.body, "0/text").should == 'AA' end end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, taxonomy: FactoryGirl.attributes_for(:taxonomy) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, taxonomy: { :name => nil } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -43,11 +43,11 @@ let(:taxonomy) { create(:taxonomy) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => taxonomy.id, :taxonomy => { :name => 'ZZ' } - expect(response).to be_success + response.should be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => taxonomy.id, :taxonomy => { :name => nil } - expect(JSON.parse(response.body)).to include('errors') + JSON.parse(response.body).should include('errors') end end @@ -55,7 +55,7 @@ let(:taxonomy) { create(:taxonomy) } it "redirects after delete" do delete :destroy, :id => taxonomy.id - expect(response).to redirect_to(admin_taxonomies_url) + response.should redirect_to(admin_taxonomies_url) end end @@ -64,15 +64,15 @@ describe "GET index" do it "redirects to admin root" do get :index - expect(response).to redirect_to admin_root_path + response.should redirect_to admin_root_path end end describe "DELETE destroy" do let(:taxonomy) { create(:taxonomy) } it "fails to delete and redirects to admin_root_path" do delete :destroy, :id => taxonomy.id - expect(response).to redirect_to(admin_root_path) - expect(Taxonomy.find(taxonomy.id)).not_to be_nil + response.should redirect_to(admin_root_path) + Taxonomy.find(taxonomy.id).should_not be_nil end end end diff --git a/spec/controllers/admin/trade_names_relationships_controller_spec.rb b/spec/controllers/admin/trade_names_relationships_controller_spec.rb index c5aace6928..8f7e1ca18a 100644 --- a/spec/controllers/admin/trade_names_relationships_controller_spec.rb +++ b/spec/controllers/admin/trade_names_relationships_controller_spec.rb @@ -16,11 +16,11 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the trade_name_relationship variable" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - expect(assigns(:trade_name_relationship)).not_to be_nil + assigns(:trade_name_relationship).should_not be_nil end end @@ -31,7 +31,7 @@ :taxon_relationship => { other_taxon_concept_id: trade_name.id } - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -39,7 +39,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -47,12 +47,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => trade_name_relationship.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the trade_name_relationship variable" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => trade_name_relationship.id - expect(assigns(:trade_name_relationship)).not_to be_nil + assigns(:trade_name_relationship).should_not be_nil end end @@ -64,7 +64,7 @@ :taxon_relationship => { other_taxon_concept_id: trade_name.id } - expect(response).to render_template("create") + response.should render_template("create") end it "responds with json when not successful" do xhr :put, :update, :format => 'js', @@ -73,7 +73,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - expect(response).to render_template('new') + response.should render_template('new') end end @@ -82,7 +82,7 @@ delete :destroy, :taxon_concept_id => taxon_concept.id, :id => trade_name_relationship.id - expect(response).to redirect_to( + response.should redirect_to( admin_taxon_concept_names_url(trade_name_relationship.taxon_concept) ) end diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index bb66421e3c..968a5412bd 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -7,7 +7,7 @@ describe "GET index" do it "renders the index template" do get :index - expect(response).to render_template("index") + response.should render_template("index") end end end @@ -15,11 +15,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, user: FactoryGirl.attributes_for(:user) - expect(response).to render_template("create") + response.should render_template("create") end it "renders new when not successful" do xhr :post, :create, user: { :name => nil } - expect(response).to render_template("new") + response.should render_template("new") end end @@ -27,11 +27,11 @@ let(:user) { create(:user) } it "renders the edit template" do xhr :get, :edit, :id => user.id - expect(response).to render_template('new') + response.should render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :edit, :id => user.id - expect(assigns(:user)).not_to be_nil + assigns(:user).should_not be_nil end end @@ -39,12 +39,12 @@ let(:user) { create(:user) } it "responds with 200 when successful" do xhr :put, :update, :format => 'js', :id => user.id, :user => { :name => 'ZZ' } - expect(response).to be_success - expect(response).to render_template('create') + response.should be_success + response.should render_template('create') end it "responds with template new when not successful" do xhr :put, :update, :format => 'js', :id => user.id, :user => { :name => nil } - expect(response).to render_template('new') + response.should render_template('new') end end @@ -52,7 +52,7 @@ let(:user) { create(:user) } it "redirects after delete" do delete :destroy, :id => user.id - expect(response).to redirect_to(admin_users_url) + response.should redirect_to(admin_users_url) end end diff --git a/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb b/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb index 8cb20f57b5..f2038e207f 100644 --- a/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb +++ b/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb @@ -8,13 +8,13 @@ get :index, :taxonomy => "CITES", :taxon_concept_query => "Boa", :ranks => ["SPECIES"], :visibility => "trade" - expect(response.body).to have_json_size(1). + response.body.should have_json_size(1). at_path("auto_complete_taxon_concepts") end it "returns 3 results when searching for species name and not filtering by rank" do get :index, :taxonomy => "CITES", :taxon_concept_query => "Boa" - expect(response.body).to have_json_size(3). + response.body.should have_json_size(3). at_path("auto_complete_taxon_concepts") end end diff --git a/spec/controllers/api/document_geo_entities_controller_spec.rb b/spec/controllers/api/document_geo_entities_controller_spec.rb index 4a8abd36a9..1645e074f7 100644 --- a/spec/controllers/api/document_geo_entities_controller_spec.rb +++ b/spec/controllers/api/document_geo_entities_controller_spec.rb @@ -25,17 +25,17 @@ it "returns Poland when searching by wolf" do get :index, taxon_concept_query: 'Canis lu' - expect(response.body).to have_json_size(1).at_path('document_geo_entities') + response.body.should have_json_size(1).at_path('document_geo_entities') end it "returns 0 geo entities when no match for taxon name" do get :index, taxon_concept_query: 'Lynx' - expect(response.body).to have_json_size(0).at_path('document_geo_entities') + response.body.should have_json_size(0).at_path('document_geo_entities') end it "returns all geo entities when no taxon name given" do get :index - expect(response.body).to have_json_size(7).at_path('document_geo_entities') + response.body.should have_json_size(7).at_path('document_geo_entities') end end diff --git a/spec/controllers/api/document_tags_controller.rb b/spec/controllers/api/document_tags_controller.rb index 3d1399fdfd..4c6498fcd1 100644 --- a/spec/controllers/api/document_tags_controller.rb +++ b/spec/controllers/api/document_tags_controller.rb @@ -7,7 +7,7 @@ end it "returns document tags" do get :index - expect(response.body).to have_json_size(1).at_path('document_tags') + response.body.should have_json_size(1).at_path('document_tags') end end end diff --git a/spec/controllers/api/documents_controller_spec.rb b/spec/controllers/api/documents_controller_spec.rb index 268ed686a7..10ee72fc8b 100644 --- a/spec/controllers/api/documents_controller_spec.rb +++ b/spec/controllers/api/documents_controller_spec.rb @@ -28,7 +28,7 @@ context "GET index returns all documents" do def get_all_documents get :index, taxon_concept_id: @taxon_concept.id - expect(response.body).to have_json_size(4).at_path('documents') + response.body.should have_json_size(4).at_path('documents') end context "GET index contributor" do login_contributor @@ -50,7 +50,7 @@ def get_all_documents context "GET index returns only public documents" do def get_public_documents get :index, taxon_concept_id: @taxon_concept.id - expect(response.body).to have_json_size(3).at_path('documents') + response.body.should have_json_size(3).at_path('documents') end context "GET index api user " do login_api_user @@ -69,7 +69,7 @@ def get_public_documents context "GET index returns only public documents for secretariat role" do def get_public_documents get :index, taxon_concept_id: @taxon_concept.id - expect(response.body).to have_json_size(3).at_path('documents') + response.body.should have_json_size(3).at_path('documents') end context "GET index api user " do login_secretariat_user @@ -83,7 +83,7 @@ def get_public_documents context "show action fails" do login_api_user it "should return 403 status when permission denied" do - expect(controller).to receive(:render_403) { controller.render nothing: true } + controller.should_receive(:render_403) { controller.render nothing: true } get :show, id: @document2.id end end @@ -91,7 +91,7 @@ def get_public_documents context "GET should retrieve documents with no event_type" do it "returns documents with no event_type" do get :index, event_type: "Other" - expect(response.body).to have_json_size(1).at_path('documents') + response.body.should have_json_size(1).at_path('documents') end end @@ -99,35 +99,35 @@ def get_public_documents context "single document selected" do it "should return 404 if file is missing" do expect(File).to receive(:exists?).and_return(false) - expect(controller).to receive(:render_404) { controller.render nothing: true } + controller.should_receive(:render_404) { controller.render nothing: true } get :download_zip, ids: @document2.id end it "should return zip file if file is found" do allow(controller).to receive(:render) expect(File).to receive(:exists?).and_return(true) get :download_zip, ids: @document2.id - expect(response.headers['Content-Type']).to eq 'application/zip' + response.headers['Content-Type'].should eq 'application/zip' end end context "multiple documents selected" do it "should return 404 if all files are missing" do expect(File).to receive(:exists?).and_return(false, false) - expect(controller).to receive(:render_404) { controller.render nothing: true } + controller.should_receive(:render_404) { controller.render nothing: true } get :download_zip, ids: "#{@document.id},#{@document2.id}" end it "should return zip file if at least a file is found" do expect(File).to receive(:exists?).and_return(false, true) get :download_zip, ids: "#{@document.id},#{@document2.id}" - expect(response.headers['Content-Type']).to eq 'application/zip' + response.headers['Content-Type'].should eq 'application/zip' end end context "cascading documents logic" do it "should get subspecies documents" do get :index, taxon_concepts_ids: [@taxon_concept.id] - expect(response.body).to have_json_size(3).at_path('documents') + response.body.should have_json_size(3).at_path('documents') end end end diff --git a/spec/controllers/api/events_controller_spec.rb b/spec/controllers/api/events_controller_spec.rb index 9c2374b196..31db57c674 100644 --- a/spec/controllers/api/events_controller_spec.rb +++ b/spec/controllers/api/events_controller_spec.rb @@ -9,8 +9,8 @@ end it "returns only E-library events most recent first" do get :index - expect(response.body).to have_json_size(2).at_path('events') - expect(response.body).to be_json_eql( + response.body.should have_json_size(2).at_path('events') + response.body.should be_json_eql( Species::EventSerializer.new(@copY).attributes.to_json ).at_path('events/0') end diff --git a/spec/controllers/api/geo_entities_controller_spec.rb b/spec/controllers/api/geo_entities_controller_spec.rb index 2ef04d6da8..8b94051373 100644 --- a/spec/controllers/api/geo_entities_controller_spec.rb +++ b/spec/controllers/api/geo_entities_controller_spec.rb @@ -37,11 +37,11 @@ describe "GET index" do it "returns regions" do get :index, :geo_entity_types_set => "1" - expect(response.body).to have_json_size(1).at_path('geo_entities') + response.body.should have_json_size(1).at_path('geo_entities') end it "returns countries & territories" do get :index, :geo_entity_types_set => "2" - expect(response.body).to have_json_size(3).at_path('geo_entities') + response.body.should have_json_size(3).at_path('geo_entities') end end end diff --git a/spec/controllers/api/purposes_controller_spec.rb b/spec/controllers/api/purposes_controller_spec.rb index f3b582ef34..ff87f5dbab 100644 --- a/spec/controllers/api/purposes_controller_spec.rb +++ b/spec/controllers/api/purposes_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns purposes" do get :index - expect(response.body).to have_json_size(1).at_path('purposes') + response.body.should have_json_size(1).at_path('purposes') end end end diff --git a/spec/controllers/api/sources_controller_spec.rb b/spec/controllers/api/sources_controller_spec.rb index b46a484f7a..86d4c623dd 100644 --- a/spec/controllers/api/sources_controller_spec.rb +++ b/spec/controllers/api/sources_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns sources" do get :index - expect(response.body).to have_json_size(1).at_path('sources') + response.body.should have_json_size(1).at_path('sources') end end end diff --git a/spec/controllers/api/terms_controller_spec.rb b/spec/controllers/api/terms_controller_spec.rb index e4e8feaab0..f6293eb5e8 100644 --- a/spec/controllers/api/terms_controller_spec.rb +++ b/spec/controllers/api/terms_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns terms" do get :index - expect(response.body).to have_json_size(1).at_path('terms') + response.body.should have_json_size(1).at_path('terms') end end end diff --git a/spec/controllers/api/units_controller_spec.rb b/spec/controllers/api/units_controller_spec.rb index f582cb87f8..6621b231fe 100644 --- a/spec/controllers/api/units_controller_spec.rb +++ b/spec/controllers/api/units_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns units" do get :index - expect(response.body).to have_json_size(1).at_path('units') + response.body.should have_json_size(1).at_path('units') end end end diff --git a/spec/controllers/checklist/geo_entities_controller_spec.rb b/spec/controllers/checklist/geo_entities_controller_spec.rb index 847c612080..78f42f0582 100644 --- a/spec/controllers/checklist/geo_entities_controller_spec.rb +++ b/spec/controllers/checklist/geo_entities_controller_spec.rb @@ -37,11 +37,11 @@ describe "GET index" do it "returns regions" do get :index, :geo_entity_types_set => "1" - expect(response.body).to have_json_size(1) + response.body.should have_json_size(1) end it "returns countries & territories" do get :index, :geo_entity_types_set => "2" - expect(response.body).to have_json_size(3) + response.body.should have_json_size(3) end end end diff --git a/spec/controllers/checklist/taxon_concepts_controller_spec.rb b/spec/controllers/checklist/taxon_concepts_controller_spec.rb index 0321ee49a4..39b7046e2e 100644 --- a/spec/controllers/checklist/taxon_concepts_controller_spec.rb +++ b/spec/controllers/checklist/taxon_concepts_controller_spec.rb @@ -6,13 +6,13 @@ it "returns 1 result" do xhr :get, :autocomplete, :format => 'json', :scientific_name => 'Arctocephalus townsendi' - expect(response.body).to have_json_size(1) + response.body.should have_json_size(1) end end context "when query blank" do it "returns 0 results" do xhr :get, :autocomplete, :format => 'json' - expect(response.body).to have_json_size(0) + response.body.should have_json_size(0) end end end diff --git a/spec/controllers/cites_trade/exports_controller_spec.rb b/spec/controllers/cites_trade/exports_controller_spec.rb index b809c0a051..f0ad108bf9 100644 --- a/spec/controllers/cites_trade/exports_controller_spec.rb +++ b/spec/controllers/cites_trade/exports_controller_spec.rb @@ -7,7 +7,7 @@ it "returns count of shipments" do create(:shipment) get :download, :filters => { :report_type => 'raw' }, :format => :json - expect(parse_json(response.body)['total']).to eq(1) + parse_json(response.body)['total'].should == 1 end end context "comptab" do @@ -17,14 +17,14 @@ Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") get :download, :filters => { :report_type => :comptab } - expect(response.content_type).to eq("text/csv") - expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"shipments.csv\"") + response.content_type.should eq("text/csv") + response.headers["Content-Disposition"].should eq("attachment; filename=\"shipments.csv\"") end it "logs download information from public interface to the TradeDataDownload model" do create(:shipment) - Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') - Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) - Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") + expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') + allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) + allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") lambda do get :download, :filters => { :report_type => 'comptab', @@ -32,7 +32,7 @@ :time_range_start => '1975', :time_range_end => '2000' } - end.to change(Trade::TradeDataDownload, :count).by(1) + end.should change(Trade::TradeDataDownload, :count).by(1) end end context 'when shipments cannot be retrieved' do diff --git a/spec/controllers/cites_trade/shipments_controller_spec.rb b/spec/controllers/cites_trade/shipments_controller_spec.rb index b90e7e730c..6a8c17e38e 100644 --- a/spec/controllers/cites_trade/shipments_controller_spec.rb +++ b/spec/controllers/cites_trade/shipments_controller_spec.rb @@ -10,24 +10,24 @@ get :index, filters: { report_type: 'raw' }, format: :json - expect(response.body).to have_json_path('shipment_comptab_export') + response.body.should have_json_path('shipment_comptab_export') end it "should return comptab export when report_type = comptab" do get :index, filters: { report_type: 'comptab' }, format: :json - expect(response.body).to have_json_path('shipment_comptab_export') + response.body.should have_json_path('shipment_comptab_export') end it "should return gross net export when report_type = gross_exports" do get :index, filters: { report_type: 'gross_exports' }, format: :json - expect(response.body).to have_json_path('shipment_gross_net_export') + response.body.should have_json_path('shipment_gross_net_export') end end it "should return all comptab shipments" do get :index, format: :json - expect(response.body).to have_json_size(7).at_path('shipment_comptab_export/rows') + response.body.should have_json_size(7).at_path('shipment_comptab_export/rows') end it "should return all gross_exports shipments" do get :index, filters: { @@ -35,28 +35,28 @@ time_range_start: 2012, time_range_end: 2014 }, format: :json - expect(response.body).to have_json_size(5).at_path('shipment_gross_net_export/rows') + response.body.should have_json_size(5).at_path('shipment_gross_net_export/rows') end it "should return genus & species shipments when searching by genus" do get :index, filters: { taxon_concepts_ids: [@animal_genus.id], selection_taxon: 'taxonomic_cascade' }, format: :json - expect(response.body).to have_json_size(2).at_path('shipment_comptab_export/rows') + response.body.should have_json_size(2).at_path('shipment_comptab_export/rows') end it "should return family, genus & species shipments when searching by family" do get :index, filters: { taxon_concepts_ids: [@animal_family.id], selection_taxon: 'taxonomic_cascade' }, format: :json - expect(response.body).to have_json_size(3).at_path('shipment_comptab_export/rows') + response.body.should have_json_size(3).at_path('shipment_comptab_export/rows') end it "should return genus shipments when searching by taxon" do get :index, filters: { taxon_concepts_ids: [@animal_genus.id], selection_taxon: 'taxon' }, format: :json - expect(response.body).to have_json_size(0).at_path('shipment_comptab_export/rows') + response.body.should have_json_size(0).at_path('shipment_comptab_export/rows') end end diff --git a/spec/controllers/pages_controller_spec.rb b/spec/controllers/pages_controller_spec.rb index b59be98034..2730f23e40 100644 --- a/spec/controllers/pages_controller_spec.rb +++ b/spec/controllers/pages_controller_spec.rb @@ -9,11 +9,11 @@ end it "assigns annex regulations sorted by effective_at" do get :eu_legislation - expect(assigns(:eu_annex_regulations)).to eq([@ar2, @ar1]) + assigns(:eu_annex_regulations).should eq([@ar2, @ar1]) end it "assigns suspension regulations" do get :eu_legislation - expect(assigns(:eu_suspension_regulations)).not_to be_nil + assigns(:eu_suspension_regulations).should_not be_nil end end end diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index e28bd4ab92..f2231c25b2 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -15,7 +15,7 @@ put :update, :id => @u1.id, :user => { :email => @u1.email, :name => 'ZZ' } - expect(response).to redirect_to(admin_root_url) + response.should redirect_to(admin_root_url) end it "should update password" do sign_in(@u1) @@ -24,14 +24,14 @@ :password => '22222222', :password_confirmation => '22222222', :current_password => '11111111' } - expect(response).to redirect_to(admin_root_url) + response.should redirect_to(admin_root_url) end it "should not update that account if not valid" do sign_in(@u1) put :update, :id => @u1.id, :user => { :email => @u1.email, :name => nil } - expect(response).to render_template("edit") + response.should render_template("edit") end end @@ -41,7 +41,7 @@ put :update, :id => @u2.id, :user => { :email => @u1.email, :name => 'ZZ' } - expect(@u2.reload.name).not_to eq('ZZ') + @u2.reload.name.should_not == 'ZZ' end end diff --git a/spec/controllers/trade/annual_report_uploads_controller_spec.rb b/spec/controllers/trade/annual_report_uploads_controller_spec.rb index 2572de7de2..96a69f6721 100644 --- a/spec/controllers/trade/annual_report_uploads_controller_spec.rb +++ b/spec/controllers/trade/annual_report_uploads_controller_spec.rb @@ -34,18 +34,18 @@ def exporter_csv end it "should return all annual report uploads" do get :index, format: :json - expect(response.body).to have_json_size(2).at_path('annual_report_uploads') + response.body.should have_json_size(2).at_path('annual_report_uploads') end it "should return annual report uploads in progress" do get :index, is_done: 0, format: :json - expect(response.body).to have_json_size(1).at_path('annual_report_uploads') + response.body.should have_json_size(1).at_path('annual_report_uploads') end end describe "GET show" do it "should return success" do get :show, id: annual_report_upload.id, format: :json - expect(response.body).to have_json_path('annual_report_upload') + response.body.should have_json_path('annual_report_upload') end end @@ -56,7 +56,7 @@ def exporter_csv :point_of_view => 'E', :trading_country_id => france.id, :csv_source_file => exporter_csv }, :format => 'json' - expect(parse_json(response.body, "files/0")['id']).not_to be_blank + parse_json(response.body, "files/0")['id'].should_not be_blank end it "should return error in jQuery File Upload way" do xhr :post, :create, @@ -64,7 +64,7 @@ def exporter_csv :point_of_view => 'I', :trading_country_id => france.id, :csv_source_file => exporter_csv }, :format => 'json' - expect(parse_json(response.body, "files/0")['id']).to be_blank + parse_json(response.body, "files/0")['id'].should be_blank end end diff --git a/spec/controllers/trade/ember_controller_spec.rb b/spec/controllers/trade/ember_controller_spec.rb index 3e5b55b4bd..04ac14a661 100644 --- a/spec/controllers/trade/ember_controller_spec.rb +++ b/spec/controllers/trade/ember_controller_spec.rb @@ -6,7 +6,7 @@ describe "GET 'start'" do it "returns http success" do get 'start' - expect(response).to be_success + response.should be_success end end diff --git a/spec/controllers/trade/exports_controller_spec.rb b/spec/controllers/trade/exports_controller_spec.rb index e902dfda74..3c17a3ea42 100644 --- a/spec/controllers/trade/exports_controller_spec.rb +++ b/spec/controllers/trade/exports_controller_spec.rb @@ -8,7 +8,7 @@ it "returns count of shipments" do create(:shipment) get :download, :filters => { :report_type => 'raw' }, :format => :json - expect(parse_json(response.body)['total']).to eq(1) + parse_json(response.body)['total'].should == 1 end it "does not log download information from the admin interface" do create(:shipment) diff --git a/spec/controllers/trade/sandbox_shipments_controller_spec.rb b/spec/controllers/trade/sandbox_shipments_controller_spec.rb index 50522a9230..69d9b46e46 100644 --- a/spec/controllers/trade/sandbox_shipments_controller_spec.rb +++ b/spec/controllers/trade/sandbox_shipments_controller_spec.rb @@ -37,14 +37,14 @@ :id => @shipment.id, :sandbox_shipment => { :taxon_name => nil, :accepted_taxon_name => nil }, :format => :json - expect(response.body).to be_blank + response.body.should be_blank end it "should return success when taxon_name does not exist" do put :update, :annual_report_upload_id => annual_report_upload.id, :id => @shipment.id, :sandbox_shipment => { :taxon_name => 'Acipenser foobarus' }, :format => :json - expect(response.body).to be_blank + response.body.should be_blank end end @@ -53,7 +53,7 @@ delete :destroy, :annual_report_upload_id => annual_report_upload.id, :id => @shipment.id, :format => :json - expect(response.body).to be_blank + response.body.should be_blank end end @@ -64,9 +64,9 @@ validation_error_id: @validation_error.id, updates: { appendix: 'II' }, format: :json - expect(response.body).to be_blank - expect(sandbox_klass.where(taxon_name: @species.full_name, appendix: 'I').count(true)).to eq(0) - expect(sandbox_klass.where(taxon_name: @species.full_name, appendix: 'II').count(true)).to eq(1) + response.body.should be_blank + sandbox_klass.where(taxon_name: @species.full_name, appendix: 'I').count(true).should == 0 + sandbox_klass.where(taxon_name: @species.full_name, appendix: 'II').count(true).should == 1 end end @@ -76,8 +76,8 @@ annual_report_upload_id: annual_report_upload.id, validation_error_id: @validation_error.id, format: :json - expect(response.body).to be_blank - expect(sandbox_klass.where(taxon_concept_id: @species.id).count(true)).to eq(0) + response.body.should be_blank + sandbox_klass.where(taxon_concept_id: @species.id).count(true).should == 0 end end diff --git a/spec/controllers/trade/shipments_controller_spec.rb b/spec/controllers/trade/shipments_controller_spec.rb index dc4ac30809..507c41a5af 100644 --- a/spec/controllers/trade/shipments_controller_spec.rb +++ b/spec/controllers/trade/shipments_controller_spec.rb @@ -9,17 +9,17 @@ before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } it "should return all shipments" do get :index, format: :json - expect(response.body).to have_json_size(7).at_path('shipments') + response.body.should have_json_size(7).at_path('shipments') end it "should return genus & species shipments when searching by genus" do get :index, taxon_concepts_ids: [@animal_genus.id], format: :json - expect(response.body).to have_json_size(2).at_path('shipments') + response.body.should have_json_size(2).at_path('shipments') end it "should return 1 shipment when searching for reporter_type I" do get :index, time_range_start: @shipment1.year, time_range_end: @shipment2.year, reporter_type: "E", exporters_ids: [@portugal.id.to_s], format: :json - expect(response.body).to have_json_size(1).at_path('shipments') + response.body.should have_json_size(1).at_path('shipments') end end @@ -30,7 +30,7 @@ shipment: { reported_taxon_concept_id: @synonym_subspecies.id } - expect(@shipment1.reload.taxon_concept_id).to eq(@plant_species.id) + @shipment1.reload.taxon_concept_id.should == @plant_species.id end it "should not auto resolve accepted taxon when given" do put :update, id: @shipment1.id, @@ -38,14 +38,14 @@ reported_taxon_concept_id: @synonym_subspecies.id, taxon_concept_id: @animal_species.id } - expect(@shipment1.reload.taxon_concept_id).to eq(@animal_species.id) + @shipment1.reload.taxon_concept_id.should == @animal_species.id end it "should delete orphaned permits" do put :update, id: @shipment1.id, shipment: { import_permit_number: 'YYY' } - expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil + Trade::Permit.find_by_id(@import_permit.id).should be_nil end end @@ -99,8 +99,8 @@ year: 2014 } } - expect(Trade::Shipment.where(year: 2013).count).to eq(0) - expect(Trade::Shipment.where(year: 2014).count).to be > 0 + Trade::Shipment.where(year: 2013).count.should == 0 + Trade::Shipment.where(year: 2014).count.should > 0 end it "should auto resolve accepted taxon when blank" do @@ -116,7 +116,7 @@ reported_taxon_concept_id: @synonym_subspecies.id } } - expect(@shipment1.reload.taxon_concept_id).to eq(@plant_species.id) + @shipment1.reload.taxon_concept_id.should == @plant_species.id end it "should not auto resolve accepted taxon when given" do @@ -133,7 +133,7 @@ taxon_concept_id: @animal_species.id } } - expect(@shipment1.reload.taxon_concept_id).to eq(@animal_species.id) + @shipment1.reload.taxon_concept_id.should == @animal_species.id end it "should set permit number to blank and delete orphaned permits" do @@ -149,9 +149,9 @@ import_permit_number: nil } } - expect(@shipment1.reload.import_permits_ids).to be_blank - expect(@shipment1.import_permit_number).to be_nil - expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil + @shipment1.reload.import_permits_ids.should be_blank + @shipment1.import_permit_number.should be_nil + Trade::Permit.find_by_id(@import_permit.id).should be_nil end end @@ -167,7 +167,7 @@ importers_ids: [@portugal.id.to_s, @argentina.id.to_s], taxon_concepts_ids: [@animal_species.id] } - expect(Trade::Shipment.count).to eq(6) + Trade::Shipment.count.should == 6 end it "should delete 5 shipment" do post :destroy_batch, { @@ -177,49 +177,49 @@ exporters_ids: [@portugal.id.to_s, @argentina.id.to_s], importers_ids: [@portugal.id.to_s, @argentina.id.to_s] } - expect(Trade::Shipment.count).to eq(2) + Trade::Shipment.count.should == 2 end it "should delete 2 shipments" do post :destroy_batch, importers_ids: [@argentina.id.to_s] - expect(Trade::Shipment.count).to eq(5) + Trade::Shipment.count.should == 5 end it "should delete 1 shipments" do post :destroy_batch, exporters_ids: [@portugal.id.to_s] - expect(Trade::Shipment.count).to eq(5) + Trade::Shipment.count.should == 5 end it "should delete all shipments" do post :destroy_batch, purposes_ids: [@purpose.id.to_s] - expect(Trade::Shipment.count).to eq(0) + Trade::Shipment.count.should == 0 end it "shouldn't delete any shipments" do post :destroy_batch, purpose_blank: "true" - expect(Trade::Shipment.count).to eq(7) + Trade::Shipment.count.should == 7 end it "should delete 1 shipment" do post :destroy_batch, sources_ids: [@source.id.to_s] - expect(Trade::Shipment.count).to eq(5) + Trade::Shipment.count.should == 5 end it "should delete 3 shipment" do post :destroy_batch, sources_ids: [@source_wild.id.to_s] - expect(Trade::Shipment.count).to eq(4) + Trade::Shipment.count.should == 4 end it "should delete 0 shipments" do post :destroy_batch, sources_ids: [@source_wild.id.to_s], reporter_type: 'E' - expect(Trade::Shipment.count).to eq(7) + Trade::Shipment.count.should == 7 end it "should delete 4 shipments" do post :destroy_batch, sources_ids: [@source_wild.id.to_s], reporter_type: 'I', source_blank: "true" - expect(Trade::Shipment.count).to eq(3) + Trade::Shipment.count.should == 3 end it "should delete orphaned permits" do @@ -231,8 +231,8 @@ exporters_ids: [@portugal.id.to_s, @argentina.id.to_s], importers_ids: [@portugal.id.to_s, @argentina.id.to_s] } - expect(Trade::Shipment.find_by_id(@shipment1.id)).to be_nil - expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil + Trade::Shipment.find_by_id(@shipment1.id).should be_nil + Trade::Permit.find_by_id(@import_permit.id).should be_nil end end @@ -240,11 +240,11 @@ before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } it "should delete 1 shipment" do delete :destroy, id: @shipment1.id - expect(Trade::Shipment.where(id: @shipment1.id)).to be_empty + Trade::Shipment.where(id: @shipment1.id).should be_empty end it "should delete orphaned permits" do delete :destroy, id: @shipment1.id - expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil + Trade::Permit.find_by_id(@import_permit.id).should be_nil end end end diff --git a/spec/controllers/trade/validation_errors_controller_spec.rb b/spec/controllers/trade/validation_errors_controller_spec.rb index 67446caeb9..c21c92b1c8 100644 --- a/spec/controllers/trade/validation_errors_controller_spec.rb +++ b/spec/controllers/trade/validation_errors_controller_spec.rb @@ -44,7 +44,7 @@ describe "GET show" do it "should return success" do get :show, id: validation_error.id, format: :json - expect(response.body).to have_json_path('validation_error') + response.body.should have_json_path('validation_error') end end diff --git a/spec/controllers/trade/validation_rules_controller_spec.rb b/spec/controllers/trade/validation_rules_controller_spec.rb index 8e3bbb719b..c64b68de97 100644 --- a/spec/controllers/trade/validation_rules_controller_spec.rb +++ b/spec/controllers/trade/validation_rules_controller_spec.rb @@ -6,7 +6,7 @@ describe "GET index" do it "should return success" do get :index, format: :json - expect(response).to be_success + response.should be_success end end end diff --git a/spec/helpers/admin_helper_spec.rb b/spec/helpers/admin_helper_spec.rb index 50df2edcaf..e9fdbd7be1 100644 --- a/spec/helpers/admin_helper_spec.rb +++ b/spec/helpers/admin_helper_spec.rb @@ -13,20 +13,20 @@ describe AdminHelper, type: :helper do describe 'edit_icon' do it "ouputs pencil icon for edit" do - expect(helper.edit_icon).to eq('') + helper.edit_icon.should == '' end end describe 'delete_icon' do it "ouputs bin icon for delete" do - expect(helper.delete_icon).to eq('') + helper.delete_icon.should == '' end end describe 'true_false_icon' do it "outputs tick icon for true" do - expect(helper.true_false_icon(true)).to eq('') + helper.true_false_icon(true).should == '' end it "outputs blank for false" do - expect(helper.true_false_icon(false)).to be_blank + helper.true_false_icon(false).should be_blank end end diff --git a/spec/helpers/listing_changes_helper_spec.rb b/spec/helpers/listing_changes_helper_spec.rb index 81750c65f3..c2a8330a8b 100644 --- a/spec/helpers/listing_changes_helper_spec.rb +++ b/spec/helpers/listing_changes_helper_spec.rb @@ -52,27 +52,25 @@ ) } it "outputs all geo entities comma separated" do - expect(helper.geo_entities_tooltip(listing_change)).to eq('Poland') + helper.geo_entities_tooltip(listing_change).should == 'Poland' end end describe 'annotation_tooltip' do it "outputs the regular annotation in both short and long English form" do - expect(helper.annotation_tooltip(listing_change)).to eq( + helper.annotation_tooltip(listing_change).should == "Only population of PL (Only population of Poland)" - ) end end describe 'hash_annotation_tooltip' do it "outputs the hash annotation in long English form" do - expect(helper.hash_annotation_tooltip(listing_change)).to eq( + helper.hash_annotation_tooltip(listing_change).should == "Only seeds and roots." - ) end end describe 'excluded_geo_entities_tooltip' do context "no exclusions" do it "should output blank exception" do - expect(helper.excluded_geo_entities_tooltip(listing_change)).to be_blank + helper.excluded_geo_entities_tooltip(listing_change).should be_blank end end @@ -92,7 +90,7 @@ ) } it "should list geographic exception" do - expect(helper.excluded_geo_entities_tooltip(listing_change)).to eq('Poland') + helper.excluded_geo_entities_tooltip(listing_change).should == 'Poland' end end end @@ -105,7 +103,7 @@ } context "no exclusions" do it "should output blank exception" do - expect(helper.excluded_taxon_concepts_tooltip(listing_change)).to be_blank + helper.excluded_taxon_concepts_tooltip(listing_change).should be_blank end end @@ -117,7 +115,7 @@ ) } it "should list taxonomic exception" do - expect(helper.excluded_taxon_concepts_tooltip(listing_change)).to eq('Foobarus cracovianus') + helper.excluded_taxon_concepts_tooltip(listing_change).should == 'Foobarus cracovianus' end end diff --git a/spec/models/annotation_spec.rb b/spec/models/annotation_spec.rb index 2c4ec0feae..c2d2ac1e76 100644 --- a/spec/models/annotation_spec.rb +++ b/spec/models/annotation_spec.rb @@ -43,16 +43,16 @@ describe :destroy do let(:annotation) { create(:annotation) } context "when no dependent objects attached" do - specify { expect(annotation.destroy).to be_truthy } + specify { annotation.destroy.should be_truthy } end context "when dependent objects attached" do context "when listing changes" do let!(:listing_change) { create_cites_I_addition(:annotation_id => annotation.id) } - specify { expect(annotation.destroy).to be_falsey } + specify { annotation.destroy.should be_falsey } end context "when hashed listing changes" do let!(:listing_change) { create_cites_I_addition(:hash_annotation_id => annotation.id) } - specify { expect(annotation.destroy).to be_falsey } + specify { annotation.destroy.should be_falsey } end end end diff --git a/spec/models/change_type_spec.rb b/spec/models/change_type_spec.rb index 6a26bd0725..49ff5097ad 100644 --- a/spec/models/change_type_spec.rb +++ b/spec/models/change_type_spec.rb @@ -18,12 +18,12 @@ describe :abbreviation do context 'change type with single word name' do let(:change_type) { create(:change_type, :name => "Word") } - specify { expect(change_type.abbreviation).to eq('Wor') } + specify { change_type.abbreviation.should == 'Wor' } end context 'change type with two words name' do let(:change_type) { create(:change_type, :name => "Word_Word") } - specify { expect(change_type.abbreviation).to eq('Wor-Wor') } + specify { change_type.abbreviation.should == 'Wor-Wor' } end end end diff --git a/spec/models/checklist/annotations_spec.rb b/spec/models/checklist/annotations_spec.rb index 3cf373f4b5..30150de68d 100644 --- a/spec/models/checklist/annotations_spec.rb +++ b/spec/models/checklist/annotations_spec.rb @@ -13,11 +13,11 @@ end context 'for species Caiman latirostris' do subject { @taxon_concepts.select { |e| e.full_name == 'Caiman latirostris' }.first } - specify { expect(subject.ann_symbol).to eq('1') } + specify { subject.ann_symbol.should == '1' } end context 'for species Panax ginseng' do subject { @taxon_concepts.select { |e| e.full_name == 'Panax ginseng' }.first } - specify { expect(subject.ann_symbol).to eq('2') } + specify { subject.ann_symbol.should == '2' } end end end diff --git a/spec/models/checklist/appendix_population_and_region_spec.rb b/spec/models/checklist/appendix_population_and_region_spec.rb index 480bfe10ef..13346aca3d 100644 --- a/spec/models/checklist/appendix_population_and_region_spec.rb +++ b/spec/models/checklist/appendix_population_and_region_spec.rb @@ -12,7 +12,7 @@ checklist.results } specify do - expect(subject).not_to include(@species) + subject.should_not include(@species) end end context "when Mexico" do @@ -23,7 +23,7 @@ checklist.results } specify do - expect(subject).not_to include(@species) + subject.should_not include(@species) end end context "when Canada" do @@ -34,7 +34,7 @@ checklist.results } specify do - expect(subject).not_to include(@species) + subject.should_not include(@species) end end context "when Argentina" do @@ -45,7 +45,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end context "when South America" do @@ -56,7 +56,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end context "when North America" do @@ -67,7 +67,7 @@ checklist.results } specify do - expect(subject).not_to include(@species) + subject.should_not include(@species) end end context "when North America and Argentina" do @@ -79,7 +79,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end end diff --git a/spec/models/checklist/appendix_population_spec.rb b/spec/models/checklist/appendix_population_spec.rb index 26297fbf60..d33e062f06 100644 --- a/spec/models/checklist/appendix_population_spec.rb +++ b/spec/models/checklist/appendix_population_spec.rb @@ -13,7 +13,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end context "when Poland" do @@ -24,7 +24,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end end @@ -38,7 +38,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end context "when App II" do @@ -49,7 +49,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end context "when App III" do @@ -60,7 +60,7 @@ checklist.results } specify do - expect(subject).not_to include(@species) + subject.should_not include(@species) end end end @@ -76,7 +76,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end context "when App II" do @@ -88,7 +88,7 @@ checklist.results } specify do - expect(subject).not_to include(@species) + subject.should_not include(@species) end end end @@ -102,7 +102,7 @@ checklist.results } specify do - expect(subject).not_to include(@species) + subject.should_not include(@species) end end context "when App II" do @@ -114,7 +114,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end end @@ -128,7 +128,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end context "when App II" do @@ -140,7 +140,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end end @@ -154,7 +154,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end context "when Nepal" do @@ -166,7 +166,7 @@ checklist.results } specify do - expect(subject).to include(@species) + subject.should include(@species) end end end diff --git a/spec/models/checklist/appendix_spec.rb b/spec/models/checklist/appendix_spec.rb index 2e8321fba0..2a7329bec2 100644 --- a/spec/models/checklist/appendix_spec.rb +++ b/spec/models/checklist/appendix_spec.rb @@ -12,11 +12,11 @@ @taxon_concepts = @checklist.results end it "should return Cacatua goffiniana" do - expect(@taxon_concepts.select { |e| e.full_name == @species1_2_1.full_name }.first).not_to be_nil + @taxon_concepts.select { |e| e.full_name == @species1_2_1.full_name }.first.should_not be_nil end it "should not return Agapornis roseicollis" do - expect(@taxon_concepts.select { |e| e.full_name == @species2_1.full_name }.first).to be_nil + @taxon_concepts.select { |e| e.full_name == @species2_1.full_name }.first.should be_nil end end diff --git a/spec/models/checklist/checklist_spec.rb b/spec/models/checklist/checklist_spec.rb index b3b9ff362e..0600d26a88 100644 --- a/spec/models/checklist/checklist_spec.rb +++ b/spec/models/checklist/checklist_spec.rb @@ -8,7 +8,7 @@ Checklist::Checklist.summarise_filters({}) } specify { - expect(summary).to eq("All results") + summary.should == "All results" } end end @@ -23,7 +23,7 @@ Checklist::Checklist.summarise_filters({ :cites_region_ids => [region.id] }) } specify { - expect(summary).to eq("Results from 1 region") + summary.should == "Results from 1 region" } end context "when > 1 region" do @@ -40,7 +40,7 @@ Checklist::Checklist.summarise_filters({ :cites_region_ids => regions }) } specify { - expect(summary).to eq("Results from 2 regions") + summary.should == "Results from 2 regions" } end end diff --git a/spec/models/checklist/common_names_spec.rb b/spec/models/checklist/common_names_spec.rb index 1755f70944..a5f7709b07 100644 --- a/spec/models/checklist/common_names_spec.rb +++ b/spec/models/checklist/common_names_spec.rb @@ -17,32 +17,32 @@ end it "should return all English names for Arctocephalus australis: 'South American Fur Seal, Southern Fur Seal'" do - expect(@australis.english_names).to eq(['South American Fur Seal', 'Southern Fur Seal']) + @australis.english_names.should == ['South American Fur Seal', 'Southern Fur Seal'] end it "should return all Spanish names for Arctocephalus australis: 'Lobo fino sudamericano, Oso marino austral'" do - expect(@australis.spanish_names).to eq(['Lobo fino sudamericano', 'Oso marino austral']) + @australis.spanish_names.should == ['Lobo fino sudamericano', 'Oso marino austral'] end it "should return all French names for Arctocephalus australis: 'Otarie à fourrure australe'" do - expect(@australis.french_names).to eq(['Otarie à fourrure australe']) + @australis.french_names.should == ['Otarie à fourrure australe'] end it "should return all English names for Arctocephalus spp.: 'Fur seals, Southern fur seals'" do - expect(@arctocephalus.english_names).to eq(['Fur seals 1', 'Southern fur seals']) + @arctocephalus.english_names.should == ['Fur seals 1', 'Southern fur seals'] end it "should return all Spanish names for Arctocephalus spp.: 'Osos marinos'" do - expect(@arctocephalus.spanish_names).to eq(['Osos marinos']) + @arctocephalus.spanish_names.should == ['Osos marinos'] end it "should return all French names for Arctocephalus spp.: 'Arctocéphales du sud, Otaries à fourrure, Otaries à fourrure du sud'" do - expect(@arctocephalus.french_names).to eq(['Arctocéphales du sud', 'Otaries à fourrure', 'Otaries à fourrure du sud']) + @arctocephalus.french_names.should == ['Arctocéphales du sud', 'Otaries à fourrure', 'Otaries à fourrure du sud'] end it "should include a species without any common names defined" do @pusillus = @taxon_concepts.select { |e| e.full_name == @species3.full_name }.first - expect(@pusillus).not_to be_nil + @pusillus.should_not be_nil end end diff --git a/spec/models/checklist/higher_taxa_injector_spec.rb b/spec/models/checklist/higher_taxa_injector_spec.rb index 22c277a4ee..7de45271f7 100644 --- a/spec/models/checklist/higher_taxa_injector_spec.rb +++ b/spec/models/checklist/higher_taxa_injector_spec.rb @@ -124,7 +124,7 @@ @species1_1_1, @species2_1_1_1_1 ) - expect(headers.map(&:full_name)).to eq(['Memaridae']) + headers.map(&:full_name).should == ['Memaridae'] } end context "when two species from different classes and expand_headers set" do @@ -141,7 +141,7 @@ @species1_1_1, @species2_1_1_1_1 ) - expect(headers.map(&:full_name)).to eq(['Memaria', 'Memariformes', 'Memaridae']) + headers.map(&:full_name).should == ['Memaria', 'Memariformes', 'Memaridae'] } end end @@ -156,7 +156,7 @@ ) } specify { - expect(hti_different_family.run.size).to eq(4) + hti_different_family.run.size.should == 4 } end context "when two species from different families and skip family set" do @@ -169,7 +169,7 @@ ) } specify { - expect(hti_different_family.run.size).to eq(3) + hti_different_family.run.size.should == 3 } end end @@ -187,7 +187,7 @@ } specify { headers = hti_one_species.higher_taxa_headers(nil, @species1_1_1) - expect(headers.map(&:full_name)).to eq(['Lolcatidae']) + headers.map(&:full_name).should == ['Lolcatidae'] } end context "when one species and skip family set" do @@ -199,7 +199,7 @@ ) } specify { - expect(hti_one_species_skip_family.higher_taxa_headers(nil, @species1_1_1)).to be_empty + hti_one_species_skip_family.higher_taxa_headers(nil, @species1_1_1).should be_empty } end context "when one species and expand headers set" do @@ -212,9 +212,8 @@ } specify { headers = hti_one_species_expand_headers.higher_taxa_headers(nil, @species1_1_1) - expect(headers.map(&:full_name)).to eq( + headers.map(&:full_name).should == ["Rotflata", "Forfiteria", "Lolcatiformes", "Lolcatidae"] - ) } end context "when two species" do @@ -227,7 +226,7 @@ ) } specify { - expect(hti_same_genus.higher_taxa_headers(@species1_1_1, @species1_1_2)).to be_empty + hti_same_genus.higher_taxa_headers(@species1_1_1, @species1_1_2).should be_empty } end context "when species and subspecies" do @@ -240,7 +239,7 @@ ) } specify { - expect(hti_species_subspecies.higher_taxa_headers(@species1_1_2, @subspecies1_1_1_1)).to be_empty + hti_species_subspecies.higher_taxa_headers(@species1_1_2, @subspecies1_1_1_1).should be_empty } end end @@ -255,7 +254,7 @@ ) } specify { - expect(hti_same_family.higher_taxa_headers(@species1_1_1, @species1_2_1)).to be_empty + hti_same_family.higher_taxa_headers(@species1_1_1, @species1_2_1).should be_empty } end end @@ -271,9 +270,8 @@ } specify { headers = hti_different_family.higher_taxa_headers(@species1_1_1, @species2_1_1) - expect(headers.map(&:full_name)).to eq( + headers.map(&:full_name).should == ['Foobaridae'] - ) } end context "when two species from different families and expand headers set" do @@ -287,9 +285,8 @@ } specify { headers = hti_different_family.higher_taxa_headers(@species1_1_1, @species2_1_1) - expect(headers.map(&:full_name)).to eq( + headers.map(&:full_name).should == ['Foobaridae'] - ) } end context "when genus and different family" do @@ -303,9 +300,8 @@ } specify { headers = hti_genus_family.higher_taxa_headers(@genus1_1, @family2) - expect(headers.map(&:full_name)).to eq( + headers.map(&:full_name).should == ['Foobaridae'] - ) } end context "when family and genus in different family" do @@ -319,9 +315,8 @@ } specify { headers = hti_family_genus.higher_taxa_headers(@family1, @genus2_1) - expect(headers.map(&:full_name)).to eq( + headers.map(&:full_name).should == ['Foobaridae'] - ) } end end @@ -337,9 +332,8 @@ } specify { headers = hti_different_orders.higher_taxa_headers(@order2, @genus2_1) - expect(headers.map(&:full_name)).to eq( + headers.map(&:full_name).should == ['Foobaridae'] - ) } end context "when order and genus from different order and expand headers set" do @@ -353,9 +347,8 @@ } specify { headers = hti_different_orders_expand.higher_taxa_headers(@order2, @genus2_1) - expect(headers.map(&:full_name)).to eq( + headers.map(&:full_name).should == ['Lolcatiformes', 'Foobaridae'] - ) } end end diff --git a/spec/models/checklist/higher_taxa_item_spec.rb b/spec/models/checklist/higher_taxa_item_spec.rb index e7abf7cab0..e9a434f426 100644 --- a/spec/models/checklist/higher_taxa_item_spec.rb +++ b/spec/models/checklist/higher_taxa_item_spec.rb @@ -15,7 +15,7 @@ ) } subject { Checklist::HigherTaxaItem.new(taxon_concept) } - specify { expect(subject.ancestors_path).to eq('Chordata,Reptilia,Crocodylia,Alligatoridae') } + specify { subject.ancestors_path.should == 'Chordata,Reptilia,Crocodylia,Alligatoridae' } end context "when plant" do let(:taxon_concept) { @@ -29,7 +29,7 @@ ) } subject { Checklist::HigherTaxaItem.new(taxon_concept) } - specify { expect(subject.ancestors_path).to eq('Agavaceae') } + specify { subject.ancestors_path.should == 'Agavaceae' } end end diff --git a/spec/models/checklist/order_spec.rb b/spec/models/checklist/order_spec.rb index 1603962b78..7af3af8b27 100644 --- a/spec/models/checklist/order_spec.rb +++ b/spec/models/checklist/order_spec.rb @@ -15,7 +15,7 @@ @taxon_concepts = @checklist.plantae end it "should include Agave (Agavaceae) before Panax (Araliaceae)" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Agave parviflora' }).to be < + @taxon_concepts.index { |tc| tc.full_name == 'Agave parviflora' }.should < @taxon_concepts.index { |tc| tc.full_name == 'Panax ginseng' } end end @@ -26,31 +26,30 @@ @taxon_concepts = @checklist.animalia end it "should include birds after last mammal" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Tapirus terrestris' }).to be < + @taxon_concepts.index { |tc| tc.full_name == 'Tapirus terrestris' }.should < @taxon_concepts.index { |tc| tc.full_name == 'Gymnogyps californianus' } end it "should include Falconiformes (Aves) before Psittaciformes (Aves)" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }).to be < + @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }.should < @taxon_concepts.index { |tc| tc.full_name == 'Psittaciformes' } end it "should include Cathartidae within Falconiformes" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be > + @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should > @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' } - expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < + @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < @taxon_concepts.index { |tc| tc.full_name == 'Psittaciformes' } end it "should include Cathartidae (Falconiformes) before Falconidae (Falconiformes)" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < + @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < @taxon_concepts.index { |tc| tc.full_name == 'Falconidae' } end it "should include Cathartidae (Falconiformes) before Cacatuidae (Psittaciformes)" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < + @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < @taxon_concepts.index { |tc| tc.full_name == 'Cacatuidae' } end it "should include Hirudo medicinalis at the very end (after all Chordata)" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Hirudo medicinalis' }).to eq( + @taxon_concepts.index { |tc| tc.full_name == 'Hirudo medicinalis' }.should == @taxon_concepts.length - 1 - ) end end end @@ -60,19 +59,19 @@ @taxon_concepts = @checklist.results end it "should include Falconiformes (Aves) before Psittaciformes (Aves)" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }).to be < + @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }.should < @taxon_concepts.index { |tc| tc.full_name == 'Psittaciformes' } end it "should include Cathartidae before Falconiformes" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < + @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' } end it "should include Cathartidae (Falconiformes) before Falconidae (Falconiformes)" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < + @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < @taxon_concepts.index { |tc| tc.full_name == 'Falconidae' } end it "should include Cathartidae (Falconiformes) after Cacatuidae (Psittaciformes)" do - expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be > + @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should > @taxon_concepts.index { |tc| tc.full_name == 'Cacatuidae' } end end diff --git a/spec/models/checklist/pdf/history_annotations_key_spec.rb b/spec/models/checklist/pdf/history_annotations_key_spec.rb index 31d4cd23be..695760bc3a 100644 --- a/spec/models/checklist/pdf/history_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/history_annotations_key_spec.rb @@ -6,8 +6,8 @@ describe :annotations_key do subject { Checklist::Pdf::HistoryAnnotationsKey.new } specify { - subject.stub(:non_hash_annotations_key).and_return('x') - subject.stub(:hash_annotations_key).and_return('x') + allow(subject).to receive(:non_hash_annotations_key).and_return('x') + allow(subject).to receive(:hash_annotations_key).and_return('x') subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in" } end @@ -57,7 +57,7 @@ end subject { Checklist::Pdf::HistoryAnnotationsKey.new } specify { - expect(subject.hash_annotations_key).to eq("\\hashAnnotationsHistoryInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP1 & \\validFrom \\hspace{2 pt} 01/07/2012\\\\\n\\#1 & Only trunks \\\\\n\n}\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n") + subject.hash_annotations_key.should == "\\hashAnnotationsHistoryInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP1 & \\validFrom \\hspace{2 pt} 01/07/2012\\\\\n\\#1 & Only trunks \\\\\n\n}\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n" } end diff --git a/spec/models/checklist/pdf/history_spec.rb b/spec/models/checklist/pdf/history_spec.rb index f01709fc80..722dbc4f56 100644 --- a/spec/models/checklist/pdf/history_spec.rb +++ b/spec/models/checklist/pdf/history_spec.rb @@ -36,7 +36,7 @@ } subject { Checklist::Pdf::History.new(:scientific_name => tc.full_name, :show_english => true) } specify { - expect(subject.higher_taxon_name(tc.reload)).to eq("\\subsection*{FOOBARIDAE (E) Foobars }\n") + subject.higher_taxon_name(tc.reload).should == "\\subsection*{FOOBARIDAE (E) Foobars }\n" } end end @@ -54,7 +54,7 @@ } subject { Checklist::Pdf::History.new(:scientific_name => tc.full_name) } specify { - expect(subject.listed_taxon_name(tc)).to eq('FOOBARIDAE spp.') + subject.listed_taxon_name(tc).should == 'FOOBARIDAE spp.' } end context "when genus" do @@ -69,7 +69,7 @@ } subject { Checklist::Pdf::History.new(:scientific_name => tc.full_name) } specify { - expect(subject.listed_taxon_name(tc)).to eq('\emph{Foobarus} spp.') + subject.listed_taxon_name(tc).should == '\emph{Foobarus} spp.' } end end @@ -97,7 +97,7 @@ } subject { Checklist::Pdf::History.new({}) } specify { - expect(subject.annotation_for_language(lc, 'en')).to eq("Except \\textit{Foobarus cracoviensis}\n\nPreviously listed as \\textit{Foobarus polonicus}.\\footnote{...}") + subject.annotation_for_language(lc, 'en').should == "Except \\textit{Foobarus cracoviensis}\n\nPreviously listed as \\textit{Foobarus polonicus}.\\footnote{...}" } end end diff --git a/spec/models/checklist/pdf/index_annotations_key_spec.rb b/spec/models/checklist/pdf/index_annotations_key_spec.rb index 108230cb77..d1cbe83d79 100644 --- a/spec/models/checklist/pdf/index_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/index_annotations_key_spec.rb @@ -6,8 +6,8 @@ describe :annotations_key do subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - subject.stub(:non_hash_annotations_key).and_return('x') - subject.stub(:hash_annotations_key).and_return('x') + allow(subject).to receive(:non_hash_annotations_key).and_return('x') + allow(subject).to receive(:hash_annotations_key).and_return('x') subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in" } end @@ -44,7 +44,7 @@ end subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - expect(subject.hash_annotations_key).to eq("\\newpage\n\\section*{\\hashAnnotations}\n\\hashAnnotationsIndexInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n") + subject.hash_annotations_key.should == "\\newpage\n\\section*{\\hashAnnotations}\n\\hashAnnotationsIndexInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n" } end @@ -100,7 +100,7 @@ end subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - LatexToPdf.stub(:html2latex).and_return('x') + allow(LatexToPdf).to receive(:html2latex).and_return('x') subject.non_hash_annotations_key.should == "\\section*{\\nonHashAnnotations}\n\\cfbox{orange}{\\superscript{1} \\textbf{\\textit{Foobarus bizarrus}}}\n\nx\n\n\\cfbox{green}{\\superscript{2} \\textbf{\\textit{Foobaria curiosa}}}\n\nx\n\n" } end diff --git a/spec/models/checklist/pdf/index_fetcher_spec.rb b/spec/models/checklist/pdf/index_fetcher_spec.rb index d6258bf718..df4833250c 100644 --- a/spec/models/checklist/pdf/index_fetcher_spec.rb +++ b/spec/models/checklist/pdf/index_fetcher_spec.rb @@ -46,7 +46,7 @@ ) } subject { Checklist::Pdf::IndexFetcher.new(query) } - specify { expect(subject.next.first.sort_name).to eq('lolcat, Domestic') } + specify { subject.next.first.sort_name.should == 'lolcat, Domestic' } end context "with synonyms and authors" do let!(:synonym) { @@ -74,6 +74,6 @@ ) } subject { Checklist::Pdf::IndexFetcher.new(query) } - specify { expect(subject.next.first.sort_name).to eq('Catus fluffianus') } + specify { subject.next.first.sort_name.should == 'Catus fluffianus' } end end diff --git a/spec/models/checklist/scientific_name_spec.rb b/spec/models/checklist/scientific_name_spec.rb index bfa453bbe9..74f9fdb851 100644 --- a/spec/models/checklist/scientific_name_spec.rb +++ b/spec/models/checklist/scientific_name_spec.rb @@ -13,8 +13,8 @@ checklist.results } specify { - expect(subject.first.full_name).to eq(@species2.full_name) - expect(subject.size).to eq(1) + subject.first.full_name.should == @species2.full_name + subject.size.should == 1 } end context "by common name" do @@ -26,8 +26,8 @@ checklist.results } specify { - expect(subject.first.full_name).to eq(@species2.full_name) - expect(subject.size).to eq(1) + subject.first.full_name.should == @species2.full_name + subject.size.should == 1 } end end diff --git a/spec/models/checklist/synonyms_spec.rb b/spec/models/checklist/synonyms_spec.rb index efb2eb3642..ab166566db 100644 --- a/spec/models/checklist/synonyms_spec.rb +++ b/spec/models/checklist/synonyms_spec.rb @@ -14,7 +14,7 @@ it "should return Alligator cynocephalus as synonym for Caiman latirostris" do @caiman_latirostris = @taxon_concepts.select { |e| e.full_name == @species.full_name }.first - expect(@caiman_latirostris.synonyms).to eq(['Alligator cynocephalus']) + @caiman_latirostris.synonyms.should == ['Alligator cynocephalus'] end end diff --git a/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb b/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb index 21bb9ee482..5c0a26aa08 100644 --- a/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb +++ b/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb @@ -10,7 +10,7 @@ :ranks => [] }) } - specify { expect(subject.results.size).to eq(3) } + specify { subject.results.size.should == 3 } end context "when match on accepted name" do subject { @@ -19,7 +19,7 @@ :ranks => [] }) } - specify { expect(subject.results.size).to eq(3) } + specify { subject.results.size.should == 3 } end context "when match on synonym" do subject { @@ -28,7 +28,7 @@ :ranks => [] }) } - specify { expect(subject.results.size).to eq(2) } + specify { subject.results.size.should == 2 } end context "when match on common name" do subject { @@ -37,7 +37,7 @@ :ranks => [] }) } - specify { expect(subject.results.size).to eq(1) } + specify { subject.results.size.should == 1 } end end end diff --git a/spec/models/checklist/timeline_spec.rb b/spec/models/checklist/timeline_spec.rb index 29fce8fd95..8e2d1e1af0 100644 --- a/spec/models/checklist/timeline_spec.rb +++ b/spec/models/checklist/timeline_spec.rb @@ -20,9 +20,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.first } - specify { expect(subject.timeline_intervals.count).to eq(1) } - specify { expect(subject.timeline_intervals.last.end_pos).to be < 1 } - specify { expect(subject.timeline_events.count).to eq(2) } + specify { subject.timeline_intervals.count.should == 1 } + specify { subject.timeline_intervals.last.end_pos.should < 1 } + specify { subject.timeline_events.count.should == 2 } end context "when deleted from III multiple times" do @@ -80,9 +80,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.last } - specify { expect(subject.timeline_intervals.count).to eq(3) } - specify { expect(subject.timeline_intervals.last.end_pos).to be < 1 } - specify { expect(subject.timeline_events.count).to eq(4) } + specify { subject.timeline_intervals.count.should == 3 } + specify { subject.timeline_intervals.last.end_pos.should < 1 } + specify { subject.timeline_events.count.should == 4 } end context "when deleted and then readded" do @@ -109,9 +109,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.first } - specify { expect(subject.timeline_intervals.count).to eq(2) } - specify { expect(subject.timeline_events.count).to eq(3) } - specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_intervals[1].start_pos) } + specify { subject.timeline_intervals.count.should == 2 } + specify { subject.timeline_events.count.should == 3 } + specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_intervals[1].start_pos } end context "when reservation withdrawn" do @@ -151,9 +151,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.first.timelines.first } - specify { expect(subject.timeline_intervals.count).to eq(1) } - specify { expect(subject.timeline_events.count).to eq(2) } - specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_events[1].pos) } + specify { subject.timeline_intervals.count.should == 1 } + specify { subject.timeline_events.count.should == 2 } + specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_events[1].pos } end context "when reservation withdrawn and then readded" do @@ -199,10 +199,10 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.last.timelines.first } - specify { expect(subject.timeline_intervals.count).to eq(2) } - specify { expect(subject.timeline_events.count).to eq(3) } - specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_events[1].pos) } - specify { expect(subject.timeline_intervals[1].end_pos).to eq(1) } + specify { subject.timeline_intervals.count.should == 2 } + specify { subject.timeline_events.count.should == 3 } + specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_events[1].pos } + specify { subject.timeline_intervals[1].end_pos.should == 1 } end context "when added multiple times" do @@ -225,12 +225,11 @@ let(:subject) { ttc.timelines.first } specify { - expect(subject.timeline_events.map(&:change_type_name)).to eq( + subject.timeline_events.map(&:change_type_name).should == ['ADDITION', 'AMENDMENT'] - ) } - specify { expect(subject.timeline_intervals.count).to eq(2) } - specify { expect(subject.timeline_intervals[1].end_pos).to eq(1) } + specify { subject.timeline_intervals.count.should == 2 } + specify { subject.timeline_intervals[1].end_pos.should == 1 } end context "when automatic deletion from ancestor listing" do @@ -255,12 +254,11 @@ let(:subject) { ttc.timelines.first } specify { - expect(subject.timeline_events.map(&:change_type_name)).to eq( + subject.timeline_events.map(&:change_type_name).should == ['ADDITION', 'DELETION'] - ) } - specify { expect(subject.timeline_intervals.count).to eq(1) } - specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_events[1].pos) } + specify { subject.timeline_intervals.count.should == 1 } + specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_events[1].pos } end end diff --git a/spec/models/checklist/timelines_for_taxon_concept_spec.rb b/spec/models/checklist/timelines_for_taxon_concept_spec.rb index 1234af3c6e..dee5ddb570 100644 --- a/spec/models/checklist/timelines_for_taxon_concept_spec.rb +++ b/spec/models/checklist/timelines_for_taxon_concept_spec.rb @@ -22,8 +22,8 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc) } - specify { expect(subject.raw_timelines['I'].timeline_events).not_to be_empty } - specify { expect(subject.raw_timelines['II'].timeline_events).to be_empty } + specify { subject.raw_timelines['I'].timeline_events.should_not be_empty } + specify { subject.raw_timelines['II'].timeline_events.should be_empty } end context "when Appendix III" do let(:tc) { @@ -43,8 +43,8 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc) } - specify { expect(subject.raw_timelines['III'].timeline_events).not_to be_empty } - specify { expect(subject.raw_timelines['I'].timeline_events).to be_empty } + specify { subject.raw_timelines['III'].timeline_events.should_not be_empty } + specify { subject.raw_timelines['I'].timeline_events.should be_empty } end context "when Appendix III reservation" do let(:tc) { @@ -64,9 +64,9 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc) } - specify { expect(subject.raw_timelines['III'].timeline_events).to be_empty } - specify { expect(subject.raw_timelines['III'].timelines.first.timeline_events).not_to be_empty } - specify { expect(subject.raw_timelines['I'].timeline_events).to be_empty } + specify { subject.raw_timelines['III'].timeline_events.should be_empty } + specify { subject.raw_timelines['III'].timelines.first.timeline_events.should_not be_empty } + specify { subject.raw_timelines['I'].timeline_events.should be_empty } end end @@ -78,9 +78,9 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc).timeline_years } - specify { expect(subject.size).to eq(5) } - specify { expect(subject.first.year).to eq(1975) } - specify { expect(subject.last.year).to eq(1995) } + specify { subject.size.should == 5 } + specify { subject.first.year.should == 1975 } + specify { subject.last.year.should == 1995 } end end diff --git a/spec/models/cites_cop_spec.rb b/spec/models/cites_cop_spec.rb index 268330a4ec..f0c10f5a36 100644 --- a/spec/models/cites_cop_spec.rb +++ b/spec/models/cites_cop_spec.rb @@ -34,8 +34,8 @@ :designation => eu ) } - specify { expect(cites_cop).to be_invalid } - specify { expect(cites_cop).to have(1).error_on(:designation_id) } + specify { cites_cop.should be_invalid } + specify { cites_cop.should have(1).error_on(:designation_id) } end context "when effective_at is blank" do let(:cites_cop) { @@ -44,20 +44,20 @@ :effective_at => nil ) } - specify { expect(cites_cop).to be_invalid } - specify { expect(cites_cop).to have(1).error_on(:effective_at) } + specify { cites_cop.should be_invalid } + specify { cites_cop.should have(1).error_on(:effective_at) } end end describe :destroy do let(:cites_cop) { create_cites_cop } context "when no dependent objects attached" do - specify { expect(cites_cop.destroy).to be_truthy } + specify { cites_cop.destroy.should be_truthy } end context "when dependent objects attached" do context "when listing changes" do let!(:listing_change) { create_cites_I_addition(:event => cites_cop) } - specify { expect(cites_cop.destroy).to be_falsey } + specify { cites_cop.destroy.should be_falsey } end end end diff --git a/spec/models/cites_suspension_notification_spec.rb b/spec/models/cites_suspension_notification_spec.rb index ad0720ead7..6b39650c88 100644 --- a/spec/models/cites_suspension_notification_spec.rb +++ b/spec/models/cites_suspension_notification_spec.rb @@ -34,8 +34,8 @@ :designation => eu ) } - specify { expect(cites_suspension_notification).to be_invalid } - specify { expect(cites_suspension_notification).to have(1).error_on(:designation_id) } + specify { cites_suspension_notification.should be_invalid } + specify { cites_suspension_notification.should have(1).error_on(:designation_id) } end context "when effective_at is blank" do let(:cites_suspension_notification) { @@ -44,15 +44,15 @@ :effective_at => nil ) } - specify { expect(cites_suspension_notification).to be_invalid } - specify { expect(cites_suspension_notification).to have(1).error_on(:effective_at) } + specify { cites_suspension_notification.should be_invalid } + specify { cites_suspension_notification.should have(1).error_on(:effective_at) } end end describe :destroy do let(:cites_suspension_notification) { create_cites_suspension_notification } context "when no dependent objects attached" do - specify { expect(cites_suspension_notification.destroy).to be_truthy } + specify { cites_suspension_notification.destroy.should be_truthy } end context "when dependent objects attached" do context "when start notification" do @@ -61,7 +61,7 @@ :cites_suspension, :start_notification => cites_suspension_notification ) } - specify { expect(cites_suspension_notification.destroy).to be_falsey } + specify { cites_suspension_notification.destroy.should be_falsey } end context "when end notification" do let!(:cites_suspension) { @@ -71,7 +71,7 @@ :end_notification => cites_suspension_notification ) } - specify { expect(cites_suspension_notification.destroy).to be_falsey } + specify { cites_suspension_notification.destroy.should be_falsey } end context "when confirmation notification, make sure it gets destroyed" do let!(:cites_suspension) { @@ -95,7 +95,7 @@ subject { cites_suspension_notification.cites_suspension_confirmations } specify { cites_suspension_notification.destroy - expect(subject.reload).to be_empty + subject.reload.should be_empty } end end @@ -103,7 +103,7 @@ describe :end_date_formatted do let(:cites_suspension_notification) { create_cites_suspension_notification(:end_date => '2012-05-10') } - specify { expect(cites_suspension_notification.end_date_formatted).to eq('10/05/2012') } + specify { cites_suspension_notification.end_date_formatted.should == '10/05/2012' } end describe :bases_for_suspension do diff --git a/spec/models/cites_suspension_spec.rb b/spec/models/cites_suspension_spec.rb index 15c877da2c..1708bef946 100644 --- a/spec/models/cites_suspension_spec.rb +++ b/spec/models/cites_suspension_spec.rb @@ -207,8 +207,8 @@ ) } - specify { expect(cites_suspension).to be_invalid } - specify { expect(cites_suspension.error_on(:start_notification_id).size).to eq(1) } + specify { cites_suspension.should be_invalid } + specify { cites_suspension.should have(1).error_on(:start_notification_id) } end context "when start date greater than end date" do @@ -221,8 +221,8 @@ ) } - specify { expect(cites_suspension).to be_invalid } - specify { expect(cites_suspension.error_on(:start_date).size).to eq(1) } + specify { cites_suspension.should be_invalid } + specify { cites_suspension.should have(1).error_on(:start_date) } end context "when valid" do @@ -234,7 +234,7 @@ ) } - specify { expect(cites_suspension).to be_valid } + specify { cites_suspension.should be_valid } end end end @@ -252,7 +252,7 @@ CitesSuspension.export('set' => 'current') end subject { Dir["#{DownloadsCache.cites_suspensions_path}/*"] } - specify { expect(subject).not_to be_empty } + specify { subject.should_not be_empty } end end @@ -271,7 +271,7 @@ CitesSuspension.export('set' => 'current') end subject { Dir["#{DownloadsCache.cites_suspensions_path}/*"] } - specify { expect(subject).to be_empty } + specify { subject.should be_empty } end end diff --git a/spec/models/common_name_spec.rb b/spec/models/common_name_spec.rb index ad5e3d6835..90d06c118d 100644 --- a/spec/models/common_name_spec.rb +++ b/spec/models/common_name_spec.rb @@ -17,13 +17,13 @@ context "Generating PDF" do describe :english_to_pdf do it "should print last word before the first word, separated by comma" do - expect(CommonName.english_to_pdf("Grey Wolf")).to eq("Wolf, Grey") + CommonName.english_to_pdf("Grey Wolf").should == "Wolf, Grey" end it "should print the last word before the other words, separated by comma" do - expect(CommonName.english_to_pdf("Northern Rock Mountain Wolf")).to eq("Wolf, Northern Rock Mountain") + CommonName.english_to_pdf("Northern Rock Mountain Wolf").should == "Wolf, Northern Rock Mountain" end it "should print the single word, if the common name is composed of only one word" do - expect(CommonName.english_to_pdf("Wolf")).to eq("Wolf") + CommonName.english_to_pdf("Wolf").should == "Wolf" end end end diff --git a/spec/models/dashboard_stats_species_spec.rb b/spec/models/dashboard_stats_species_spec.rb index d6f3efea87..a9f839d3dd 100644 --- a/spec/models/dashboard_stats_species_spec.rb +++ b/spec/models/dashboard_stats_species_spec.rb @@ -26,17 +26,17 @@ describe "#new" do it "takes three parameters and returns a DashboardStats object" do - expect(ds_ar).to be_an_instance_of DashboardStats + ds_ar.should be_an_instance_of DashboardStats end end describe "#species" do include_context "Caiman latirostris" it "has one results for argentina" do - expect(ds_ar.species[:cites_eu][0][:count]).to eq 1 + ds_ar.species[:cites_eu][0][:count].should eq 1 end it "has no results for ghana" do - expect(ds_gh.species[:cites_eu][0][:count]).to eq 0 + ds_gh.species[:cites_eu][0][:count].should eq 0 end end diff --git a/spec/models/dashboard_stats_trade_spec.rb b/spec/models/dashboard_stats_trade_spec.rb index 71e25e1eff..7deec6b0a4 100644 --- a/spec/models/dashboard_stats_trade_spec.rb +++ b/spec/models/dashboard_stats_trade_spec.rb @@ -44,9 +44,9 @@ }).trade } it "argentina should have 40 exported animals and no imports" do - expect(subject[:exports][:top_traded].length).to eq(1) - expect(subject[:exports][:top_traded][0][:count]).to eq 40 - expect(subject[:imports][:top_traded].length).to eq 0 + subject[:exports][:top_traded].length.should == 1 + subject[:exports][:top_traded][0][:count].should eq 40 + subject[:imports][:top_traded].length.should eq 0 end end context "when time range specified" do @@ -58,7 +58,7 @@ }).trade } it "argentina should have no exports in 2012-2012" do - expect(subject[:exports][:top_traded].length).to eq(0) + subject[:exports][:top_traded].length.should == 0 end end end diff --git a/spec/models/designation_spec.rb b/spec/models/designation_spec.rb index 2c881229e7..c487750f2e 100644 --- a/spec/models/designation_spec.rb +++ b/spec/models/designation_spec.rb @@ -15,60 +15,60 @@ describe :create do context "when valid" do let(:designation) { build(:designation, :name => 'GALACTIC REGULATIONS') } - specify { expect(designation).to be_valid } + specify { designation.should be_valid } end context "when name missing" do let(:designation) { build(:designation, :name => nil) } - specify { expect(designation).to be_invalid } - specify { expect(designation).to have(1).error_on(:name) } + specify { designation.should be_invalid } + specify { designation.should have(1).error_on(:name) } end context "when name duplicated" do let!(:designation1) { create(:designation) } let(:designation2) { build(:designation, :name => designation1.name) } - specify { expect(designation2).to be_invalid } - specify { expect(designation2).to have(1).error_on(:name) } + specify { designation2.should be_invalid } + specify { designation2.should have(1).error_on(:name) } end end describe :update do context "when updating a non-protected name" do let(:designation) { create(:designation) } specify { - expect(designation.update_attributes( + designation.update_attributes( { :name => 'RULES OF INTERGALACTIC TRADE' } - )).to be_truthy + ).should be_truthy } end context "when updating a protected name" do specify { - expect(cites.update_attributes( + cites.update_attributes( { :name => 'RULES OF INTERGALACTIC TRADE' } - )).to be_falsey + ).should be_falsey } end context "when updating taxonomy with no dependent objects attached" do let(:designation) { create(:designation) } let(:taxonomy) { create(:taxonomy) } - specify { expect(designation.update_attributes(:taxonomy_id => taxonomy.id)).to be_truthy } + specify { designation.update_attributes(:taxonomy_id => taxonomy.id).should be_truthy } end context "when updating taxonomy with dependent objects attached" do let(:designation) { create(:designation) } let!(:change_type) { create(:change_type, :designation => designation) } let(:taxonomy) { create(:taxonomy) } - specify { expect(designation.update_attributes(:taxonomy_id => taxonomy.id)).to be_falsey } + specify { designation.update_attributes(:taxonomy_id => taxonomy.id).should be_falsey } end end describe :destroy do context "when no dependent objects attached" do let(:designation) { create(:designation, :name => 'GALACTIC REGULATIONS') } - specify { expect(designation.destroy).to be_truthy } + specify { designation.destroy.should be_truthy } end context "when dependent objects attached" do let(:designation) { create(:designation, :name => 'GALACTIC REGULATIONS') } let!(:change_type) { create(:change_type, :designation => designation) } - specify { expect(designation.destroy).to be_falsey } + specify { designation.destroy.should be_falsey } end context "when protected name" do - specify { expect(cites.destroy).to be_falsey } + specify { cites.destroy.should be_falsey } end end end diff --git a/spec/models/eu_decision_spec.rb b/spec/models/eu_decision_spec.rb index c4e642d55b..3d8e7f4f0a 100644 --- a/spec/models/eu_decision_spec.rb +++ b/spec/models/eu_decision_spec.rb @@ -65,7 +65,7 @@ Species::EuDecisionsExport.new(set: 'current', decision_types: {}).export end subject { Dir["#{DownloadsCache.eu_decisions_path}/*"] } - specify { expect(subject).not_to be_empty } + specify { subject.should_not be_empty } end end @@ -74,7 +74,7 @@ let(:eu_decision) { build(:eu_decision, srg_history_id: nil, eu_decision_type_id: nil) } subject { eu_decision.save } - specify { expect(subject).to be_falsey } + specify { subject.should be_falsey } it 'should have an error message' do subject @@ -85,19 +85,19 @@ context 'Eu decision creates correctly if only Eu decision type is populated' do let(:eu_decision) { build(:eu_decision) } - specify { expect(subject).to be_truthy } + specify { subject.should be_truthy } end context 'Eu decision creates correctly if only SRG history is populated' do let(:eu_decision) { build(:eu_decision, eu_decision_type: nil, srg_history: create(:srg_history)) } - specify { expect(subject).to be_truthy } + specify { subject.should be_truthy } end context 'Eu decision creates correctly if both Eu decision type and SRG history are populated' do let(:eu_decision) { build(:eu_decision, srg_history: create(:srg_history)) } - specify { expect(subject).to be_truthy } + specify { subject.should be_truthy } end end @@ -111,7 +111,7 @@ Species::EuDecisionsExport.new(set: 'current', decision_types: {}).export end subject { Dir["#{DownloadsCache.eu_decisions_path}/*"] } - specify { expect(subject).to be_empty } + specify { subject.should be_empty } end end diff --git a/spec/models/eu_opinion_spec.rb b/spec/models/eu_opinion_spec.rb index 52d277bf76..0252f1cbbb 100644 --- a/spec/models/eu_opinion_spec.rb +++ b/spec/models/eu_opinion_spec.rb @@ -38,8 +38,8 @@ ) } - specify { expect(eu_opinion).to be_invalid } - specify { expect(eu_opinion).to have(1).error_on(:taxon_concept) } + specify { eu_opinion.should be_invalid } + specify { eu_opinion.should have(1).error_on(:taxon_concept) } end context "when geo_entity missing" do @@ -49,8 +49,8 @@ ) } - specify { expect(eu_opinion).to be_invalid } - specify { expect(eu_opinion.error_on(:geo_entity).size).to eq(1) } + specify { eu_opinion.should be_invalid } + specify { eu_opinion.should have(1).error_on(:geo_entity) } end context "when start_date missing" do @@ -58,8 +58,8 @@ build(:eu_opinion, start_date: nil) } - specify { expect(eu_opinion).to be_invalid } - specify { expect(eu_opinion.error_on(:start_date).size).to eq(1) } + specify { eu_opinion.should be_invalid } + specify { eu_opinion.should have(1).error_on(:start_date) } end context "when valid" do @@ -68,7 +68,7 @@ end let(:eu_opinion) { build(:eu_opinion, start_event: @eu_regulation) } - specify { expect(eu_opinion).to be_valid } + specify { eu_opinion.should be_valid } end end diff --git a/spec/models/eu_regulation_spec.rb b/spec/models/eu_regulation_spec.rb index c2333a351a..2089a212b8 100644 --- a/spec/models/eu_regulation_spec.rb +++ b/spec/models/eu_regulation_spec.rb @@ -33,7 +33,7 @@ EventListingChangesCopyWorker.jobs.clear create_eu_regulation(:listing_changes_event_id => eu_regulation1.id) end - specify { expect(EventListingChangesCopyWorker.jobs.size).to eq(1) } + specify { EventListingChangesCopyWorker.jobs.size.should == 1 } end context "when designation invalid" do let(:eu_regulation) { @@ -42,8 +42,8 @@ :designation => cites ) } - specify { expect(eu_regulation).to be_invalid } - specify { expect(eu_regulation).to have(1).error_on(:designation_id) } + specify { eu_regulation.should be_invalid } + specify { eu_regulation.should have(1).error_on(:designation_id) } end context "when effective_at is blank" do let(:eu_regulation) { @@ -52,8 +52,8 @@ :effective_at => nil ) } - specify { expect(eu_regulation).to be_invalid } - specify { expect(eu_regulation).to have(1).error_on(:effective_at) } + specify { eu_regulation.should be_invalid } + specify { eu_regulation.should have(1).error_on(:effective_at) } end end describe :activate do @@ -62,8 +62,8 @@ EuRegulationActivationWorker.jobs.clear eu_regulation.activate! end - specify { expect(eu_regulation.is_current).to be_truthy } - specify { expect(EuRegulationActivationWorker.jobs.size).to eq(1) } + specify { eu_regulation.is_current.should be_truthy } + specify { EuRegulationActivationWorker.jobs.size.should == 1 } end describe :deactivate do @@ -72,19 +72,19 @@ EuRegulationActivationWorker.jobs.clear eu_regulation.deactivate! end - specify { expect(eu_regulation.is_current).to be_falsey } - specify { expect(EuRegulationActivationWorker.jobs.size).to eq(1) } + specify { eu_regulation.is_current.should be_falsey } + specify { EuRegulationActivationWorker.jobs.size.should == 1 } end describe :destroy do let(:eu_regulation) { create_eu_regulation } context "when no dependent objects attached" do - specify { expect(eu_regulation.destroy).to be_truthy } + specify { eu_regulation.destroy.should be_truthy } end context "when dependent objects attached" do context "when listing changes" do let!(:listing_change) { create_eu_A_addition(:event => eu_regulation) } - specify { expect(eu_regulation.destroy).to be_truthy } + specify { eu_regulation.destroy.should be_truthy } end end end diff --git a/spec/models/eu_suspension_spec.rb b/spec/models/eu_suspension_spec.rb index cf276679cc..16efb64833 100644 --- a/spec/models/eu_suspension_spec.rb +++ b/spec/models/eu_suspension_spec.rb @@ -38,8 +38,8 @@ ) } - specify { expect(eu_suspension).to be_invalid } - specify { expect(eu_suspension).to have(1).error_on(:taxon_concept) } + specify { eu_suspension.should be_invalid } + specify { eu_suspension.should have(1).error_on(:taxon_concept) } end context "when geo_entity missing" do @@ -50,14 +50,14 @@ ) } - specify { expect(eu_suspension).to be_invalid } - specify { expect(eu_suspension.error_on(:geo_entity).size).to eq(1) } + specify { eu_suspension.should be_invalid } + specify { eu_suspension.should have(1).error_on(:geo_entity) } end context "when valid" do let(:eu_suspension) { build(:eu_suspension) } - specify { expect(eu_suspension).to be_valid } + specify { eu_suspension.should be_valid } end end @@ -67,7 +67,7 @@ create(:eu_suspension, start_event: nil, end_event: nil) } - specify { expect(eu_suspension.is_current).to be_falsey } + specify { eu_suspension.is_current.should be_falsey } end context "when start_event is set but date is in the future" do @@ -78,7 +78,7 @@ create(:eu_suspension, start_event: start_event, end_event: nil) } - specify { expect(eu_suspension.is_current).to be_falsey } + specify { eu_suspension.is_current.should be_falsey } end context "when start_event is set but is not current" do @@ -89,7 +89,7 @@ create(:eu_suspension, start_event: start_event, end_event: nil) } - specify { expect(eu_suspension.is_current).to be_falsey } + specify { eu_suspension.is_current.should be_falsey } end context "when start_event is set but date is in past or present" do @@ -107,8 +107,8 @@ create(:eu_suspension, start_event: start_event2, end_event: nil) } - specify { expect(eu_suspension.is_current).to be_truthy } - specify { expect(eu_suspension2.is_current).to be_truthy } + specify { eu_suspension.is_current.should be_truthy } + specify { eu_suspension2.is_current.should be_truthy } end context "when end_event is set, but no start_event is set" do @@ -119,7 +119,7 @@ create(:eu_suspension, start_event: nil, end_event: end_event) } - specify { expect(eu_suspension.is_current).to be_falsey } + specify { eu_suspension.is_current.should be_falsey } end context "when end_event is set, and start_event is set with date in future" do @@ -133,7 +133,7 @@ create(:eu_suspension, start_event: start_event, end_event: end_event) } - specify { expect(eu_suspension.is_current).to be_falsey } + specify { eu_suspension.is_current.should be_falsey } end context "when start_event is set, and end_event is set with date in the future" do @@ -147,7 +147,7 @@ create(:eu_suspension, start_event: start_event, end_event: end_event) } - specify { expect(eu_suspension.is_current).to be_truthy } + specify { eu_suspension.is_current.should be_truthy } end context "when start_event is set, and end_event is set with date in the past" do @@ -161,7 +161,7 @@ create(:eu_suspension, start_event: start_event, end_event: end_event) } - specify { expect(eu_suspension.is_current).to be_falsey } + specify { eu_suspension.is_current.should be_falsey } end end @@ -170,7 +170,7 @@ let(:eu_suspension) { create(:eu_suspension, start_event: nil) } - specify { expect(eu_suspension.start_date_formatted).to be_empty } + specify { eu_suspension.start_date_formatted.should be_empty } end context "when there's start_event" do @@ -180,7 +180,7 @@ let(:start_event) { create(:event, effective_at: 2.day.ago) } - specify { expect(eu_suspension.start_date_formatted).to eq(2.day.ago.strftime("%d/%m/%Y")) } + specify { eu_suspension.start_date_formatted.should == 2.day.ago.strftime("%d/%m/%Y") } end end @@ -189,7 +189,7 @@ let(:eu_suspension) { create(:eu_suspension, end_event: nil) } - specify { expect(eu_suspension.end_date_formatted).to be_empty } + specify { eu_suspension.end_date_formatted.should be_empty } end context "when there's end_event" do @@ -199,7 +199,7 @@ let(:end_event) { create(:event, effective_at: 2.day.ago) } - specify { expect(eu_suspension.end_date_formatted).to eq(2.day.ago.strftime("%d/%m/%Y")) } + specify { eu_suspension.end_date_formatted.should == 2.day.ago.strftime("%d/%m/%Y") } end end end diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 56b51ee31d..38cb35a8a8 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -29,28 +29,28 @@ describe :create do context "when valid" do let(:event) { build(:event, :name => 'CoPX') } - specify { expect(event).to be_valid } + specify { event.should be_valid } end context "when name missing" do let(:event) { build(:event, :name => nil) } - specify { expect(event).to be_invalid } - specify { expect(event).to have(1).error_on(:name) } + specify { event.should be_invalid } + specify { event.should have(1).error_on(:name) } end context "when name duplicated" do let!(:event1) { create(:event) } let(:event2) { build(:event, :name => event1.name) } - specify { expect(event2).to be_invalid } - specify { expect(event2).to have(1).error_on(:name) } + specify { event2.should be_invalid } + specify { event2.should have(1).error_on(:name) } end context "when url invalid" do let(:event) { build(:event, :url => 'www.google.com') } - specify { expect(event).to be_invalid } - specify { expect(event).to have(1).error_on(:url) } + specify { event.should be_invalid } + specify { event.should have(1).error_on(:url) } end end describe :effective_at_formatted do let(:event) { create(:event, :effective_at => '2012-05-10') } - specify { expect(event.effective_at_formatted).to eq('10/05/2012') } + specify { event.effective_at_formatted.should == '10/05/2012' } end end diff --git a/spec/models/geo_entity_spec.rb b/spec/models/geo_entity_spec.rb index 2b7621b964..c46d596d9a 100644 --- a/spec/models/geo_entity_spec.rb +++ b/spec/models/geo_entity_spec.rb @@ -61,31 +61,31 @@ ) } subject { GeoEntity.nodes_and_descendants([europe.id]) } - specify { expect(subject.map(&:id)).to include(europe.id, poland.id, wolin.id) } - specify { expect(subject.size).to eq(3) } + specify { subject.map(&:id).should include(europe.id, poland.id, wolin.id) } + specify { subject.size.should == 3 } end end describe :destroy do let(:geo_entity) { create(:geo_entity) } context "when no dependent objects attached" do - specify { expect(geo_entity.destroy).to be_truthy } + specify { geo_entity.destroy.should be_truthy } end context "when dependent objects attached" do context "when distributions" do before(:each) { create(:distribution, :geo_entity => geo_entity) } - specify { expect(geo_entity.destroy).to be_falsey } + specify { geo_entity.destroy.should be_falsey } end context "when exported shipments" do before(:each) { create(:shipment, :exporter => geo_entity) } - specify { expect(geo_entity.destroy).to be_falsey } + specify { geo_entity.destroy.should be_falsey } end context "when imported shipments" do before(:each) { create(:shipment, :importer => geo_entity) } - specify { expect(geo_entity.destroy).to be_falsey } + specify { geo_entity.destroy.should be_falsey } end context "when originated shipments" do before(:each) { create(:shipment, :country_of_origin => geo_entity) } - specify { expect(geo_entity.destroy).to be_falsey } + specify { geo_entity.destroy.should be_falsey } end context "when connected geo entities" do let(:child_geo_entity) { create(:geo_entity) } @@ -97,7 +97,7 @@ :related_geo_entity => child_geo_entity ) end - specify { expect(geo_entity.destroy).to be_falsey } + specify { geo_entity.destroy.should be_falsey } end end end diff --git a/spec/models/html_to_latex_spec.rb b/spec/models/html_to_latex_spec.rb index 5595d79099..0ac8da7bd9 100644 --- a/spec/models/html_to_latex_spec.rb +++ b/spec/models/html_to_latex_spec.rb @@ -7,13 +7,13 @@ context "when tag closed" do let(:input_str) { "Text about Foobarus lolus and friends" } specify { - expect(subject).to eq("Text about \\textit{Foobarus lolus} and friends") + subject.should == "Text about \\textit{Foobarus lolus} and friends" } end context "when tag not closed" do let(:input_str) { "Text about Foobarus lolus and friends" } specify { - expect(subject).to eq("Text about \\textit{Foobarus lolus and friends}") + subject.should == "Text about \\textit{Foobarus lolus and friends}" } end end @@ -21,24 +21,24 @@ context "when tag closed" do let(:input_str) { "Text,

paragraph

and some more text" } specify { - expect(subject).to eq("Text, \\newline paragraph\\newline and some more text") + subject.should == "Text, \\newline paragraph\\newline and some more text" } end context "when tag not closed" do let(:input_str) { "Text,

paragraph and some more text" } specify { - expect(subject).to eq("Text, \\newline paragraph and some more text") + subject.should == "Text, \\newline paragraph and some more text" } end end context "when latex special characters" do context "within tags" do let(:input_str) { "Lolus & friends" } - specify { expect(subject).to eq("\\textbf{Lolus \\& friends}") } + specify { subject.should == "\\textbf{Lolus \\& friends}" } end context "outside of tags" do let(:input_str) { "Lolus & friends" } - specify { expect(subject).to eq("\\textbf{Lolus} \\& friends") } + specify { subject.should == "\\textbf{Lolus} \\& friends" } end end end diff --git a/spec/models/hybrid_relationship_spec.rb b/spec/models/hybrid_relationship_spec.rb index 9bf648bb22..34177dd663 100644 --- a/spec/models/hybrid_relationship_spec.rb +++ b/spec/models/hybrid_relationship_spec.rb @@ -52,15 +52,15 @@ } specify { hybrid_rel.save - expect(tc.hybrids.map(&:full_name)).to include('Lolcatus lolatus x lolcatus') + tc.hybrids.map(&:full_name).should include('Lolcatus lolatus x lolcatus') } specify { hybrid_rel.save another_hybrid_rel.save hybrid_rel.other_taxon_concept = another_hybrid hybrid_rel.save - expect(tc.hybrids.map(&:full_name)).to include('Lolcatus lolcatus x ?') - expect(another_tc.hybrids.map(&:full_name)).to include('Lolcatus lolatus x lolcatus') + tc.hybrids.map(&:full_name).should include('Lolcatus lolcatus x ?') + another_tc.hybrids.map(&:full_name).should include('Lolcatus lolatus x lolcatus') } end end diff --git a/spec/models/listing_change_spec.rb b/spec/models/listing_change_spec.rb index 3c9b394bee..475b741032 100644 --- a/spec/models/listing_change_spec.rb +++ b/spec/models/listing_change_spec.rb @@ -44,7 +44,7 @@ excluded_taxon_concepts_ids: "#{excluded_taxon_concept.id}" ) } - specify { expect(listing_change).to be_valid } + specify { listing_change.should be_valid } end context "inclusion taxon concept is lower rank" do let(:inclusion) { create_cites_eu_subspecies } @@ -56,7 +56,7 @@ inclusion_taxon_concept_id: inclusion.id ) } - specify { expect(listing_change.error_on(:inclusion_taxon_concept_id).size).to eq(1) } + specify { listing_change.should have(1).error_on(:inclusion_taxon_concept_id) } end context "species listing designation mismatch" do let(:designation1) { create(:designation) } @@ -68,7 +68,7 @@ :change_type => create(:change_type, :designation => designation2) ) } - specify { expect(listing_change.error_on(:species_listing_id).size).to eq(1) } + specify { listing_change.should have(1).error_on(:species_listing_id) } end context "event designation mismatch" do let(:designation1) { create(:designation) } @@ -80,13 +80,13 @@ :change_type => create(:change_type, :designation => designation2) ) } - specify { expect(listing_change.error_on(:event_id).size).to eq(1) } + specify { listing_change.should have(1).error_on(:event_id) } end end end describe :effective_at_formatted do let(:listing_change) { create_cites_I_addition(:effective_at => '2012-05-10') } - specify { expect(listing_change.effective_at_formatted).to eq('10/05/2012') } + specify { listing_change.effective_at_formatted.should == '10/05/2012' } end describe :duplicates do diff --git a/spec/models/nomenclature_change/lump_spec.rb b/spec/models/nomenclature_change/lump_spec.rb index c256a9f92f..7f15942a8e 100644 --- a/spec/models/nomenclature_change/lump_spec.rb +++ b/spec/models/nomenclature_change/lump_spec.rb @@ -58,7 +58,7 @@ :inputs_attributes => { 0 => { :taxon_concept_id => create_cites_eu_subspecies.id } } ) } - specify { expect(lump.errors_on(:inputs).size).to eq(1) } + specify { expect(lump).to have(1).errors_on(:inputs) } end end end diff --git a/spec/models/nomenclature_change/output_spec.rb b/spec/models/nomenclature_change/output_spec.rb index ebb6de305f..5a218ecc85 100644 --- a/spec/models/nomenclature_change/output_spec.rb +++ b/spec/models/nomenclature_change/output_spec.rb @@ -66,7 +66,7 @@ :new_name_status => 'A' ) } - specify { expect(output.error_on(:new_parent_id).size).to eq(1) } + specify { expect(output).to have(1).error_on(:new_parent_id) } end context "when taxon concept specified" do let(:tc) { create_cites_eu_species } diff --git a/spec/models/nomenclature_change/split_spec.rb b/spec/models/nomenclature_change/split_spec.rb index cc26a8908c..81249a0cab 100644 --- a/spec/models/nomenclature_change/split_spec.rb +++ b/spec/models/nomenclature_change/split_spec.rb @@ -69,7 +69,7 @@ } ) } - specify { expect(split.errors_on(:outputs).size).to eq(1) } + specify { expect(split).to have(1).errors_on(:outputs) } end end end diff --git a/spec/models/nomenclature_change/status_to_accepted_spec.rb b/spec/models/nomenclature_change/status_to_accepted_spec.rb index f54b493877..5f6c0c28de 100644 --- a/spec/models/nomenclature_change/status_to_accepted_spec.rb +++ b/spec/models/nomenclature_change/status_to_accepted_spec.rb @@ -47,7 +47,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change.error_on(:primary_output).size).to eq(1) } + specify { expect(status_change).to have(1).error_on(:primary_output) } end end context "when primary output has valid name status" do @@ -61,7 +61,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change.errors_on(:primary_output).size).to eq(0) } + specify { expect(status_change).to have(0).errors_on(:primary_output) } end end end diff --git a/spec/models/nomenclature_change/status_to_synonym_spec.rb b/spec/models/nomenclature_change/status_to_synonym_spec.rb index 6166675cf4..560a317859 100644 --- a/spec/models/nomenclature_change/status_to_synonym_spec.rb +++ b/spec/models/nomenclature_change/status_to_synonym_spec.rb @@ -47,7 +47,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change.error_on(:primary_output).size).to eq(1) } + specify { expect(status_change).to have(1).error_on(:primary_output) } end end context "when primary output has valid name status" do @@ -61,7 +61,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change.errors_on(:primary_output).size).to eq(0) } + specify { expect(status_change).to have(0).errors_on(:primary_output) } end end context "when required secondary output missing" do @@ -73,7 +73,7 @@ status: NomenclatureChange::StatusToSynonym::RELAY ) } - specify { expect(status_change.error_on(:secondary_output).size).to eq(1) } + specify { expect(status_change).to have(1).error_on(:secondary_output) } end context "when submitting" do let(:status_change) { @@ -83,7 +83,7 @@ status: NomenclatureChange::StatusToSynonym::SUBMITTED ) } - specify { expect(status_change.error_on(:secondary_output).size).to eq(1) } + specify { expect(status_change).to have(1).error_on(:secondary_output) } end end end diff --git a/spec/models/preset_tag_spec.rb b/spec/models/preset_tag_spec.rb index 85dc246eef..15f521fba9 100644 --- a/spec/models/preset_tag_spec.rb +++ b/spec/models/preset_tag_spec.rb @@ -15,17 +15,17 @@ describe :create do context "when valid" do let(:preset_tag) { build(:preset_tag, :name => 'Test Tag', :model => 'TaxonConcept') } - specify { expect(preset_tag).to be_valid } + specify { preset_tag.should be_valid } end context "when name missing" do let(:preset_tag) { build(:preset_tag, :name => nil, :model => 'TaxonConcept') } - specify { expect(preset_tag).to be_invalid } - specify { expect(preset_tag).to have(1).error_on(:name) } + specify { preset_tag.should be_invalid } + specify { preset_tag.should have(1).error_on(:name) } end context "when model (type) incorrect" do let(:preset_tag) { build(:preset_tag, :name => 'Test Tag', :model => 'Nope') } - specify { expect(preset_tag).to be_invalid } - specify { expect(preset_tag).to have(1).error_on(:model) } + specify { preset_tag.should be_invalid } + specify { preset_tag.should have(1).error_on(:model) } end end end diff --git a/spec/models/purpose_spec.rb b/spec/models/purpose_spec.rb index 2ffb2487e1..21007403c5 100644 --- a/spec/models/purpose_spec.rb +++ b/spec/models/purpose_spec.rb @@ -18,7 +18,7 @@ describe :destroy do context "when no dependent objects attached" do let(:purpose) { create(:purpose) } - specify { expect(purpose.destroy).to be_truthy } + specify { purpose.destroy.should be_truthy } end context "when dependent objects attached" do let(:purpose) { create(:purpose) } @@ -30,11 +30,11 @@ :start_notification_id => create_cites_suspension_notification.id ) } - specify { expect(purpose.destroy).to be_falsey } + specify { purpose.destroy.should be_falsey } end context "when shipments" do before(:each) { create(:shipment, :purpose => purpose) } - specify { expect(purpose.destroy).to be_falsey } + specify { purpose.destroy.should be_falsey } end end end diff --git a/spec/models/quota_spec.rb b/spec/models/quota_spec.rb index 25092b5a92..3a9a42592a 100644 --- a/spec/models/quota_spec.rb +++ b/spec/models/quota_spec.rb @@ -45,7 +45,7 @@ Quota.export('set' => 'current') end subject { Dir["#{DownloadsCache.quotas_path}/*"] } - specify { expect(subject).not_to be_empty } + specify { subject.should_not be_empty } end end @@ -59,7 +59,7 @@ Quota.export('set' => 'current') end subject { Dir["#{DownloadsCache.quotas_path}/*"] } - specify { expect(subject).to be_empty } + specify { subject.should be_empty } end end @@ -79,7 +79,7 @@ ) } - specify { expect(quota).to be_valid } + specify { quota.should be_valid } end context "when quota missing" do @@ -92,8 +92,8 @@ ) } - specify { expect(quota1).to be_invalid } - specify { expect(quota1.error_on(:quota).size).to eq(2) } + specify { quota1.should be_invalid } + specify { quota1.should have(2).error_on(:quota) } end context "when publication date missing" do @@ -106,8 +106,8 @@ ) } - specify { expect(quota).to be_invalid } - specify { expect(quota.error_on(:publication_date).size).to eq(1) } + specify { quota.should be_invalid } + specify { quota.should have(1).error_on(:publication_date) } end context "when start date greater than end date" do @@ -121,8 +121,8 @@ ) } - specify { expect(quota).to be_invalid } - specify { expect(quota.error_on(:start_date).size).to eq(1) } + specify { quota.should be_invalid } + specify { quota.should have(1).error_on(:start_date) } end pending "doesn't save a quota without a unit" do diff --git a/spec/models/rank_spec.rb b/spec/models/rank_spec.rb index aaae38fe10..96a626d1d9 100644 --- a/spec/models/rank_spec.rb +++ b/spec/models/rank_spec.rb @@ -19,17 +19,17 @@ describe :parent_rank_lower_bound do context "obligatory rank" do let(:rank) { create(:rank, name: Rank::KINGDOM) } - specify { expect(rank.parent_rank_lower_bound).to eq('0') } + specify { rank.parent_rank_lower_bound.should == '0' } end context "optional rank" do let(:rank) { create(:rank, name: Rank::SUBFAMILY) } - specify { expect(rank.parent_rank_lower_bound).to eq('5') } + specify { rank.parent_rank_lower_bound.should == '5' } end end describe :create do context "when taxonomic position malformed" do let(:rank) { build(:rank, name: Rank::PHYLUM, taxonomic_position: '1.a.b') } - specify { expect(rank).to have(1).error_on(:taxonomic_position) } + specify { rank.should have(1).error_on(:taxonomic_position) } end end describe :destroy do @@ -39,30 +39,30 @@ r.update_attribute(:name, 'SUPER PHYLUM') r } - specify { expect(rank.destroy).to be_truthy } + specify { rank.destroy.should be_truthy } end context "when dependent objects attached" do let(:rank) { create(:rank, name: Rank::PHYLUM, taxonomic_position: '1.1') } let!(:taxon_concept) { create(:taxon_concept, :rank => rank) } - specify { expect(rank.destroy).to be_falsey } + specify { rank.destroy.should be_falsey } end context "when protected name" do let(:rank) { create(:rank, name: Rank::PHYLUM, taxonomic_position: '1.1') } - specify { expect(rank.destroy).to be_falsey } + specify { rank.destroy.should be_falsey } end end describe :in_range do context "when no bounds specified" do subject { Rank.in_range(nil, nil) } - specify { expect(subject).to eq(Rank.dict) } + specify { subject.should == Rank.dict } end context "when lower bound specified" do subject { Rank.in_range(Rank::CLASS, nil) } - specify { expect(subject).to eq([Rank::KINGDOM, Rank::PHYLUM, Rank::CLASS]) } + specify { subject.should == [Rank::KINGDOM, Rank::PHYLUM, Rank::CLASS] } end context "when lower and upper bound specified" do subject { Rank.in_range(Rank::GENUS, Rank::FAMILY) } - specify { expect(subject).to eq([Rank::FAMILY, Rank::SUBFAMILY, Rank::GENUS]) } + specify { subject.should == [Rank::FAMILY, Rank::SUBFAMILY, Rank::GENUS] } end end end diff --git a/spec/models/sapi/geoip_spec.rb b/spec/models/sapi/geoip_spec.rb index 519f6388c8..2ac1e05243 100644 --- a/spec/models/sapi/geoip_spec.rb +++ b/spec/models/sapi/geoip_spec.rb @@ -12,6 +12,6 @@ } ) end - specify { expect(subject.resolve('1.1.1.1')[:city]).to eq('Bogotá') } + specify { subject.resolve('1.1.1.1')[:city].should == 'Bogotá' } end end diff --git a/spec/models/source_spec.rb b/spec/models/source_spec.rb index d61341f3b8..d8c2fa9fb8 100644 --- a/spec/models/source_spec.rb +++ b/spec/models/source_spec.rb @@ -18,7 +18,7 @@ describe :destroy do context "when no dependent objects attached" do let(:source) { create(:source) } - specify { expect(source.destroy).to be_truthy } + specify { source.destroy.should be_truthy } end context "when dependent objects attached" do let(:source) { create(:source) } @@ -30,16 +30,16 @@ :start_notification_id => create_cites_suspension_notification.id ) } - specify { expect(source.destroy).to be_falsey } + specify { source.destroy.should be_falsey } end context "when CITES quota" do let(:geo_entity) { create(:geo_entity) } let!(:quota) { create(:quota, :sources => [source], :geo_entity_id => geo_entity.id) } - specify { expect(source.destroy).to be_falsey } + specify { source.destroy.should be_falsey } end context "when shipments" do before(:each) { create(:shipment, :source => source) } - specify { expect(source.destroy).to be_falsey } + specify { source.destroy.should be_falsey } end end end diff --git a/spec/models/species/common_names_export_spec.rb b/spec/models/species/common_names_export_spec.rb index abcf2e5ecb..a6e54076d4 100644 --- a/spec/models/species/common_names_export_spec.rb +++ b/spec/models/species/common_names_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::CommonNamesExport.new({}) } - specify { expect(subject.path).to eq("public/downloads/common_names/") } + specify { subject.path.should == "public/downloads/common_names/" } end describe :export do context "when no results" do subject { Species::CommonNamesExport.new({}) } - specify { expect(subject.export).to be_falsey } + specify { subject.export.should be_falsey } end context "when results" do before(:each) { @@ -31,13 +31,13 @@ context "when file not cached" do specify { subject.export - expect(File.file?(subject.file_name)).to be_truthy + File.file?(subject.file_name).should be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - expect(subject).not_to receive(:to_csv) + subject.should_not_receive(:to_csv) subject.export } end diff --git a/spec/models/species/documents_export_spec.rb b/spec/models/species/documents_export_spec.rb index 8c0dc043bf..83b62d67a4 100644 --- a/spec/models/species/documents_export_spec.rb +++ b/spec/models/species/documents_export_spec.rb @@ -4,7 +4,7 @@ subject { Species::DocumentsExport.new({}) } - specify { expect(subject.path).to eq("public/downloads/documents/") } + specify { subject.path.should == "public/downloads/documents/" } end SPEC_DOCUMENTS_DOWNLOAD_PATH = "spec/public/downloads/documents" describe :export do @@ -26,7 +26,7 @@ Species::DocumentsExport.new({}) } specify "when file not cached it should not be generated" do - expect(subject.export).to be_falsey + subject.export.should be_falsey end end context "when results" do @@ -40,12 +40,12 @@ #} pending "when file not cached it should be generated" do subject.export - expect(File.file?(subject.file_name)).to be_truthy - expect(File.size(subject.file_name)).to be > 0 + File.file?(subject.file_name).should be_truthy + File.size(subject.file_name).should be > 0 end pending "when file cached it should not be generated" do FileUtils.touch(subject.file_name) - expect(subject).not_to receive(:to_csv) + subject.should_not_receive(:to_csv) subject.export end end diff --git a/spec/models/species/hybrid_prefix_matcher_spec.rb b/spec/models/species/hybrid_prefix_matcher_spec.rb index d10de6e9bf..bef84c75ca 100644 --- a/spec/models/species/hybrid_prefix_matcher_spec.rb +++ b/spec/models/species/hybrid_prefix_matcher_spec.rb @@ -11,7 +11,7 @@ :visibility => :trade }) } - specify { expect(subject.results).to include(@hybrid_ac) } + specify { subject.results.should include(@hybrid_ac) } end context "when trade internal visibility" do subject { @@ -21,7 +21,7 @@ :visibility => :trade_internal }) } - specify { expect(subject.results).to include(@hybrid_ac) } + specify { subject.results.should include(@hybrid_ac) } end context "when speciesplus visibility" do subject { @@ -30,7 +30,7 @@ :ranks => [] }) } - specify { expect(subject.results).to be_empty } + specify { subject.results.should be_empty } end end end diff --git a/spec/models/species/invisible_subspecies_search_spec.rb b/spec/models/species/invisible_subspecies_search_spec.rb index a50144c26c..514d4dbcc0 100644 --- a/spec/models/species/invisible_subspecies_search_spec.rb +++ b/spec/models/species/invisible_subspecies_search_spec.rb @@ -5,8 +5,8 @@ context "when searching by scientific name" do context "when subspecies never listed" do subject { Species::Search.new({ :taxon_concept_query => 'amazona festiva festiva' }).results } - specify { expect(subject).not_to include(@subspecies2_2_2_1) } - specify { expect(subject).to include(@species2_2_2) } + specify { subject.should_not include(@subspecies2_2_2_1) } + specify { subject.should include(@species2_2_2) } end end end diff --git a/spec/models/species/listings_export_spec.rb b/spec/models/species/listings_export_spec.rb index 7ef6332e64..d3ddcb42dc 100644 --- a/spec/models/species/listings_export_spec.rb +++ b/spec/models/species/listings_export_spec.rb @@ -7,7 +7,7 @@ :designation_id => cites.id }) } - specify { expect(subject.path).to eq("public/downloads/cites_listings/") } + specify { subject.path.should == "public/downloads/cites_listings/" } end describe :export do context "when no results" do @@ -18,7 +18,7 @@ :geo_entities_ids => [poland.id] }) } - specify { expect(subject.export).to be_falsey } + specify { subject.export.should be_falsey } end context "when results" do before(:each) { @@ -41,13 +41,13 @@ context "when file not cached" do specify { subject.export - expect(File.file?(subject.file_name)).to be_truthy + File.file?(subject.file_name).should be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - expect(subject).not_to receive(:to_csv) + subject.should_not_receive(:to_csv) subject.export } end @@ -62,7 +62,7 @@ :species_listings_ids => [cites_I.id] }) } - specify { expect(subject.query.to_a.size).to eq(1) } + specify { subject.query.to_a.size.should == 1 } context "when Poland" do subject { @@ -72,7 +72,7 @@ :geo_entities_ids => [poland.id] }) } - specify { expect(subject.query.to_a.size).to eq(0) } + specify { subject.query.to_a.size.should == 0 } end context "when Nepal" do @@ -83,7 +83,7 @@ :geo_entities_ids => [nepal.id] }) } - specify { expect(subject.query.to_a.size).to eq(1) } + specify { subject.query.to_a.size.should == 1 } end end context "when higher taxon ids" do @@ -93,7 +93,7 @@ :taxon_concepts_ids => [@family.id] }) } - specify { expect(subject.query.to_a.size).to eq(1) } + specify { subject.query.to_a.size.should == 1 } end context "when implicitly listed subspecies present" do before(:each) do @@ -108,7 +108,7 @@ :taxon_concepts_ids => [@family.id] }) } - specify { expect(subject.query.to_a.size).to eq(1) } + specify { subject.query.to_a.size.should == 1 } end end context "when EU" do @@ -119,7 +119,7 @@ :species_listings_ids => [eu_A.id] }) } - specify { expect(subject.query.to_a.size).to eq(1) } + specify { subject.query.to_a.size.should == 1 } context "when Spain" do subject { @@ -129,7 +129,7 @@ :geo_entities_ids => [spain.id] }) } - specify { expect(subject.query.to_a.size).to eq(0) } + specify { subject.query.to_a.size.should == 0 } end context "when Nepal" do @@ -140,7 +140,7 @@ :geo_entities_ids => [nepal.id] }) } - specify { expect(subject.query.to_a.size).to eq(1) } + specify { subject.query.to_a.size.should == 1 } end end context "when higher taxon ids" do @@ -150,7 +150,7 @@ :taxon_concepts_ids => [@family.id] }) } - specify { expect(subject.query.to_a.size).to eq(1) } + specify { subject.query.to_a.size.should == 1 } end end end diff --git a/spec/models/species/orphaned_taxon_concepts_export_spec.rb b/spec/models/species/orphaned_taxon_concepts_export_spec.rb index 739a18d14a..1856f791f8 100644 --- a/spec/models/species/orphaned_taxon_concepts_export_spec.rb +++ b/spec/models/species/orphaned_taxon_concepts_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::OrphanedTaxonConceptsExport.new({}) } - specify { expect(subject.path).to eq("public/downloads/orphaned_taxon_concepts/") } + specify { subject.path.should == "public/downloads/orphaned_taxon_concepts/" } end describe :export do context "when no results" do subject { Species::OrphanedTaxonConceptsExport.new({}) } - specify { expect(subject.export).to be_falsey } + specify { subject.export.should be_falsey } end context "when results" do before(:each) { @@ -32,13 +32,13 @@ context "when file not cached" do specify { subject.export - expect(File.file?(subject.file_name)).to be_truthy + File.file?(subject.file_name).should be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - expect(subject).not_to receive(:to_csv) + subject.should_not_receive(:to_csv) subject.export } end diff --git a/spec/models/species/search_spec.rb b/spec/models/species/search_spec.rb index 4151626563..df452c0921 100644 --- a/spec/models/species/search_spec.rb +++ b/spec/models/species/search_spec.rb @@ -5,19 +5,19 @@ context "when searching by scientific name" do context "when regular query" do subject { Species::Search.new({ :taxon_concept_query => 'canis' }).results } - specify { expect(subject).to include(@species) } + specify { subject.should include(@species) } end context "when malicious query" do subject { Species::Search.new({ :taxon_concept_query => 'canis\'' }).results } - specify { expect(subject).to be_empty } + specify { subject.should be_empty } end context "when leading whitespace" do subject { Species::Search.new({ :taxon_concept_query => ' canis' }).results } - specify { expect(subject).to include(@species) } + specify { subject.should include(@species) } end context "when trailing whitespace" do subject { Species::Search.new({ :taxon_concept_query => 'canis ' }).results } - specify { expect(subject).to include(@species) } + specify { subject.should include(@species) } end end end diff --git a/spec/models/species/species_reference_output_spec.rb b/spec/models/species/species_reference_output_spec.rb index e8ee5bce91..848e6ccc54 100644 --- a/spec/models/species/species_reference_output_spec.rb +++ b/spec/models/species/species_reference_output_spec.rb @@ -4,14 +4,14 @@ subject { Species::SpeciesReferenceOutputExport.new({}) } - specify { expect(subject.path).to eq("public/downloads/species_reference_output/") } + specify { subject.path.should == "public/downloads/species_reference_output/" } end describe :export do context "when no results" do subject { Species::SpeciesReferenceOutputExport.new({}) } - specify { expect(subject.export).to be_falsey } + specify { subject.export.should be_falsey } end context "when results" do before(:each) { @@ -31,13 +31,13 @@ context "when file not cached" do specify { subject.export - expect(File.file?(subject.file_name)).to be_truthy + File.file?(subject.file_name).should be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - expect(subject).not_to receive(:to_csv) + subject.should_not_receive(:to_csv) subject.export } end diff --git a/spec/models/species/standard_reference_output_spec.rb b/spec/models/species/standard_reference_output_spec.rb index fcd7402d09..66c60c26a4 100644 --- a/spec/models/species/standard_reference_output_spec.rb +++ b/spec/models/species/standard_reference_output_spec.rb @@ -4,14 +4,14 @@ subject { Species::StandardReferenceOutputExport.new({}) } - specify { expect(subject.path).to eq("public/downloads/standard_reference_output/") } + specify { subject.path.should == "public/downloads/standard_reference_output/" } end describe :export do context "when no results" do subject { Species::StandardReferenceOutputExport.new({}) } - specify { expect(subject.export).to be_falsey } + specify { subject.export.should be_falsey } end context "when results" do before(:each) { @@ -31,13 +31,13 @@ context "when file not cached" do specify { subject.export - expect(File.file?(subject.file_name)).to be_truthy + File.file?(subject.file_name).should be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - expect(subject).not_to receive(:to_csv) + subject.should_not_receive(:to_csv) subject.export } end diff --git a/spec/models/species/synonyms_and_trade_names_export_spec.rb b/spec/models/species/synonyms_and_trade_names_export_spec.rb index 45167fb1a7..b3af773884 100644 --- a/spec/models/species/synonyms_and_trade_names_export_spec.rb +++ b/spec/models/species/synonyms_and_trade_names_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::SynonymsAndTradeNamesExport.new({}) } - specify { expect(subject.path).to eq("public/downloads/synonyms_and_trade_names/") } + specify { subject.path.should == "public/downloads/synonyms_and_trade_names/" } end describe :export do context "when no results" do subject { Species::SynonymsAndTradeNamesExport.new({}) } - specify { expect(subject.export).to be_falsey } + specify { subject.export.should be_falsey } end context "when results" do before(:each) { @@ -37,13 +37,13 @@ context "when file not cached" do specify { subject.export - expect(File.file?(subject.file_name)).to be_truthy + File.file?(subject.file_name).should be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - expect(subject).not_to receive(:to_csv) + subject.should_not_receive(:to_csv) subject.export } end diff --git a/spec/models/species/taxon_concept_prefix_matcher_spec.rb b/spec/models/species/taxon_concept_prefix_matcher_spec.rb index c7cc511398..77070fb1ac 100644 --- a/spec/models/species/taxon_concept_prefix_matcher_spec.rb +++ b/spec/models/species/taxon_concept_prefix_matcher_spec.rb @@ -11,7 +11,7 @@ :ranks => [] }) } - specify { expect(subject.results).to include(@species_ac) } + specify { subject.results.should include(@species_ac) } end context "when searching by hyphenated common name without hyphens" do subject { @@ -20,7 +20,7 @@ :ranks => [] }) } - specify { expect(subject.results).to include(@species_ac) } + specify { subject.results.should include(@species_ac) } end context "when searching by part of hyphenated common name" do subject { @@ -29,7 +29,7 @@ :ranks => [] }) } - specify { expect(subject.results).to include(@species_ac) } + specify { subject.results.should include(@species_ac) } end end context "when searching by scientific name" do @@ -40,7 +40,7 @@ :ranks => [] }) } - specify { expect(subject.results).to include(@species_ac) } + specify { subject.results.should include(@species_ac) } end context "when malicious query" do subject { @@ -49,7 +49,7 @@ :ranks => [] }) } - specify { expect(subject.results).to be_empty } + specify { subject.results.should be_empty } end context "when leading whitespace" do subject { @@ -58,7 +58,7 @@ :ranks => [] }) } - specify { expect(subject.results).to include(@species_ac) } + specify { subject.results.should include(@species_ac) } end context "when trailing whitespace" do subject { @@ -67,7 +67,7 @@ :ranks => [] }) } - specify { expect(subject.results).to include(@species_ac) } + specify { subject.results.should include(@species_ac) } end context "when implicitly listed subspecies" do subject { @@ -76,7 +76,7 @@ :ranks => [] }) } - specify { expect(subject.results).not_to include(@subspecies2_ac) } + specify { subject.results.should_not include(@subspecies2_ac) } end context "when explicitly listed subspecies" do subject { @@ -85,7 +85,7 @@ :ranks => [] }) } - specify { expect(subject.results).to include(@subspecies1_ac) } + specify { subject.results.should include(@subspecies1_ac) } end context "when implicitly listed higher taxon (without an explicitly listed ancestor)" do subject { @@ -94,7 +94,7 @@ :ranks => [] }) } - specify { expect(subject.results).to include(@order_ac) } + specify { subject.results.should include(@order_ac) } end context "when explicitly listed higher taxon" do subject { @@ -103,7 +103,7 @@ :ranks => [] }) } - specify { expect(subject.results).to include(@family_ac) } + specify { subject.results.should include(@family_ac) } end # check ranks filtering context "when explicitly listed higher taxon but ranks expected FAMILY" do @@ -114,7 +114,7 @@ :visibility => :trade }) } - specify { expect(subject.results).to include(@family_ac) } + specify { subject.results.should include(@family_ac) } end context "when explicitly listed higher taxon but ranks expected SPECIES" do subject { @@ -124,7 +124,7 @@ :visibility => :trade }) } - specify { expect(subject.results).to be_empty } + specify { subject.results.should be_empty } end context "when searching for name that matches Species and Subspecies but ranks expected SUBSPECIES" do subject { @@ -135,8 +135,8 @@ }) } specify { - expect(subject.results).not_to include(@species_ac) - expect(subject.results).to include(@subspecies1_ac) + subject.results.should_not include(@species_ac) + subject.results.should include(@subspecies1_ac) } end end diff --git a/spec/models/species/taxon_concepts_export_spec.rb b/spec/models/species/taxon_concepts_export_spec.rb index da237b5c43..1020210648 100644 --- a/spec/models/species/taxon_concepts_export_spec.rb +++ b/spec/models/species/taxon_concepts_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::TaxonConceptsNamesExport.new({}) } - specify { expect(subject.path).to eq("public/downloads/taxon_concepts_names/") } + specify { subject.path.should == "public/downloads/taxon_concepts_names/" } end describe :export do context "when no results" do subject { Species::TaxonConceptsNamesExport.new({}) } - specify { expect(subject.export).to be_falsey } + specify { subject.export.should be_falsey } end context "when results" do before(:each) { @@ -31,13 +31,13 @@ context "when file not cached" do specify { subject.export - expect(File.file?(subject.file_name)).to be_truthy + File.file?(subject.file_name).should be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - expect(subject).not_to receive(:to_csv) + subject.should_not_receive(:to_csv) subject.export } end diff --git a/spec/models/species/trade_name_prefix_matcher_spec.rb b/spec/models/species/trade_name_prefix_matcher_spec.rb index 509f0896da..d3b6e8b598 100644 --- a/spec/models/species/trade_name_prefix_matcher_spec.rb +++ b/spec/models/species/trade_name_prefix_matcher_spec.rb @@ -36,7 +36,7 @@ :visibility => :trade }) } - specify { expect(subject.results).to include(@status_N_species_ac) } + specify { subject.results.should include(@status_N_species_ac) } end context "when trade internal visibility" do subject { @@ -46,7 +46,7 @@ :visibility => :trade_internal }) } - specify { expect(subject.results).to include(@status_N_species_ac) } + specify { subject.results.should include(@status_N_species_ac) } end context "when speciesplus visibility" do subject { @@ -55,7 +55,7 @@ :ranks => [] }) } - specify { expect(subject.results).not_to include(@status_N_species_ac) } + specify { subject.results.should_not include(@status_N_species_ac) } end end context "when searching for trade name" do @@ -67,8 +67,8 @@ :visibility => :trade }) } - specify { expect(subject.results).not_to include(@trade_name_ac) } - specify { expect(subject.results).to include(@accepted_name_ac) } + specify { subject.results.should_not include(@trade_name_ac) } + specify { subject.results.should include(@accepted_name_ac) } end context "when trade internal visibility" do subject { @@ -78,8 +78,8 @@ :visibility => :trade_internal }) } - specify { expect(subject.results).to include(@trade_name_ac) } - specify { expect(subject.results).to include(@accepted_name_ac) } + specify { subject.results.should include(@trade_name_ac) } + specify { subject.results.should include(@accepted_name_ac) } end context "when speciesplus visibility" do subject { @@ -88,8 +88,8 @@ :ranks => [] }) } - specify { expect(subject.results).not_to include(@trade_name_ac) } - specify { expect(subject.results).to include(@accepted_name_ac) } + specify { subject.results.should_not include(@trade_name_ac) } + specify { subject.results.should include(@accepted_name_ac) } end end end diff --git a/spec/models/species/visible_subspecies_search_spec.rb b/spec/models/species/visible_subspecies_search_spec.rb index 794f65a4c8..9e50bf9e3a 100644 --- a/spec/models/species/visible_subspecies_search_spec.rb +++ b/spec/models/species/visible_subspecies_search_spec.rb @@ -5,7 +5,7 @@ context "when searching by scientific name" do context "when subspecies previously listed " do subject { Species::Search.new({ :taxon_concept_query => 'canis lupus' }).results } - specify { expect(subject).to include(@subspecies) } + specify { subject.should include(@subspecies) } end end end diff --git a/spec/models/synonym_relationship_spec.rb b/spec/models/synonym_relationship_spec.rb index 82d4d1258b..8d4a5e8fff 100644 --- a/spec/models/synonym_relationship_spec.rb +++ b/spec/models/synonym_relationship_spec.rb @@ -51,15 +51,15 @@ } specify { synonymy_rel.save - expect(tc.synonyms.map(&:full_name)).to include('Lolcatus lolus') + tc.synonyms.map(&:full_name).should include('Lolcatus lolus') } specify { synonymy_rel.save another_synonymy_rel.save synonymy_rel.other_taxon_concept = another_synonym synonymy_rel.save - expect(tc.synonyms.map(&:full_name)).to include('Lolcatus lolatus') - expect(another_tc.synonyms.map(&:full_name)).to include('Lolcatus lolus') + tc.synonyms.map(&:full_name).should include('Lolcatus lolatus') + another_tc.synonyms.map(&:full_name).should include('Lolcatus lolus') } end end diff --git a/spec/models/taxon_common_spec.rb b/spec/models/taxon_common_spec.rb index d4c42137cc..8ad96fce02 100644 --- a/spec/models/taxon_common_spec.rb +++ b/spec/models/taxon_common_spec.rb @@ -57,7 +57,7 @@ another_tc_common.save tc_common.name = "Black lolcat" tc_common.save - expect(another_tc.common_names.map(&:name)).to include('Lolcat') + another_tc.common_names.map(&:name).should include('Lolcat') } end end diff --git a/spec/models/taxon_concept/agalychnis_spec.rb b/spec/models/taxon_concept/agalychnis_spec.rb index b7fcd7731c..3c2919d2c8 100644 --- a/spec/models/taxon_concept/agalychnis_spec.rb +++ b/spec/models/taxon_concept/agalychnis_spec.rb @@ -7,55 +7,55 @@ context "REFERENCES" do describe :cites_accepted do context "for class Amphibia" do - specify { expect(@klass.cites_accepted).to be_truthy } + specify { @klass.cites_accepted.should be_truthy } end context "for family Hylidae" do - specify { expect(@family.cites_accepted).to be_truthy } + specify { @family.cites_accepted.should be_truthy } end context "for genus Agalychnis" do - specify { expect(@genus.cites_accepted).to eq(false) } + specify { @genus.cites_accepted.should == false } end end describe :standard_taxon_concept_references do context "for class Amphibia" do - specify { expect(@klass.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } + specify { @klass.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } end context "for family Hylidae" do - specify { expect(@family.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } + specify { @family.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } end context "for genus Agalychnis" do - specify { expect(@genus.taxon_concept.standard_taxon_concept_references).to be_empty } + specify { @genus.taxon_concept.standard_taxon_concept_references.should be_empty } end end end context "LISTING" do describe :cites_listing do context "for genus Agalychnis" do - specify { expect(@genus.cites_listing).to eq('II') } + specify { @genus.cites_listing.should == 'II' } end end describe :eu_listing do context "for genus Agalychnis" do - specify { expect(@genus.eu_listing).to eq('B') } + specify { @genus.eu_listing.should == 'B' } end end describe :cites_listed do context "for family Hylidae" do - specify { expect(@family.cites_listed).to eq(false) } + specify { @family.cites_listed.should == false } end context "for genus Agalychnis" do - specify { expect(@genus.cites_listed).to be_truthy } + specify { @genus.cites_listed.should be_truthy } end end describe :eu_listed do context "for family Hylidae" do - specify { expect(@family.eu_listed).to eq(false) } + specify { @family.eu_listed.should == false } end context "for genus Agalychnis" do - specify { expect(@genus.eu_listed).to be_truthy } + specify { @genus.eu_listed.should be_truthy } end end diff --git a/spec/models/taxon_concept/agave_spec.rb b/spec/models/taxon_concept/agave_spec.rb index 0c062f103a..a9e918847c 100644 --- a/spec/models/taxon_concept/agave_spec.rb +++ b/spec/models/taxon_concept/agave_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context 'for species Agave parviflora' do - specify { expect(@species2.cites_listing).to eq('I') } + specify { @species2.cites_listing.should == 'I' } end context 'for species Agave arizonica' do - specify { expect(@species1.cites_listing).to eq('NC') } + specify { @species1.cites_listing.should == 'NC' } end end describe :cites_listed do context "for species Agave parviflora" do - specify { expect(@species2.cites_listed).to be_truthy } + specify { @species2.cites_listed.should be_truthy } end context "for species Agave arizonica" do - specify { expect(@species1.cites_listed).to be_nil } + specify { @species1.cites_listed.should be_nil } end end describe :cites_show do context "for species Agave parviflora" do - specify { expect(@species2.cites_show).to be_truthy } + specify { @species2.cites_show.should be_truthy } end context "for species Agave arizonica" do - specify { expect(@species1.cites_show).to be_falsey } + specify { @species1.cites_show.should be_falsey } end end describe :eu_listing do context 'for species Agave parviflora' do - specify { expect(@species2.eu_listing).to eq('A') } + specify { @species2.eu_listing.should == 'A' } end context 'for species Agave arizonica' do - specify { expect(@species1.eu_listing).to eq('NC') } + specify { @species1.eu_listing.should == 'NC' } end end describe :eu_listed do context "for species Agave parviflora" do - specify { expect(@species2.eu_listed).to be_truthy } + specify { @species2.eu_listed.should be_truthy } end context "for species Agave arizonica" do - specify { expect(@species1.eu_listed).to be_nil } + specify { @species1.eu_listed.should be_nil } end end describe :eu_show do context "for species Agave parviflora" do - specify { expect(@species2.eu_show).to be_truthy } + specify { @species2.eu_show.should be_truthy } end context "for species Agave arizonica" do - specify { expect(@species1.eu_show).to be_falsey } + specify { @species1.eu_show.should be_falsey } end end diff --git a/spec/models/taxon_concept/ailuropoda_spec.rb b/spec/models/taxon_concept/ailuropoda_spec.rb index 61a1b5bc01..29fba6f47d 100644 --- a/spec/models/taxon_concept/ailuropoda_spec.rb +++ b/spec/models/taxon_concept/ailuropoda_spec.rb @@ -7,37 +7,37 @@ context "LISTING" do describe :cites_listing do context "for species Ailuropoda melanoleuca" do - specify { expect(@species.cites_listing).to eq('I') } + specify { @species.cites_listing.should == 'I' } end context "for genus level Ailuropoda" do - specify { expect(@genus.cites_listing).to eq('I') } + specify { @genus.cites_listing.should == 'I' } end end describe :eu_listing do context "for species Ailuropoda melanoleuca" do - specify { expect(@species.eu_listing).to eq('A') } + specify { @species.eu_listing.should == 'A' } end context "for genus level Ailuropoda" do - specify { expect(@genus.eu_listing).to eq('A') } + specify { @genus.eu_listing.should == 'A' } end end describe :cites_listed do context "for genus Ailuropoda" do - specify { expect(@genus.cites_listed).to be_falsey } + specify { @genus.cites_listed.should be_falsey } end context "for species Ailuropoda melanoleuca" do - specify { expect(@species.cites_listed).to be_truthy } + specify { @species.cites_listed.should be_truthy } end end describe :eu_listed do context "for genus Ailuropoda" do - specify { expect(@genus.eu_listed).to be_falsey } + specify { @genus.eu_listed.should be_falsey } end context "for species Ailuropoda melanoleuca" do - specify { expect(@species.eu_listed).to be_truthy } + specify { @species.eu_listed.should be_truthy } end end diff --git a/spec/models/taxon_concept/arctocephalus_spec.rb b/spec/models/taxon_concept/arctocephalus_spec.rb index 332050df5d..a807914721 100644 --- a/spec/models/taxon_concept/arctocephalus_spec.rb +++ b/spec/models/taxon_concept/arctocephalus_spec.rb @@ -7,37 +7,37 @@ context "LISTING" do describe :cites_listing do it "should be II at species level Arctocephalus australis" do - expect(@species1.cites_listing).to eq('II') + @species1.cites_listing.should == 'II' end it "should be I at species level Arctocephalus townsendi" do - expect(@species2.cites_listing).to eq('I') + @species2.cites_listing.should == 'I' end it "should be I/II at genus level Arctocephalus" do - expect(@genus.cites_listing).to eq('I/II') + @genus.cites_listing.should == 'I/II' end end describe :cites_listed do it "should be true for genus Arctocephalus" do - expect(@genus.cites_listed).to be_truthy + @genus.cites_listed.should be_truthy end it "should be true for species Arctocephalus townsendi" do - expect(@species2.cites_listed).to be_truthy + @species2.cites_listed.should be_truthy end it "should be false for species Arctocephalus australis (inclusion in higher taxa listing)" do - expect(@species1.cites_listed).to eq(false) + @species1.cites_listed.should == false end end describe :eu_listed do it "should be true for genus Arctocephalus" do - expect(@genus.eu_listed).to be_truthy + @genus.eu_listed.should be_truthy end it "should be true for species Arctocephalus townsendi" do - expect(@species2.eu_listed).to be_truthy + @species2.eu_listed.should be_truthy end it "should be false for species Arctocephalus australis (inclusion in higher taxa listing)" do - expect(@species1.eu_listed).to eq(false) + @species1.eu_listed.should == false end end diff --git a/spec/models/taxon_concept/boa_constrictor_spec.rb b/spec/models/taxon_concept/boa_constrictor_spec.rb index 217c8d50b1..8d1ba024e4 100644 --- a/spec/models/taxon_concept/boa_constrictor_spec.rb +++ b/spec/models/taxon_concept/boa_constrictor_spec.rb @@ -6,25 +6,25 @@ context "TAXONOMY" do describe :full_name do context "for subspecies Boa constrictor occidentalis" do - specify { expect(@subspecies1.full_name).to eq('Boa constrictor occidentalis') } + specify { @subspecies1.full_name.should == 'Boa constrictor occidentalis' } end context "for species Boa constrictor" do - specify { expect(@species.full_name).to eq('Boa constrictor') } + specify { @species.full_name.should == 'Boa constrictor' } end context "for genus Boa" do - specify { expect(@genus.full_name).to eq('Boa') } + specify { @genus.full_name.should == 'Boa' } end end describe :ancestors do context "family" do - specify { expect(@species.family_name).to eq('Boidae') } + specify { @species.family_name.should == 'Boidae' } end context "order" do - specify { expect(@species.order_name).to eq('Serpentes') } + specify { @species.order_name.should == 'Serpentes' } end context "class" do - specify { expect(@species.class_name).to eq('Reptilia') } + specify { @species.class_name.should == 'Reptilia' } end end end @@ -32,127 +32,127 @@ context "LISTING" do describe :cites_listing do context "for subspecies Boa constrictor occidentalis" do - specify { expect(@subspecies1.cites_listing).to eq('I') } + specify { @subspecies1.cites_listing.should == 'I' } end context "for subspecies Boa constrictor constrictor" do - specify { expect(@subspecies2.cites_listing).to eq('II') } + specify { @subspecies2.cites_listing.should == 'II' } end context "for species Boa constrictor" do - specify { expect(@species.cites_listing).to eq('I/II') } + specify { @species.cites_listing.should == 'I/II' } end end describe :eu_listing do context "for subspecies Boa constrictor occidentalis" do - specify { expect(@subspecies1.eu_listing).to eq('A') } + specify { @subspecies1.eu_listing.should == 'A' } end context "for subspecies Boa constrictor constrictor" do - specify { expect(@subspecies2.eu_listing).to eq('B') } + specify { @subspecies2.eu_listing.should == 'B' } end context "for species Boa constrictor" do - specify { expect(@species.eu_listing).to eq('A/B') } + specify { @species.eu_listing.should == 'A/B' } end end describe :cites_listed do context "for family Boidae" do - specify { expect(@family.cites_listed).to be_truthy } + specify { @family.cites_listed.should be_truthy } end context "for genus Boa" do - specify { expect(@genus.cites_listed).to eq(false) } + specify { @genus.cites_listed.should == false } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { expect(@species.cites_listed).to eq(false) } + specify { @species.cites_listed.should == false } end context "for subspecies Boa constrictor occidentalis" do - specify { expect(@subspecies1.cites_listed).to be_truthy } + specify { @subspecies1.cites_listed.should be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { expect(@subspecies2.cites_listed).to be_falsey } + specify { @subspecies2.cites_listed.should be_falsey } end end describe :cites_show do context "for family Boidae" do - specify { expect(@family.cites_show).to be_truthy } + specify { @family.cites_show.should be_truthy } end context "for genus Boa" do - specify { expect(@genus.cites_show).to be_truthy } + specify { @genus.cites_show.should be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { expect(@species.cites_show).to be_truthy } + specify { @species.cites_show.should be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { expect(@subspecies1.cites_show).to be_truthy } + specify { @subspecies1.cites_show.should be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { expect(@subspecies2.cites_show).to be_falsey } + specify { @subspecies2.cites_show.should be_falsey } end end describe :cites_listed_descendants do context "for family Boidae" do - specify { expect(@family.cites_listed_descendants).to be_truthy } + specify { @family.cites_listed_descendants.should be_truthy } end context "for genus Boa" do - specify { expect(@genus.cites_listed_descendants).to be_truthy } + specify { @genus.cites_listed_descendants.should be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { expect(@species.cites_listed_descendants).to be_truthy } + specify { @species.cites_listed_descendants.should be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { expect(@subspecies1.cites_listed_descendants).to be_falsey } + specify { @subspecies1.cites_listed_descendants.should be_falsey } end end describe :eu_listed do context "for family Boidae" do - specify { expect(@family.eu_listed).to be_truthy } + specify { @family.eu_listed.should be_truthy } end context "for genus Boa" do - specify { expect(@genus.eu_listed).to eq(false) } + specify { @genus.eu_listed.should == false } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { expect(@species.eu_listed).to eq(false) } + specify { @species.eu_listed.should == false } end context "for subspecies Boa constrictor occidentalis" do - specify { expect(@subspecies1.eu_listed).to be_truthy } + specify { @subspecies1.eu_listed.should be_truthy } end end describe :show_in_species_plus_ac do context "for family Boidae" do - specify { expect(@family_ac.show_in_species_plus_ac).to be_truthy } + specify { @family_ac.show_in_species_plus_ac.should be_truthy } end context "for genus Boa" do - specify { expect(@genus_ac.show_in_species_plus_ac).to be_truthy } + specify { @genus_ac.show_in_species_plus_ac.should be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { expect(@species_ac.show_in_species_plus_ac).to be_truthy } + specify { @species_ac.show_in_species_plus_ac.should be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { expect(@subspecies1_ac.show_in_species_plus_ac).to be_truthy } + specify { @subspecies1_ac.show_in_species_plus_ac.should be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { expect(@subspecies2_ac.show_in_species_plus_ac).to be_falsey } + specify { @subspecies2_ac.show_in_species_plus_ac.should be_falsey } end end describe :show_in_checklist_ac do context "for family Boidae" do - specify { expect(@family_ac.show_in_checklist_ac).to be_truthy } + specify { @family_ac.show_in_checklist_ac.should be_truthy } end context "for genus Boa" do - specify { expect(@genus_ac.show_in_checklist_ac).to be_truthy } + specify { @genus_ac.show_in_checklist_ac.should be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { expect(@species_ac.show_in_checklist_ac).to be_truthy } + specify { @species_ac.show_in_checklist_ac.should be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { expect(@subspecies1_ac.show_in_checklist_ac).to be_truthy } + specify { @subspecies1_ac.show_in_checklist_ac.should be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { expect(@subspecies2_ac.show_in_checklist_ac).to be_falsey } + specify { @subspecies2_ac.show_in_checklist_ac.should be_falsey } end end diff --git a/spec/models/taxon_concept/caiman_latirostris_spec.rb b/spec/models/taxon_concept/caiman_latirostris_spec.rb index 330611fc76..08a15c1bed 100644 --- a/spec/models/taxon_concept/caiman_latirostris_spec.rb +++ b/spec/models/taxon_concept/caiman_latirostris_spec.rb @@ -7,12 +7,12 @@ context "TAXONOMY" do describe :full_name do context "for species synonym Alligator cynocephalus" do - specify { expect(@species1.full_name).to eq('Alligator cynocephalus') } + specify { @species1.full_name.should == 'Alligator cynocephalus' } end end describe :rank_name do context "for species synonym Alligator cynocephalus" do - specify { expect(@species1.rank_name).to eq(Rank::SPECIES) } + specify { @species1.rank_name.should == Rank::SPECIES } end end end @@ -20,88 +20,88 @@ context "REFERENCES" do describe :cites_accepted do context 'for species Caiman latirostris' do - specify { expect(@species.cites_accepted).to be_truthy } + specify { @species.cites_accepted.should be_truthy } end context "for synonym species Alligator cynocephalus" do - specify { expect(@species1.cites_accepted).to eq(false) } + specify { @species1.cites_accepted.should == false } end end describe :standard_taxon_concept_references do context 'for species Caiman latirostris' do - specify { expect(@species.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } + specify { @species.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } end end end context "LISTING" do describe :cites_listing do context 'for species Caiman latirostris' do - specify { expect(@species.cites_listing).to eq('I/II') } + specify { @species.cites_listing.should == 'I/II' } end end describe :eu_listing do context 'for species Caiman latirostris' do - specify { expect(@species.eu_listing).to eq('A/B') } + specify { @species.eu_listing.should == 'A/B' } end end describe :cites_listed do context 'for order Crocodylia' do - specify { expect(@order.cites_listed).to be_truthy } + specify { @order.cites_listed.should be_truthy } end context "for family Alligatoridae" do - specify { expect(@family.cites_listed).to eq(false) } + specify { @family.cites_listed.should == false } end context "for genus Caiman" do - specify { expect(@genus.cites_listed).to eq(false) } + specify { @genus.cites_listed.should == false } end context "for species Caiman latoristris" do - specify { expect(@species.cites_listed).to be_truthy } + specify { @species.cites_listed.should be_truthy } end end describe :eu_listed do context 'for order Crocodylia' do - specify { expect(@order.eu_listed).to be_truthy } + specify { @order.eu_listed.should be_truthy } end context "for family Alligatoridae" do - specify { expect(@family.eu_listed).to eq(false) } + specify { @family.eu_listed.should == false } end context "for genus Caiman" do - specify { expect(@genus.eu_listed).to eq(false) } + specify { @genus.eu_listed.should == false } end context "for species Caiman latoristris" do - specify { expect(@species.eu_listed).to be_truthy } + specify { @species.eu_listed.should be_truthy } end end describe :cites_show do context "for order Crocodylia" do - specify { expect(@order.cites_show).to be_truthy } + specify { @order.cites_show.should be_truthy } end context "for family Alligatoridae" do - specify { expect(@family.cites_show).to be_truthy } + specify { @family.cites_show.should be_truthy } end context "for genus Caiman" do - specify { expect(@genus.cites_show).to be_truthy } + specify { @genus.cites_show.should be_truthy } end context "for species Caiman latoristris" do - specify { expect(@species.cites_show).to be_truthy } + specify { @species.cites_show.should be_truthy } end context "for synonym species Alligator cynocephalus" do - specify { expect(@species1.cites_show).to be_falsey } + specify { @species1.cites_show.should be_falsey } end end describe :ann_symbol do context "for species Caiman latirostris" do - specify { expect(@species.ann_symbol).not_to be_blank } + specify { @species.ann_symbol.should_not be_blank } end end describe :hash_ann_symbol do context "for species Caiman latirostris" do - specify { expect(@species.hash_ann_symbol).to be_blank } + specify { @species.hash_ann_symbol.should be_blank } end end diff --git a/spec/models/taxon_concept/canis_lupus_spec.rb b/spec/models/taxon_concept/canis_lupus_spec.rb index 1a40c03b8c..42ca0e59c8 100644 --- a/spec/models/taxon_concept/canis_lupus_spec.rb +++ b/spec/models/taxon_concept/canis_lupus_spec.rb @@ -6,55 +6,55 @@ context "LISTING" do describe :cites_listing do context "for species Canis lupus (population split listing)" do - specify { expect(@species.cites_listing).to eq('I/II') } + specify { @species.cites_listing.should == 'I/II' } end end describe :eu_listing do context "for species Canis lupus (population split listing)" do - specify { expect(@species.eu_listing).to eq('A/B') } + specify { @species.eu_listing.should == 'A/B' } end end describe :cites_listed do context "for species Canis lupus" do - specify { expect(@species.cites_listed).to be_truthy } + specify { @species.cites_listed.should be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { expect(@subspecies.cites_listed).to be_blank } + specify { @subspecies.cites_listed.should be_blank } end end describe :eu_listed do context "for species Canis lupus" do - specify { expect(@species.eu_listed).to be_truthy } + specify { @species.eu_listed.should be_truthy } end end describe :show_in_species_plus_ac do context "for species Canis lupus" do - specify { expect(@species_ac.show_in_species_plus_ac).to be_truthy } + specify { @species_ac.show_in_species_plus_ac.should be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { expect(@subspecies_ac.show_in_species_plus_ac).to be_truthy } + specify { @subspecies_ac.show_in_species_plus_ac.should be_truthy } end end describe :show_in_checklist_ac do context "for species Canis lupus" do - specify { expect(@species_ac.show_in_checklist_ac).to be_truthy } + specify { @species_ac.show_in_checklist_ac.should be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { expect(@subspecies_ac.show_in_checklist_ac).to be_falsey } + specify { @subspecies_ac.show_in_checklist_ac.should be_falsey } end end describe :show_in_species_plus do context "for species Canis lupus" do - specify { expect(@species.show_in_species_plus).to be_truthy } + specify { @species.show_in_species_plus.should be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { expect(@subspecies.show_in_species_plus).to be_truthy } + specify { @subspecies.show_in_species_plus.should be_truthy } end end diff --git a/spec/models/taxon_concept/caretta_caretta_cms_spec.rb b/spec/models/taxon_concept/caretta_caretta_cms_spec.rb index 2e81a42e86..08a742787d 100644 --- a/spec/models/taxon_concept/caretta_caretta_cms_spec.rb +++ b/spec/models/taxon_concept/caretta_caretta_cms_spec.rb @@ -7,19 +7,19 @@ context "LISTING" do describe :cms_listing do context "for family Cheloniidae" do - specify { expect(@family.cms_listing).to eq('I/II') } + specify { @family.cms_listing.should == 'I/II' } end context "for species Caretta caretta" do - specify { expect(@species.cms_listing).to eq('I/II') } + specify { @species.cms_listing.should == 'I/II' } end end describe :cms_listed do context "for family Cheloniidae" do - specify { expect(@family.cms_listed).to be_truthy } + specify { @family.cms_listed.should be_truthy } end context "for species Caretta caretta" do - specify { expect(@species.cms_listed).to be_truthy } + specify { @species.cms_listed.should be_truthy } end end end @@ -28,12 +28,12 @@ describe :current_cms_additions do context "for family Cheloniidae" do specify { - expect(@family.current_cms_additions.size).to eq(1) + @family.current_cms_additions.size.should == 1 } end context "for species Caretta caretta" do specify { - expect(@species.current_cms_additions.size).to eq(2) + @species.current_cms_additions.size.should == 2 } end end diff --git a/spec/models/taxon_concept/cedrela_montana_spec.rb b/spec/models/taxon_concept/cedrela_montana_spec.rb index 9a51e135ca..97454159f6 100644 --- a/spec/models/taxon_concept/cedrela_montana_spec.rb +++ b/spec/models/taxon_concept/cedrela_montana_spec.rb @@ -7,37 +7,37 @@ context "LISTING" do describe :cites_listing do context 'for species Cedrela montana' do - specify { expect(@species.cites_listing).to be_blank } + specify { @species.cites_listing.should be_blank } end end describe :cites_listed do context "for species Cedrela montana" do - specify { expect(@species.cites_listed).to be_nil } + specify { @species.cites_listed.should be_nil } end end describe :cites_show do context "for species Cedrela montana" do - specify { expect(@species.cites_show).to be_falsey } + specify { @species.cites_show.should be_falsey } end end describe :eu_listing do context 'for species Cedrela montana' do - specify { expect(@species.eu_listing).to eq('D') } + specify { @species.eu_listing.should == 'D' } end end describe :eu_listed do context "for species Cedrela montana" do - specify { expect(@species.eu_listed).to be_truthy } + specify { @species.eu_listed.should be_truthy } end end describe :eu_show do context "for species Cedrela montana" do - specify { expect(@species.eu_show).to be_truthy } + specify { @species.eu_show.should be_truthy } end end diff --git a/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb b/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb index 2812829f94..1a80fcec4b 100644 --- a/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb +++ b/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb @@ -7,31 +7,31 @@ context "LISTING" do describe :cms_listing do context "for species Cervus elaphus" do - specify { expect(@species.cms_listing).to eq('I/II') } + specify { @species.cms_listing.should == 'I/II' } end context "for subspecies Cervus elaphus bactrianus" do - specify { expect(@subspecies1.cms_listing).to eq('I/II') } + specify { @subspecies1.cms_listing.should == 'I/II' } end context "for subspecies Cervus elaphus barbarus" do - specify { expect(@subspecies2.cms_listing).to eq('I/II') } + specify { @subspecies2.cms_listing.should == 'I/II' } end end describe :show_in_species_plus_ac do context "for subspecies Cervus elaphus bactrianus (instrument)" do - specify { expect(@subspecies1_ac.show_in_species_plus_ac).to be_truthy } + specify { @subspecies1_ac.show_in_species_plus_ac.should be_truthy } end context "for subspecies Cervus elaphus barbarus (listing)" do - specify { expect(@subspecies2_ac.show_in_species_plus_ac).to be_truthy } + specify { @subspecies2_ac.show_in_species_plus_ac.should be_truthy } end end describe :show_in_species_plus do context "for subspecies Cervus elaphus bactrianus (instrument)" do - specify { expect(@subspecies1.show_in_species_plus).to be_truthy } + specify { @subspecies1.show_in_species_plus.should be_truthy } end context "for subspecies Cervus elaphus barbarus (listing)" do - specify { expect(@subspecies2.show_in_species_plus).to be_truthy } + specify { @subspecies2.show_in_species_plus.should be_truthy } end end diff --git a/spec/models/taxon_concept/cervus_elaphus_spec.rb b/spec/models/taxon_concept/cervus_elaphus_spec.rb index 4dca68a802..88692a0672 100644 --- a/spec/models/taxon_concept/cervus_elaphus_spec.rb +++ b/spec/models/taxon_concept/cervus_elaphus_spec.rb @@ -7,13 +7,13 @@ context "TAXONOMY" do describe :full_name do context "for subspecies Cervus elaphus bactrianus" do - specify { expect(@subspecies1.full_name).to eq('Cervus elaphus bactrianus') } + specify { @subspecies1.full_name.should == 'Cervus elaphus bactrianus' } end context "for species Cervus elaphus" do - specify { expect(@species.full_name).to eq('Cervus elaphus') } + specify { @species.full_name.should == 'Cervus elaphus' } end context "for genus Cervus" do - specify { expect(@genus.full_name).to eq('Cervus') } + specify { @genus.full_name.should == 'Cervus' } end end end @@ -21,100 +21,100 @@ context "LISTING" do describe :cites_listing do context "for species Cervus elaphus" do - specify { expect(@species.cites_listing).to eq('I/II/III/NC') } + specify { @species.cites_listing.should == 'I/II/III/NC' } end context "for subspecies Cervus elaphus bactrianus" do - specify { expect(@subspecies1.cites_listing).to eq('II') } + specify { @subspecies1.cites_listing.should == 'II' } end context "for subspecies Cervus elaphus barbarus" do - specify { expect(@subspecies2.cites_listing).to eq('III') } + specify { @subspecies2.cites_listing.should == 'III' } end context "for subspecies Cervus elaphus hanglu" do - specify { expect(@subspecies3.cites_listing).to eq('I') } + specify { @subspecies3.cites_listing.should == 'I' } end context "for subspecies Cervus elaphus canadensis" do - specify { expect(@subspecies4.cites_listing).to eq('NC') } + specify { @subspecies4.cites_listing.should == 'NC' } end end describe :eu_listing do context "for species Cervus elaphus" do - specify { expect(@species.eu_listing).to eq('A/B/C/NC') } + specify { @species.eu_listing.should == 'A/B/C/NC' } end context "for subspecies Cervus elaphus bactrianus" do - specify { expect(@subspecies1.eu_listing).to eq('B') } + specify { @subspecies1.eu_listing.should == 'B' } end context "for subspecies Cervus elaphus barbarus" do - specify { expect(@subspecies2.eu_listing).to eq('C') } + specify { @subspecies2.eu_listing.should == 'C' } end context "for subspecies Cervus elaphus hanglu" do - specify { expect(@subspecies3.eu_listing).to eq('A') } + specify { @subspecies3.eu_listing.should == 'A' } end context "for subspecies Cervus elaphus canadensis" do - specify { expect(@subspecies4.eu_listing).to eq('NC') } + specify { @subspecies4.eu_listing.should == 'NC' } end end describe :cites_listed do context "for order Artiodactyla" do - specify { expect(@order.cites_listed).to eq(false) } + specify { @order.cites_listed.should == false } end context "for family Cervidae" do - specify { expect(@family.cites_listed).to eq(false) } + specify { @family.cites_listed.should == false } end context "for genus Cervus" do - specify { expect(@genus.cites_listed).to eq(false) } + specify { @genus.cites_listed.should == false } end context "for species Cervus elaphus" do - specify { expect(@species.cites_listed).to eq(false) } + specify { @species.cites_listed.should == false } end context "for subspecies Cervus elaphus bactrianus" do - specify { expect(@subspecies1.cites_listed).to be_truthy } + specify { @subspecies1.cites_listed.should be_truthy } end context "for subspecies Cervus elaphus barbarus" do - specify { expect(@subspecies2.cites_listed).to be_truthy } + specify { @subspecies2.cites_listed.should be_truthy } end context "for subspecies Cervus elaphus hanglu" do - specify { expect(@subspecies3.cites_listed).to be_truthy } + specify { @subspecies3.cites_listed.should be_truthy } end context "for subspecies Cervus elaphus canadensis" do - specify { expect(@subspecies4.cites_listed).to be_blank } + specify { @subspecies4.cites_listed.should be_blank } end end describe :eu_listed do context "for order Artiodactyla" do - specify { expect(@order.eu_listed).to eq(false) } + specify { @order.eu_listed.should == false } end context "for family Cervidae" do - specify { expect(@family.eu_listed).to eq(false) } + specify { @family.eu_listed.should == false } end context "for genus Cervus" do - specify { expect(@genus.eu_listed).to eq(false) } + specify { @genus.eu_listed.should == false } end context "for species Cervus elaphus" do - specify { expect(@species.eu_listed).to eq(false) } + specify { @species.eu_listed.should == false } end context "for subspecies Cervus elaphus bactrianus" do - specify { expect(@subspecies1.eu_listed).to be_truthy } + specify { @subspecies1.eu_listed.should be_truthy } end context "for subspecies Cervus elaphus barbarus" do - specify { expect(@subspecies2.eu_listed).to be_truthy } + specify { @subspecies2.eu_listed.should be_truthy } end context "for subspecies Cervus elaphus hanglu" do - specify { expect(@subspecies3.eu_listed).to be_truthy } + specify { @subspecies3.eu_listed.should be_truthy } end context "for subspecies Cervus elaphus canadensis" do - specify { expect(@subspecies4.eu_listed).to be_blank } + specify { @subspecies4.eu_listed.should be_blank } end end describe :cites_show do context "for subspecies Cervus elaphus hanglu" do - specify { expect(@subspecies3.cites_show).to be_truthy } + specify { @subspecies3.cites_show.should be_truthy } end context "for subspecies Cervus elaphus canadensis" do - specify { expect(@subspecies4.cites_show).to be_falsey } + specify { @subspecies4.cites_show.should be_falsey } end end diff --git a/spec/models/taxon_concept/colophon_spec.rb b/spec/models/taxon_concept/colophon_spec.rb index b77571f19d..8d11ce398d 100644 --- a/spec/models/taxon_concept/colophon_spec.rb +++ b/spec/models/taxon_concept/colophon_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context "for genus Colophon" do - specify { expect(@genus.cites_listing).to eq('III') } + specify { @genus.cites_listing.should == 'III' } end context "for species Colophon barnardi" do - specify { expect(@species.cites_listing).to eq('III') } + specify { @species.cites_listing.should == 'III' } end end describe :eu_listing do context "for genus Colophon" do - specify { expect(@genus.eu_listing).to eq('C') } + specify { @genus.eu_listing.should == 'C' } end context "for species Colophon barnardi" do - specify { expect(@species.eu_listing).to eq('C') } + specify { @species.eu_listing.should == 'C' } end end describe :cites_listed do context "for genus Colophon" do - specify { expect(@genus.cites_listed).to eq(true) } + specify { @genus.cites_listed.should == true } end context "for species Colophon barnardi" do - specify { expect(@species.cites_listed).to eq(false) } + specify { @species.cites_listed.should == false } end end describe :eu_listed do context "for genus Colophon" do - specify { expect(@genus.eu_listed).to eq(true) } + specify { @genus.eu_listed.should == true } end context "for species Colophon barnardi" do - specify { expect(@species.eu_listed).to eq(false) } + specify { @species.eu_listed.should == false } end end describe :cites_show do context "for order Coleoptera" do - specify { expect(@order.cites_show).to be_falsey } + specify { @order.cites_show.should be_falsey } end context "for family Lucanidae" do - specify { expect(@family.cites_show).to be_falsey } + specify { @family.cites_show.should be_falsey } end end describe :current_party_ids do context "for genus Colophon" do - specify { expect(@genus.current_parties_ids).to eq([GeoEntity.find_by_iso_code2('ZA').id]) } + specify { @genus.current_parties_ids.should == [GeoEntity.find_by_iso_code2('ZA').id] } end context "for species Colophon barnardi" do - specify { expect(@species.current_parties_ids).to eq([GeoEntity.find_by_iso_code2('ZA').id]) } + specify { @species.current_parties_ids.should == [GeoEntity.find_by_iso_code2('ZA').id] } end end diff --git a/spec/models/taxon_concept/dalbergia_spec.rb b/spec/models/taxon_concept/dalbergia_spec.rb index 8640fc958b..74927a9c2d 100644 --- a/spec/models/taxon_concept/dalbergia_spec.rb +++ b/spec/models/taxon_concept/dalbergia_spec.rb @@ -7,28 +7,28 @@ context "LISTING" do describe :cites_listing do context 'for species Dalbergia abbreviata' do - specify { expect(@species1.cites_listing).to eq('NC') } + specify { @species1.cites_listing.should == 'NC' } end context 'for species Dalbergia abrahamii' do - specify { expect(@species2.cites_listing).to eq('II') } + specify { @species2.cites_listing.should == 'II' } end end describe :cites_listed do context "for species Dalbergia abbreviata" do - specify { expect(@species1.cites_listed).to be_nil } + specify { @species1.cites_listed.should be_nil } end context "for species Dalbergia abrahamii" do - specify { expect(@species2.cites_listed).to eq(false) } + specify { @species2.cites_listed.should == false } end end describe :cites_show do context "for species Dalbergia abbreviata" do - specify { expect(@species1.cites_show).to be_falsey } + specify { @species1.cites_show.should be_falsey } end context "for species Dalbergia abrahamii" do - specify { expect(@species2.cites_show).to be_truthy } + specify { @species2.cites_show.should be_truthy } end end end diff --git a/spec/models/taxon_concept/destroy_spec.rb b/spec/models/taxon_concept/destroy_spec.rb index 215de976f2..87c9103adf 100644 --- a/spec/models/taxon_concept/destroy_spec.rb +++ b/spec/models/taxon_concept/destroy_spec.rb @@ -5,63 +5,63 @@ context "general" do before(:each) { @taxon_concept = create_cms_species } context "when no dependent objects attached" do - specify { expect(@taxon_concept.destroy).to be_truthy } + specify { @taxon_concept.destroy.should be_truthy } end context "when distributions" do before(:each) { create(:distribution, :taxon_concept => @taxon_concept) } - specify { expect(@taxon_concept.destroy).to be_truthy } + specify { @taxon_concept.destroy.should be_truthy } end context "when common names" do before(:each) { create(:taxon_common, :taxon_concept => @taxon_concept) } - specify { expect(@taxon_concept.destroy).to be_truthy } + specify { @taxon_concept.destroy.should be_truthy } end context "when references" do before(:each) { create(:taxon_concept_reference, :taxon_concept => @taxon_concept) } - specify { expect(@taxon_concept.destroy).to be_truthy } + specify { @taxon_concept.destroy.should be_truthy } end context "when document citations" do before(:each) do create(:document_citation_taxon_concept, taxon_concept: @taxon_concept) end - specify { expect(@taxon_concept.destroy).to be_falsey } + specify { @taxon_concept.destroy.should be_falsey } end end context "CMS" do before(:each) { @taxon_concept = create_cms_species } context "when taxon instruments" do before(:each) { create(:taxon_instrument, :taxon_concept => @taxon_concept) } - specify { expect(@taxon_concept.destroy).to be_falsey } + specify { @taxon_concept.destroy.should be_falsey } end end context "CITES / EU" do before(:each) { @taxon_concept = create_cites_eu_species } context "when listing changes" do before(:each) { create_cites_I_addition(:taxon_concept => @taxon_concept) } - specify { expect(@taxon_concept.destroy).to be_falsey } + specify { @taxon_concept.destroy.should be_falsey } end context "when CITES quotas" do before(:each) { create(:quota, :taxon_concept => @taxon_concept, :geo_entity => create(:geo_entity)) } - specify { expect(@taxon_concept.destroy).to be_falsey } + specify { @taxon_concept.destroy.should be_falsey } end context "when CITES suspensions" do before(:each) { create(:cites_suspension, :taxon_concept => @taxon_concept, :start_notification => create(:cites_suspension_notification, :designation => cites)) } - specify { expect(@taxon_concept.destroy).to be_falsey } + specify { @taxon_concept.destroy.should be_falsey } end context "when EU opinions" do before(:each) { create(:eu_opinion, :taxon_concept => @taxon_concept, start_event: create(:ec_srg)) } - specify { expect(@taxon_concept.destroy).to be_falsey } + specify { @taxon_concept.destroy.should be_falsey } end context "when EU suspensions" do before(:each) { create(:eu_suspension, :taxon_concept => @taxon_concept) } - specify { expect(@taxon_concept.destroy).to be_falsey } + specify { @taxon_concept.destroy.should be_falsey } end context "when shipments" do before(:each) { create(:shipment, :taxon_concept => @taxon_concept) } - specify { expect(@taxon_concept.destroy).to be_falsey } + specify { @taxon_concept.destroy.should be_falsey } end context "when reported shipments" do before(:each) { create(:shipment, :reported_taxon_concept => @taxon_concept) } - specify { expect(@taxon_concept.destroy).to be_falsey } + specify { @taxon_concept.destroy.should be_falsey } end end end diff --git a/spec/models/taxon_concept/diospyros_spec.rb b/spec/models/taxon_concept/diospyros_spec.rb index 1585b3acbf..d85c1ed0fc 100644 --- a/spec/models/taxon_concept/diospyros_spec.rb +++ b/spec/models/taxon_concept/diospyros_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context 'for species Diospyros aculeata' do - specify { expect(@species1.cites_listing).to eq('II') } + specify { @species1.cites_listing.should == 'II' } end context 'for species Diospyros acuta' do - specify { expect(@species2.cites_listing).to eq('NC') } + specify { @species2.cites_listing.should == 'NC' } end end describe :cites_listed do context "for species Diospyros aculeata" do - specify { expect(@species1.cites_listed).to eq(false) } + specify { @species1.cites_listed.should == false } end context "for species Diospyros acuta" do - specify { expect(@species2.cites_listed).to be_nil } + specify { @species2.cites_listed.should be_nil } end end describe :cites_show do context "for species Diospyros aculeata" do - specify { expect(@species1.cites_show).to be_truthy } + specify { @species1.cites_show.should be_truthy } end context "for species Diospyros acuta" do - specify { expect(@species2.cites_show).to be_falsey } + specify { @species2.cites_show.should be_falsey } end end describe :eu_listing do context 'for species Diospyros aculeata' do - specify { expect(@species1.eu_listing).to eq('B') } + specify { @species1.eu_listing.should == 'B' } end context 'for species Diospyros acuta' do - specify { expect(@species2.eu_listing).to eq('NC') } + specify { @species2.eu_listing.should == 'NC' } end end describe :eu_listed do context "for species Diospyros aculeata" do - specify { expect(@species1.eu_listed).to eq(false) } + specify { @species1.eu_listed.should == false } end context "for species Diospyros acuta" do - specify { expect(@species2.eu_listed).to be_nil } + specify { @species2.eu_listed.should be_nil } end end describe :eu_show do context "for species Diospyros aculeata" do - specify { expect(@species1.eu_show).to be_truthy } + specify { @species1.eu_show.should be_truthy } end context "for species Diospyros acuta" do - specify { expect(@species2.eu_show).to be_falsey } + specify { @species2.eu_show.should be_falsey } end end diff --git a/spec/models/taxon_concept/falconiformes_spec.rb b/spec/models/taxon_concept/falconiformes_spec.rb index 75cebe94a6..ff958a5859 100644 --- a/spec/models/taxon_concept/falconiformes_spec.rb +++ b/spec/models/taxon_concept/falconiformes_spec.rb @@ -7,7 +7,7 @@ context "TAXONOMY" do describe :rank_name do context "for Falco hybrid" do - specify { expect(@hybrid.rank_name).to eq(Rank::GENUS) } + specify { @hybrid.rank_name.should == Rank::GENUS } end end end @@ -15,124 +15,124 @@ context "LISTING" do describe :cites_listing do context "for order Falconiformes" do - specify { expect(@order.cites_listing).to eq('I/II/III/NC') } + specify { @order.cites_listing.should == 'I/II/III/NC' } end context "for species Falco araea" do - specify { expect(@species2_1.cites_listing).to eq('I') } + specify { @species2_1.cites_listing.should == 'I' } end context "for species Falco alopex (H)" do - specify { expect(@species2_2.cites_listing).to eq('II') } + specify { @species2_2.cites_listing.should == 'II' } end context "for species Gymnogyps californianus" do - specify { expect(@species1_1.cites_listing).to eq('I') } + specify { @species1_1.cites_listing.should == 'I' } end context "for species Sarcoramphus papa" do - specify { expect(@species1_2.cites_listing).to eq('III') } + specify { @species1_2.cites_listing.should == 'III' } end context "for species Vultur atratus" do - specify { expect(@species1_3.cites_listing).to eq('NC') } + specify { @species1_3.cites_listing.should == 'NC' } end end describe :eu_listing do context "for order Falconiformes" do - specify { expect(@order.eu_listing).to eq('A/B/C/NC') } + specify { @order.eu_listing.should == 'A/B/C/NC' } end context "for species Falco araea" do - specify { expect(@species2_1.eu_listing).to eq('A') } + specify { @species2_1.eu_listing.should == 'A' } end context "for species Falco alopex (H)" do - specify { expect(@species2_2.eu_listing).to eq('B') } + specify { @species2_2.eu_listing.should == 'B' } end context "for species Gymnogyps californianus" do - specify { expect(@species1_1.eu_listing).to eq('A') } + specify { @species1_1.eu_listing.should == 'A' } end context "for species Sarcoramphus papa" do - specify { expect(@species1_2.eu_listing).to eq('C') } + specify { @species1_2.eu_listing.should == 'C' } end context "for species Vultur atratus" do - specify { expect(@species1_3.eu_listing).to eq('NC') } + specify { @species1_3.eu_listing.should == 'NC' } end end describe :cites_status do context "for genus Vultur" do - specify { expect(@genus1_3.cites_status).to eq('EXCLUDED') } + specify { @genus1_3.cites_status.should == 'EXCLUDED' } end context "for species Vultur atratus" do - specify { expect(@species1_3.cites_status).to eq('EXCLUDED') } + specify { @species1_3.cites_status.should == 'EXCLUDED' } end end describe :cites_listed do context "for order Falconiformes" do - specify { expect(@order.cites_listed).to be_truthy } + specify { @order.cites_listed.should be_truthy } end context "for family Falconidae (inclusion in higher taxa listing)" do - specify { expect(@family2.cites_listed).to eq(false) } + specify { @family2.cites_listed.should == false } end context "for genus Falco" do - specify { expect(@genus2_1.cites_listed).to eq(false) } + specify { @genus2_1.cites_listed.should == false } end context "for species Falco araea" do - specify { expect(@species2_1.cites_listed).to be_truthy } + specify { @species2_1.cites_listed.should be_truthy } end context "for species Falco alopex" do - specify { expect(@species2_2.cites_listed).to eq(false) } + specify { @species2_2.cites_listed.should == false } end context "for species Vultur atratus" do - specify { expect(@species1_3.cites_listed).to be_blank } + specify { @species1_3.cites_listed.should be_blank } end context "for subspecies Falco peregrinus peregrinus" do - specify { expect(@subspecies2_3_1.cites_listed).to eq(false) } + specify { @subspecies2_3_1.cites_listed.should == false } end end describe :eu_listed do context "for order Falconiformes" do - specify { expect(@order.eu_listed).to be_truthy } + specify { @order.eu_listed.should be_truthy } end context "for family Falconidae (inclusion in higher taxa listing)" do - specify { expect(@family2.eu_listed).to eq(false) } + specify { @family2.eu_listed.should == false } end context "for genus Falco" do - specify { expect(@genus2_1.eu_listed).to eq(false) } + specify { @genus2_1.eu_listed.should == false } end context "for species Falco araea" do - specify { expect(@species2_1.eu_listed).to be_truthy } + specify { @species2_1.eu_listed.should be_truthy } end context "for species Falco alopex" do - specify { expect(@species2_2.eu_listed).to eq(false) } + specify { @species2_2.eu_listed.should == false } end context "for species Vultur atratus" do - specify { expect(@species1_3.eu_listed).to be_blank } + specify { @species1_3.eu_listed.should be_blank } end context "for subspecies Falco peregrinus peregrinus" do - specify { expect(@subspecies2_3_1.eu_listed).to eq(false) } + specify { @subspecies2_3_1.eu_listed.should == false } end end describe :cites_show do context "for order Falconiformes" do - specify { expect(@order.cites_show).to be_truthy } + specify { @order.cites_show.should be_truthy } end context "for family Falconidae" do - specify { expect(@family2.cites_show).to be_truthy } + specify { @family2.cites_show.should be_truthy } end context "for Falco hybrid" do - specify { expect(@hybrid.cites_show).to be_falsey } + specify { @hybrid.cites_show.should be_falsey } end end describe :show_in_checklist_ac do context "for subspecies Falco peregrinus peregrinus" do - specify { expect(@subspecies2_3_1_ac.show_in_checklist_ac).to be_falsey } + specify { @subspecies2_3_1_ac.show_in_checklist_ac.should be_falsey } end end describe :show_in_species_plus_ac do context "for subspecies Falco peregrinus peregrinus" do - specify { expect(@subspecies2_3_1_ac.show_in_species_plus_ac).to be_truthy } + specify { @subspecies2_3_1_ac.show_in_species_plus_ac.should be_truthy } end end diff --git a/spec/models/taxon_concept/hybrids_spec.rb b/spec/models/taxon_concept/hybrids_spec.rb index 30e5c0b644..493ecb9f6f 100644 --- a/spec/models/taxon_concept/hybrids_spec.rb +++ b/spec/models/taxon_concept/hybrids_spec.rb @@ -30,16 +30,16 @@ } context "when new" do specify { - expect(tc.has_hybrids?).to be_truthy + tc.has_hybrids?.should be_truthy } specify { - expect(hybrid.is_hybrid?).to be_truthy + hybrid.is_hybrid?.should be_truthy } specify { - expect(hybrid.has_hybrid_parents?).to be_truthy + hybrid.has_hybrid_parents?.should be_truthy } specify { - expect(hybrid.full_name).to eq('Lolcatus lolcatus x lolatus') + hybrid.full_name.should == 'Lolcatus lolcatus x lolatus' } end context "when duplicate" do @@ -47,9 +47,9 @@ hybrid.dup } specify { - expect do + lambda do duplicate.save - end.to change(TaxonConcept, :count).by(0) + end.should change(TaxonConcept, :count).by(0) } end context "when duplicate but author name different" do @@ -59,9 +59,9 @@ res } specify { - expect do + lambda do duplicate.save - end.to change(TaxonConcept, :count).by(1) + end.should change(TaxonConcept, :count).by(1) } end end diff --git a/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb b/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb index 2c76ff4fd3..aaae65628d 100644 --- a/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb +++ b/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb @@ -6,26 +6,26 @@ context "TAXONOMY" do describe :full_name do context "for species Loxodonta africana" do - specify { expect(@species.full_name).to eq('Loxodonta africana') } + specify { @species.full_name.should == 'Loxodonta africana' } end context "for genus Loxodonta" do - specify { expect(@genus.full_name).to eq('Loxodonta') } + specify { @genus.full_name.should == 'Loxodonta' } end end describe :rank do context "for species Loxodonta africana" do - specify { expect(@species.rank_name).to eq('SPECIES') } + specify { @species.rank_name.should == 'SPECIES' } end end describe :ancestors do context "family" do - specify { expect(@species.family_name).to eq('Elephantidae') } + specify { @species.family_name.should == 'Elephantidae' } end context "order" do - specify { expect(@species.order_name).to eq('Proboscidea') } + specify { @species.order_name.should == 'Proboscidea' } end context "class" do - specify { expect(@species.class_name).to eq('Mammalia') } + specify { @species.class_name.should == 'Mammalia' } end end end @@ -33,13 +33,13 @@ context "LISTING" do describe :cms_listing do context "for species Loxodonta africana" do - specify { expect(@species.cms_listing).to eq('II') } + specify { @species.cms_listing.should == 'II' } end end describe :cms_listed do context "for species Loxodonta africana" do - specify { expect(@species.cms_listed).to be_truthy } + specify { @species.cms_listed.should be_truthy } end end end diff --git a/spec/models/taxon_concept/loxodonta_africana_spec.rb b/spec/models/taxon_concept/loxodonta_africana_spec.rb index e41b70e88e..8c6a70efa7 100644 --- a/spec/models/taxon_concept/loxodonta_africana_spec.rb +++ b/spec/models/taxon_concept/loxodonta_africana_spec.rb @@ -6,15 +6,15 @@ context "TAXONOMY" do describe :full_name do context "for species Loxodonta africana" do - specify { expect(@species.full_name).to eq('Loxodonta africana') } + specify { @species.full_name.should == 'Loxodonta africana' } end context "for genus Loxodonta" do - specify { expect(@genus.full_name).to eq('Loxodonta') } + specify { @genus.full_name.should == 'Loxodonta' } end end describe :rank do context "for species Loxodonta africana" do - specify { expect(@species.rank_name).to eq('SPECIES') } + specify { @species.rank_name.should == 'SPECIES' } end end describe :ancestors do @@ -33,31 +33,31 @@ context "LISTING" do describe :cites_listing do context "for species Loxodonta africana (population split listing)" do - specify { expect(@species.cites_listing).to eq('I/II') } + specify { @species.cites_listing.should == 'I/II' } end end describe :eu_listing do context "for species Loxodonta africana (population split listing)" do - specify { expect(@species.eu_listing).to eq('A/B') } + specify { @species.eu_listing.should == 'A/B' } end end describe :cites_listed do context "for species Loxodonta africana" do - specify { expect(@species.cites_listed).to be_truthy } + specify { @species.cites_listed.should be_truthy } end context "for family Elephantidae" do - specify { expect(@family.cites_listed).to eq(false) } + specify { @family.cites_listed.should == false } end end describe :eu_listed do context "for species Loxodonta africana" do - specify { expect(@species.eu_listed).to be_truthy } + specify { @species.eu_listed.should be_truthy } end context "for family Elephantidae" do - specify { expect(@family.eu_listed).to eq(false) } + specify { @family.eu_listed.should == false } end end diff --git a/spec/models/taxon_concept/mellivora_capensis_spec.rb b/spec/models/taxon_concept/mellivora_capensis_spec.rb index 73bf14a5cf..6bfb4e2b75 100644 --- a/spec/models/taxon_concept/mellivora_capensis_spec.rb +++ b/spec/models/taxon_concept/mellivora_capensis_spec.rb @@ -6,43 +6,43 @@ context "LISTING" do describe :cites_listing do context "for species Mellivora capensis" do - specify { expect(@species.cites_listing).to eq('III') } + specify { @species.cites_listing.should == 'III' } end end describe :eu_listing do context "for species Mellivora capensis" do - specify { expect(@species.eu_listing).to eq('C') } + specify { @species.eu_listing.should == 'C' } end end describe :cites_listed do context "for family Mustelinae" do - specify { expect(@family.cites_listed).to eq(false) } + specify { @family.cites_listed.should == false } end context "for genus Mellivora" do - specify { expect(@genus.cites_listed).to eq(false) } + specify { @genus.cites_listed.should == false } end context "for species Mellivora capensis" do - specify { expect(@species.cites_listed).to be_truthy } + specify { @species.cites_listed.should be_truthy } end end describe :eu_listed do context "for family Mustelinae" do - specify { expect(@family.eu_listed).to eq(false) } + specify { @family.eu_listed.should == false } end context "for genus Mellivora" do - specify { expect(@genus.eu_listed).to eq(false) } + specify { @genus.eu_listed.should == false } end context "for species Mellivora capensis" do - specify { expect(@species.eu_listed).to be_truthy } + specify { @species.eu_listed.should be_truthy } end end describe :current_party_ids do context "for species Mellivora capensis" do - specify { expect(@species.current_parties_ids).to eq([GeoEntity.find_by_iso_code2('BW').id]) } + specify { @species.current_parties_ids.should == [GeoEntity.find_by_iso_code2('BW').id] } end end diff --git a/spec/models/taxon_concept/moschus_spec.rb b/spec/models/taxon_concept/moschus_spec.rb index a3d8375ae8..96a8f1ea76 100644 --- a/spec/models/taxon_concept/moschus_spec.rb +++ b/spec/models/taxon_concept/moschus_spec.rb @@ -7,31 +7,31 @@ context "LISTING" do describe :cites_listing do context "for genus Moschus" do - specify { expect(@genus.cites_listing).to eq('I/II') } + specify { @genus.cites_listing.should == 'I/II' } end context "for species Moschus leucogaster" do - specify { expect(@species1.cites_listing).to eq('I') } + specify { @species1.cites_listing.should == 'I' } end context "for species Moschus moschiferus" do - specify { expect(@species2.cites_listing).to eq('II') } + specify { @species2.cites_listing.should == 'II' } end context "for subspecies Moschus moschiferus moschiferus" do - specify { expect(@subspecies.cites_listing).to eq('II') } + specify { @subspecies.cites_listing.should == 'II' } end end describe :cites_listed do context "for genus Moschus" do - specify { expect(@genus.cites_listed).to be_truthy } + specify { @genus.cites_listed.should be_truthy } end context "for species Moschus leucogaster" do - specify { expect(@species1.cites_listed).to eq(false) } + specify { @species1.cites_listed.should == false } end context "for species Moschus moschiferus" do - specify { expect(@species2.cites_listed).to eq(false) } + specify { @species2.cites_listed.should == false } end context "for subspecies Moschus moschiferus moschiferus" do - specify { expect(@subspecies.cites_listed).to eq(false) } + specify { @subspecies.cites_listed.should == false } end end end @@ -40,29 +40,29 @@ describe :current_cites_additions do context "for species Moschus leucogaster" do specify { - expect(@species1.current_cites_additions.size).to eq(1) + @species1.current_cites_additions.size.should == 1 addition = @species1.current_cites_additions.first - expect(addition.original_taxon_concept_id).to eq(@genus.id) + addition.original_taxon_concept_id.should == @genus.id # should inherit just the I listing from split listed genus - expect(addition.species_listing_name).to eq('I') + addition.species_listing_name.should == 'I' } end context "for species Moschus moschiferus" do specify { - expect(@species2.current_cites_additions.size).to eq(1) + @species2.current_cites_additions.size.should == 1 addition = @species2.current_cites_additions.first - expect(addition.original_taxon_concept_id).to eq(@genus.id) + addition.original_taxon_concept_id.should == @genus.id # should inherit just the II listing from split listed genus - expect(addition.species_listing_name).to eq('II') + addition.species_listing_name.should == 'II' } end context "for subspecies Moschus moschiferus moschiferus" do specify { - expect(@subspecies.current_cites_additions.size).to eq(1) + @subspecies.current_cites_additions.size.should == 1 addition = @subspecies.current_cites_additions.first - expect(addition.original_taxon_concept_id).to eq(@genus.id) + addition.original_taxon_concept_id.should == @genus.id # should inherit just the II listing from split listed genus - expect(addition.species_listing_name).to eq('II') + addition.species_listing_name.should == 'II' } end end diff --git a/spec/models/taxon_concept/natator_depressus_spec.rb b/spec/models/taxon_concept/natator_depressus_spec.rb index 09a24dc656..498c9a0e92 100644 --- a/spec/models/taxon_concept/natator_depressus_spec.rb +++ b/spec/models/taxon_concept/natator_depressus_spec.rb @@ -7,10 +7,10 @@ context "LISTING" do describe :cites_listing do context "for family Cheloniidae" do - specify { expect(@family.cites_listing).to eq('I') } + specify { @family.cites_listing.should == 'I' } end context "for species Natator depressus" do - specify { expect(@species.cites_listing).to eq('I') } + specify { @species.cites_listing.should == 'I' } end end diff --git a/spec/models/taxon_concept/notomys_aquilo_spec.rb b/spec/models/taxon_concept/notomys_aquilo_spec.rb index b3e27c07d9..a17cfcb41e 100644 --- a/spec/models/taxon_concept/notomys_aquilo_spec.rb +++ b/spec/models/taxon_concept/notomys_aquilo_spec.rb @@ -7,19 +7,19 @@ context "LISTING" do describe :cites_listing do context "for genus Notomys" do - specify { expect(@genus.cites_listing).to eq('NC') } + specify { @genus.cites_listing.should == 'NC' } end context "for species Notomys aquilo" do - specify { expect(@species.cites_listing).to eq('NC') } + specify { @species.cites_listing.should == 'NC' } end end describe :cites_show do context "for genus Notomys" do - specify { expect(@genus.cites_show).to be_falsey } + specify { @genus.cites_show.should be_falsey } end context "for species Notomys aquilo" do - specify { expect(@species.cites_show).to be_falsey } + specify { @species.cites_show.should be_falsey } end end diff --git a/spec/models/taxon_concept/panax_ginseng_spec.rb b/spec/models/taxon_concept/panax_ginseng_spec.rb index c583c453d2..fa7ce59242 100644 --- a/spec/models/taxon_concept/panax_ginseng_spec.rb +++ b/spec/models/taxon_concept/panax_ginseng_spec.rb @@ -8,43 +8,43 @@ describe :cites_listed do context "for species Panax ginseng" do - specify { expect(@species.cites_listed).to be_truthy } + specify { @species.cites_listed.should be_truthy } end context "for genus Panax" do - specify { expect(@genus.cites_listed).to eq(false) } + specify { @genus.cites_listed.should == false } end end describe :eu_listed do context "for species Panax ginseng" do - specify { expect(@species.eu_listed).to be_truthy } + specify { @species.eu_listed.should be_truthy } end context "for genus Panax" do - specify { expect(@genus.eu_listed).to eq(false) } + specify { @genus.eu_listed.should == false } end end describe :cites_listing do context "for species Panax ginseng" do - specify { expect(@species.cites_listing).to eq('II/NC') } + specify { @species.cites_listing.should == 'II/NC' } end end describe :eu_listing do context "for species Panax ginseng" do - specify { expect(@species.eu_listing).to eq('B/NC') } + specify { @species.eu_listing.should == 'B/NC' } end end describe :ann_symbol do context "for species Panax ginseng" do - specify { expect(@species.ann_symbol).not_to be_blank } + specify { @species.ann_symbol.should_not be_blank } end end describe :hash_ann_symbol do context "for species Panax ginseng" do - specify { expect(@species.hash_ann_symbol).to eq('#3') } + specify { @species.hash_ann_symbol.should == '#3' } end end end diff --git a/spec/models/taxon_concept/pereskia_spec.rb b/spec/models/taxon_concept/pereskia_spec.rb index 8784c72374..44220e6039 100644 --- a/spec/models/taxon_concept/pereskia_spec.rb +++ b/spec/models/taxon_concept/pereskia_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context "for genus Pereskia (not listed, shown)" do - specify { expect(@genus1.cites_listing).to eq('NC') } + specify { @genus1.cites_listing.should == 'NC' } end context "for genus Ariocarpus" do - specify { expect(@genus2.cites_listing).to eq('I') } + specify { @genus2.cites_listing.should == 'I' } end context "for family Cactaceae" do - specify { expect(@family.cites_listing).to eq('I/II/NC') } + specify { @family.cites_listing.should == 'I/II/NC' } end end describe :eu_listing do context "for genus Pereskia (not listed, shown)" do - specify { expect(@genus1.eu_listing).to eq('NC') } + specify { @genus1.eu_listing.should == 'NC' } end context "for genus Ariocarpus" do - specify { expect(@genus2.eu_listing).to eq('A') } + specify { @genus2.eu_listing.should == 'A' } end context "for family Cactaceae" do - specify { expect(@family.eu_listing).to eq('A/B/NC') } + specify { @family.eu_listing.should == 'A/B/NC' } end end describe :cites_listed do context "for family Cactaceae" do - specify { expect(@family.cites_listed).to be_truthy } + specify { @family.cites_listed.should be_truthy } end context "for genus Pereskia" do - specify { expect(@genus1.cites_listed).to be_nil } + specify { @genus1.cites_listed.should be_nil } end end describe :eu_listed do context "for family Cactaceae" do - specify { expect(@family.eu_listed).to be_truthy } + specify { @family.eu_listed.should be_truthy } end context "for genus Pereskia" do - specify { expect(@genus1.eu_listed).to be_nil } + specify { @genus1.eu_listed.should be_nil } end end describe :cites_status do context "for genus Pereskia" do - specify { expect(@genus1.cites_status).to eq('EXCLUDED') } + specify { @genus1.cites_status.should == 'EXCLUDED' } end end describe :cites_show do context "for genus Pereskia" do - specify { expect(@genus1.cites_show).to eq(true) } + specify { @genus1.cites_show.should == true } end end diff --git a/spec/models/taxon_concept/platysternon_megacephalum_spec.rb b/spec/models/taxon_concept/platysternon_megacephalum_spec.rb index 63316c582f..fb86c24c1d 100644 --- a/spec/models/taxon_concept/platysternon_megacephalum_spec.rb +++ b/spec/models/taxon_concept/platysternon_megacephalum_spec.rb @@ -7,43 +7,43 @@ context "LISTING" do describe :cites_listing do context 'for family Platysternidae' do - specify { expect(@family.cites_listing).to eq('I') } + specify { @family.cites_listing.should == 'I' } end context 'for species Platysternon megacephalum' do - specify { expect(@species.cites_listing).to eq('I') } + specify { @species.cites_listing.should == 'I' } end end describe :cites_listed do context "for species Platysternon megacephalum" do - specify { expect(@species.cites_listed).to eq(false) } + specify { @species.cites_listed.should == false } end end describe :cites_show do context "for species Platysternon megacephalum" do - specify { expect(@species.cites_show).to be_truthy } + specify { @species.cites_show.should be_truthy } end end describe :eu_listing do context 'for family Platysternidae' do - specify { expect(@family.eu_listing).to eq('A') } + specify { @family.eu_listing.should == 'A' } end context 'for species Platysternon megacephalum' do - specify { expect(@species.eu_listing).to eq('A') } + specify { @species.eu_listing.should == 'A' } end end describe :eu_listed do context "for species Platysternon megacephalum" do - specify { expect(@species.eu_listed).to eq(false) } + specify { @species.eu_listed.should == false } end end describe :eu_show do context "for species Platysternon megacephalum" do - specify { expect(@species.eu_show).to be_truthy } + specify { @species.eu_show.should be_truthy } end end diff --git a/spec/models/taxon_concept/pristis_microdon_spec.rb b/spec/models/taxon_concept/pristis_microdon_spec.rb index bbef9fb494..2de1a66f31 100644 --- a/spec/models/taxon_concept/pristis_microdon_spec.rb +++ b/spec/models/taxon_concept/pristis_microdon_spec.rb @@ -7,43 +7,43 @@ context "LISTING" do describe :cites_listing do context 'for family Pristidae' do - specify { expect(@family.cites_listing).to eq('I') } + specify { @family.cites_listing.should == 'I' } end context 'for species Pristis microdon' do - specify { expect(@species.cites_listing).to eq('I') } + specify { @species.cites_listing.should == 'I' } end end describe :cites_listed do context "for species Pristis microdon" do - specify { expect(@species.cites_listed).to eq(false) } + specify { @species.cites_listed.should == false } end end describe :cites_show do context "for species Pristis microdon" do - specify { expect(@species.cites_show).to be_truthy } + specify { @species.cites_show.should be_truthy } end end describe :eu_listing do context 'for family Pristidae' do - specify { expect(@family.eu_listing).to eq('A') } + specify { @family.eu_listing.should == 'A' } end context 'for species Pristis microdon' do - specify { expect(@species.eu_listing).to eq('A') } + specify { @species.eu_listing.should == 'A' } end end describe :eu_listed do context "for species Pristis microdon" do - specify { expect(@species.eu_listed).to eq(false) } + specify { @species.eu_listed.should == false } end end describe :eu_show do context "for species Pristis microdon" do - specify { expect(@species.eu_show).to be_truthy } + specify { @species.eu_show.should be_truthy } end end diff --git a/spec/models/taxon_concept/pseudomys_fieldi_spec.rb b/spec/models/taxon_concept/pseudomys_fieldi_spec.rb index 5eef23dee9..f32afd4544 100644 --- a/spec/models/taxon_concept/pseudomys_fieldi_spec.rb +++ b/spec/models/taxon_concept/pseudomys_fieldi_spec.rb @@ -7,28 +7,28 @@ context "LISTING" do describe :cites_listing do context "for subspecies Pseudomys fieldi preaconis" do - specify { expect(@subspecies.cites_listing).to eq('I') } + specify { @subspecies.cites_listing.should == 'I' } end context "for species Pseudomys fieldi" do - specify { expect(@species.cites_listing).to eq('I/NC') } + specify { @species.cites_listing.should == 'I/NC' } end end describe :eu_listing do context "for subspecies Pseudomys fieldi preaconis" do - specify { expect(@subspecies.eu_listing).to eq('A') } + specify { @subspecies.eu_listing.should == 'A' } end context "for species Pseudomys fieldi" do - specify { expect(@species.eu_listing).to eq('A/NC') } + specify { @species.eu_listing.should == 'A/NC' } end end describe :cites_show do context "for subspecies Pseudomys fieldi preaconis" do - specify { expect(@subspecies.cites_show).to be_truthy } + specify { @subspecies.cites_show.should be_truthy } end context "for species Pseudomys fieldi" do - specify { expect(@species.cites_show).to be_truthy } + specify { @species.cites_show.should be_truthy } end end diff --git a/spec/models/taxon_concept/psittaciformes_spec.rb b/spec/models/taxon_concept/psittaciformes_spec.rb index a5a6216861..2eb2fb82d6 100644 --- a/spec/models/taxon_concept/psittaciformes_spec.rb +++ b/spec/models/taxon_concept/psittaciformes_spec.rb @@ -7,136 +7,136 @@ context "LISTING" do describe :cites_listing do context "for order Psittaciformes" do - specify { expect(@order.cites_listing).to eq('I/II/NC') } + specify { @order.cites_listing.should == 'I/II/NC' } end context "for species Cacatua goffiniana" do - specify { expect(@species1_2_1.cites_listing).to eq('I') } + specify { @species1_2_1.cites_listing.should == 'I' } end context "for species Cacatua ducorpsi (H)" do - specify { expect(@species1_2_2.cites_listing).to eq('II') } + specify { @species1_2_2.cites_listing.should == 'II' } end context "for species Probosciger aterrimus" do - specify { expect(@species1_1.cites_listing).to eq('I') } + specify { @species1_1.cites_listing.should == 'I' } end context "for species Amazona aestiva" do - specify { expect(@species2_2_1.cites_listing).to eq('II') } + specify { @species2_2_1.cites_listing.should == 'II' } end context "for species Agapornis roseicollis (DEL II, not listed, not shown)" do - specify { expect(@species2_1.cites_listing).to eq('NC') } + specify { @species2_1.cites_listing.should == 'NC' } end context "for species Psittacula krameri (DEL III, not listed, not shown)" do - specify { expect(@species2_3.cites_listing).to eq('NC') } + specify { @species2_3.cites_listing.should == 'NC' } end context "for subspecies Amazona festiva festiva" do - specify { expect(@subspecies2_2_2_1.cites_listing).to eq('II') } + specify { @subspecies2_2_2_1.cites_listing.should == 'II' } end end describe :eu_listing do context "for order Psittaciformes" do - specify { expect(@order.eu_listing).to eq('A/B/NC') } + specify { @order.eu_listing.should == 'A/B/NC' } end context "for species Cacatua goffiniana" do - specify { expect(@species1_2_1.eu_listing).to eq('A') } + specify { @species1_2_1.eu_listing.should == 'A' } end context "for species Cacatua ducorpsi (H)" do - specify { expect(@species1_2_2.eu_listing).to eq('B') } + specify { @species1_2_2.eu_listing.should == 'B' } end context "for species Probosciger aterrimus" do - specify { expect(@species1_1.eu_listing).to eq('A') } + specify { @species1_1.eu_listing.should == 'A' } end context "for species Amazona aestiva" do - specify { expect(@species2_2_1.eu_listing).to eq('B') } + specify { @species2_2_1.eu_listing.should == 'B' } end context "for species Agapornis roseicollis (DEL II, not listed, not shown)" do - specify { expect(@species2_1.eu_listing).to eq('NC') } + specify { @species2_1.eu_listing.should == 'NC' } end context "for species Psittacula krameri (DEL III, not listed, not shown)" do - specify { expect(@species2_3.eu_listing).to eq('NC') } + specify { @species2_3.eu_listing.should == 'NC' } end context "for subspecies Amazona festiva festiva" do - specify { expect(@subspecies2_2_2_1.eu_listing).to eq('B') } + specify { @subspecies2_2_2_1.eu_listing.should == 'B' } end end describe :cites_listed do context "for order Psittaciformes" do - specify { expect(@order.cites_listed).to be_truthy } + specify { @order.cites_listed.should be_truthy } end context "for family Cacatuidae" do - specify { expect(@family1.cites_listed).to eq(false) } + specify { @family1.cites_listed.should == false } end context "for genus Cacatua" do - specify { expect(@genus1_2.cites_listed).to eq(false) } + specify { @genus1_2.cites_listed.should == false } end context "for species Cacatua goffiniana" do - specify { expect(@species1_2_1.cites_listed).to be_truthy } + specify { @species1_2_1.cites_listed.should be_truthy } end context "for species Cacatua ducorpsi" do - specify { expect(@species1_2_2.cites_listed).to eq(false) } + specify { @species1_2_2.cites_listed.should == false } end context "for subspecies Amazona festiva festiva" do - specify { expect(@subspecies2_2_2_1.cites_listed).to eq(false) } + specify { @subspecies2_2_2_1.cites_listed.should == false } end end describe :eu_listed do context "for order Psittaciformes" do - specify { expect(@order.eu_listed).to be_truthy } + specify { @order.eu_listed.should be_truthy } end context "for family Cacatuidae" do - specify { expect(@family1.eu_listed).to eq(false) } + specify { @family1.eu_listed.should == false } end context "for genus Cacatua" do - specify { expect(@genus1_2.eu_listed).to eq(false) } + specify { @genus1_2.eu_listed.should == false } end context "for species Cacatua goffiniana" do - specify { expect(@species1_2_1.eu_listed).to be_truthy } + specify { @species1_2_1.eu_listed.should be_truthy } end context "for species Cacatua ducorpsi" do - specify { expect(@species1_2_2.eu_listed).to eq(false) } + specify { @species1_2_2.eu_listed.should == false } end context "for subspecies Amazona festiva festiva" do - specify { expect(@subspecies2_2_2_1.eu_listed).to eq(false) } + specify { @subspecies2_2_2_1.eu_listed.should == false } end end describe :cites_show do context "for species Agapornis roseicollis (DEL II)" do - specify { expect(@species2_1.cites_show).to be_truthy } + specify { @species2_1.cites_show.should be_truthy } end context "for species Amazona aestiva" do - specify { expect(@species2_2_1.cites_show).to be_truthy } + specify { @species2_2_1.cites_show.should be_truthy } end context "for species Psittacula krameri (DEL III)" do - specify { expect(@species2_3.cites_show).to be_truthy } + specify { @species2_3.cites_show.should be_truthy } end end describe :cites_status do context "for species Agapornis roseicollis (DEL II)" do - specify { expect(@species2_1.cites_status).to eq('EXCLUDED') } + specify { @species2_1.cites_status.should == 'EXCLUDED' } end context "for species Psittacula krameri (DEL III)" do - specify { expect(@species2_3.cites_status).to eq('EXCLUDED') } + specify { @species2_3.cites_status.should == 'EXCLUDED' } end end describe :show_in_checklist_ac do context "for subspecies Amazona festiva festiva" do - specify { expect(@subspecies2_2_2_1_ac.show_in_checklist_ac).to be_falsey } + specify { @subspecies2_2_2_1_ac.show_in_checklist_ac.should be_falsey } end end describe :show_in_species_plus_ac do context "for subspecies Amazona festiva festiva" do - specify { expect(@subspecies2_2_2_1_ac.show_in_species_plus_ac).to be_falsey } + specify { @subspecies2_2_2_1_ac.show_in_species_plus_ac.should be_falsey } end end describe :show_in_species_plus do context "for subspecies Amazona festiva festiva" do - specify { expect(@subspecies2_2_2_1.show_in_species_plus).to be_falsey } + specify { @subspecies2_2_2_1.show_in_species_plus.should be_falsey } end end diff --git a/spec/models/taxon_concept/synonyms_spec.rb b/spec/models/taxon_concept/synonyms_spec.rb index 8b696ec7c2..8097264efe 100644 --- a/spec/models/taxon_concept/synonyms_spec.rb +++ b/spec/models/taxon_concept/synonyms_spec.rb @@ -30,16 +30,16 @@ } context "when new" do specify { - expect(tc.has_synonyms?).to be_truthy + tc.has_synonyms?.should be_truthy } specify { - expect(synonym.is_synonym?).to be_truthy + synonym.is_synonym?.should be_truthy } specify { - expect(synonym.has_accepted_names?).to be_truthy + synonym.has_accepted_names?.should be_truthy } specify { - expect(synonym.full_name).to eq('Lolcatus lolus') + synonym.full_name.should == 'Lolcatus lolus' } end context "when duplicate" do @@ -47,9 +47,9 @@ synonym.dup } specify { - expect do + lambda do duplicate.save - end.to change(TaxonConcept, :count).by(0) + end.should change(TaxonConcept, :count).by(0) } end context "when duplicate but author name different" do @@ -59,9 +59,9 @@ res } specify { - expect do + lambda do duplicate.save - end.to change(TaxonConcept, :count).by(1) + end.should change(TaxonConcept, :count).by(1) } end context "when has accepted parent" do @@ -84,13 +84,13 @@ ) end # should not modify a synonym's full name when saving - specify { expect(@synonym.full_name).to eq('Lolcatus lolus furiatus') } + specify { @synonym.full_name.should == 'Lolcatus lolus furiatus' } context "overnight calculations" do before(:each) do Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings end # should not modify a synonym's full name overnight - specify { expect(@synonym.reload.full_name).to eq('Lolcatus lolus furiatus') } + specify { @synonym.reload.full_name.should == 'Lolcatus lolus furiatus' } end end end diff --git a/spec/models/taxon_concept/tapiridae_spec.rb b/spec/models/taxon_concept/tapiridae_spec.rb index e4dd41a5a9..39d3110960 100644 --- a/spec/models/taxon_concept/tapiridae_spec.rb +++ b/spec/models/taxon_concept/tapiridae_spec.rb @@ -6,12 +6,12 @@ context "TAXONOMY" do describe :full_name do context "for family Tapiridae" do - specify { expect(@family.full_name).to eq('Tapiridae') } + specify { @family.full_name.should == 'Tapiridae' } end end describe :rank do context "for family Tapiridae" do - specify { expect(@family.rank_name).to eq('FAMILY') } + specify { @family.rank_name.should == 'FAMILY' } end end describe :ancestors do @@ -27,43 +27,43 @@ context "LISTING" do describe :cites_listing do context "for family Tapiridae" do - specify { expect(@family.cites_listing).to eq('I/II') } + specify { @family.cites_listing.should == 'I/II' } end context "for species Tapirus terrestris" do - specify { expect(@species.cites_listing).to eq('II') } + specify { @species.cites_listing.should == 'II' } end end describe :eu_listing do context "for family Tapiridae" do - specify { expect(@family.eu_listing).to eq('A/B') } + specify { @family.eu_listing.should == 'A/B' } end context "for species Tapirus terrestris" do - specify { expect(@species.eu_listing).to eq('B') } + specify { @species.eu_listing.should == 'B' } end end describe :cites_listed do context "for family Tapiridae" do - specify { expect(@family.cites_listed).to be_truthy } + specify { @family.cites_listed.should be_truthy } end context "for genus Tapirus" do - specify { expect(@genus.cites_listed).to eq(false) } + specify { @genus.cites_listed.should == false } end context "for species Tapirus terrestris" do - specify { expect(@species.cites_listed).to be_truthy } + specify { @species.cites_listed.should be_truthy } end end describe :eu_listed do context "for family Tapiridae" do - specify { expect(@family.eu_listed).to be_truthy } + specify { @family.eu_listed.should be_truthy } end context "for genus Tapirus" do - specify { expect(@genus.eu_listed).to eq(false) } + specify { @genus.eu_listed.should == false } end context "for species Tapirus terrestris" do - specify { expect(@species.eu_listed).to be_truthy } + specify { @species.eu_listed.should be_truthy } end end end diff --git a/spec/models/taxon_concept/trade_names_spec.rb b/spec/models/taxon_concept/trade_names_spec.rb index 73fddb12fc..57e3d7babb 100644 --- a/spec/models/taxon_concept/trade_names_spec.rb +++ b/spec/models/taxon_concept/trade_names_spec.rb @@ -30,16 +30,16 @@ } context "when new" do specify { - expect(tc.has_trade_names?).to be_truthy + tc.has_trade_names?.should be_truthy } specify { - expect(trade_name.is_trade_name?).to be_truthy + trade_name.is_trade_name?.should be_truthy } specify { - expect(trade_name.has_accepted_names_for_trade_name?).to be_truthy + trade_name.has_accepted_names_for_trade_name?.should be_truthy } specify { - expect(trade_name.full_name).to eq('Lolcatus lolus') + trade_name.full_name.should == 'Lolcatus lolus' } end context "when duplicate" do @@ -47,9 +47,9 @@ trade_name.dup } specify { - expect do + lambda do duplicate.save - end.to change(TaxonConcept, :count).by(0) + end.should change(TaxonConcept, :count).by(0) } end context "when duplicate but author name different" do @@ -59,9 +59,9 @@ res } specify { - expect do + lambda do duplicate.save - end.to change(TaxonConcept, :count).by(1) + end.should change(TaxonConcept, :count).by(1) } end context "when has accepted parent" do @@ -84,13 +84,13 @@ ) end # should not modify a trade_name's full name when saving - specify { expect(@trade_name.full_name).to eq('Lolcatus lolus furiatus') } + specify { @trade_name.full_name.should == 'Lolcatus lolus furiatus' } context "overnight calculations" do before(:each) do Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings end # should not modify a trade_name's full name overnight - specify { expect(@trade_name.reload.full_name).to eq('Lolcatus lolus furiatus') } + specify { @trade_name.reload.full_name.should == 'Lolcatus lolus furiatus' } end end end diff --git a/spec/models/taxon_concept/uroplatus_spec.rb b/spec/models/taxon_concept/uroplatus_spec.rb index ea9ff61ef0..319db64f14 100644 --- a/spec/models/taxon_concept/uroplatus_spec.rb +++ b/spec/models/taxon_concept/uroplatus_spec.rb @@ -7,70 +7,70 @@ context "REFERENCES" do describe :cites_accepted do context "for genus Uroplatus" do - specify { expect(@genus.cites_accepted).to eq(false) } + specify { @genus.cites_accepted.should == false } end context "for species Uroplatus alluaudi" do - specify { expect(@species1.cites_accepted).to eq(false) } + specify { @species1.cites_accepted.should == false } end context "for species Uroplatus giganteus" do - specify { expect(@species2.cites_accepted).to be_truthy } + specify { @species2.cites_accepted.should be_truthy } end end describe :standard_taxon_concept_references do context "for family Gekkonidae" do - specify { expect(@family.taxon_concept.standard_taxon_concept_references).to be_empty } + specify { @family.taxon_concept.standard_taxon_concept_references.should be_empty } end context "for genus Uroplatus" do - specify { expect(@genus.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to be_empty } + specify { @genus.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should be_empty } end context "for species Uroplatus alluaudi" do - specify { expect(@species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to be_empty } + specify { @species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should be_empty } end context "for species Uroplatus giganteus" do - specify { expect(@species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } + specify { @species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } end end end context "LISTING" do describe :cites_listing do context "for genus Uroplatus" do - specify { expect(@genus.cites_listing).to eq('II') } + specify { @genus.cites_listing.should == 'II' } end context "for species Uroplatus giganteus" do - specify { expect(@species2.cites_listing).to eq('II') } + specify { @species2.cites_listing.should == 'II' } end end describe :eu_listing do context "for genus Uroplatus" do - specify { expect(@genus.eu_listing).to eq('B') } + specify { @genus.eu_listing.should == 'B' } end context "for species Uroplatus giganteus" do - specify { expect(@species2.eu_listing).to eq('B') } + specify { @species2.eu_listing.should == 'B' } end end describe :cites_listed do context "for family Gekkonidae" do - specify { expect(@family.cites_listed).to eq(false) } + specify { @family.cites_listed.should == false } end context "for genus Uroplatus" do - specify { expect(@genus.cites_listed).to be_truthy } + specify { @genus.cites_listed.should be_truthy } end context "for species Uroplatus giganteus" do - specify { expect(@species2.cites_listed).to eq(false) } + specify { @species2.cites_listed.should == false } end end describe :eu_listed do context "for family Gekkonidae" do - specify { expect(@family.eu_listed).to eq(false) } + specify { @family.eu_listed.should == false } end context "for genus Uroplatus" do - specify { expect(@genus.eu_listed).to be_truthy } + specify { @genus.eu_listed.should be_truthy } end context "for species Uroplatus giganteus" do - specify { expect(@species2.eu_listed).to eq(false) } + specify { @species2.eu_listed.should == false } end end diff --git a/spec/models/taxon_concept/validation_spec.rb b/spec/models/taxon_concept/validation_spec.rb index 2f340605b6..25a50ad324 100644 --- a/spec/models/taxon_concept/validation_spec.rb +++ b/spec/models/taxon_concept/validation_spec.rb @@ -16,7 +16,7 @@ :parent_id => kingdom_tc.id ) } - specify { tc.valid? is_expected.to be_truthy } + specify { tc.valid? should be_truthy } end context "taxonomy does not match parent" do let(:tc) { @@ -25,7 +25,7 @@ :parent_id => kingdom_tc.id ) } - specify { expect(tc.error_on(:parent_id).size).to eq(1) } + specify { tc.should have(1).error_on(:parent_id) } end context "parent is not an accepted name" do let(:genus_tc) { @@ -40,7 +40,7 @@ :parent_id => genus_tc.id ) } - specify { expect(tc.error_on(:parent_id).size).to eq(1) } + specify { tc.should have(1).error_on(:parent_id) } end context "parent rank is too high above child rank" do let(:tc) { @@ -49,7 +49,7 @@ :parent_id => kingdom_tc.id ) } - specify { expect(tc.error_on(:parent_id).size).to eq(1) } + specify { tc.should have(1).error_on(:parent_id) } end context "parent rank is below child rank" do let(:parent) { @@ -64,7 +64,7 @@ :parent_id => parent.id ) } - specify { expect(tc.error_on(:parent_id).size).to eq(1) } + specify { tc.should have(1).error_on(:parent_id) } end context "scientific name is not given" do let(:tc) { @@ -74,7 +74,7 @@ :taxon_name => build(:taxon_name, :scientific_name => nil) ) } - specify { expect(tc.error_on(:taxon_name_id).size).to eq(1) } + specify { tc.should have(1).error_on(:taxon_name_id) } end context "when taxonomic position malformed" do let(:tc) { @@ -84,7 +84,7 @@ :taxonomic_position => '1.a.b' ) } - specify { expect(tc.error_on(:taxonomic_position).size).to eq(1) } + specify { tc.should have(1).error_on(:taxonomic_position) } end context "when full name is already given" do let(:tc_parent) { create_cites_eu_species } @@ -100,7 +100,7 @@ taxon_name: build(:taxon_name, scientific_name: 'duplicatus') ) } - specify { expect(tc2.error_on(:full_name).size).to eq(1) } + specify { tc2.should have(1).error_on(:full_name) } end end context "update" do @@ -132,17 +132,17 @@ let!(:species_child) { create_cites_eu_subspecies(parent_id: species.id) } specify "cannot change taxonomy when dependents present" do species.taxonomy = cms - expect(species.error_on(:taxonomy_id).size).to eq(1) + expect(species).to have(1).error_on(:taxonomy_id) end end context "scientific name" do specify "cannot change species scientific name" do species.scientific_name = 'Vulgaris' - expect(species.error_on(:full_name).size).to eq(1) + expect(species).to have(1).error_on(:full_name) end specify "cannot change genus scientific name" do genus.scientific_name = 'Felis' - expect(genus.error_on(:full_name).size).to eq(1) + expect(genus).to have(1).error_on(:full_name) end end context "parent" do @@ -159,25 +159,25 @@ end specify "cannot change A species parent" do species.parent = new_genus - expect(species.error_on(:full_name).size).to eq(1) + expect(species).to have(1).error_on(:full_name) end specify "can change S species parent" do s_species.parent = new_genus - expect(s_species.error_on(:full_name).size).to eq(0) + expect(s_species).to have(0).error_on(:full_name) end specify "can change A genus parent" do genus.parent = new_family - expect(genus.error_on(:full_name).size).to eq(0) + expect(genus).to have(0).error_on(:full_name) end end context "rank" do specify "cannot change A species rank" do species.rank = create(:rank, name: 'GENUS') - expect(species.error_on(:full_name).size).to eq(1) + expect(species).to have(1).error_on(:full_name) end specify "can change S species rank" do s_species.rank = create(:rank, name: 'GENUS') - expect(s_species.error_on(:full_name).size).to eq(0) + expect(s_species).to have(0).error_on(:full_name) end end end diff --git a/spec/models/taxon_concept/varanidae_spec.rb b/spec/models/taxon_concept/varanidae_spec.rb index 3dbb782a63..864e5ba393 100644 --- a/spec/models/taxon_concept/varanidae_spec.rb +++ b/spec/models/taxon_concept/varanidae_spec.rb @@ -7,65 +7,65 @@ context "REFERENCES" do describe :cites_accepted do context "for species Varanus bengalensis" do - specify { expect(@species1.cites_accepted).to be_truthy } + specify { @species1.cites_accepted.should be_truthy } end end describe :standard_taxon_concept_references do context "for order Sauria" do - specify { expect(@order.taxon_concept.standard_taxon_concept_references).to be_empty } + specify { @order.taxon_concept.standard_taxon_concept_references.should be_empty } end context "for family Varanidae" do - specify { expect(@family.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref1.id } + specify { @family.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref1.id } end context "for species Varanus bengalensis" do - specify { expect(@species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref1.id } + specify { @species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref1.id } end context "for species Varanus bushi" do - specify { expect(@species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref1.id } - specify { expect(@species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref2.id } + specify { @species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref1.id } + specify { @species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref2.id } end end end context "LISTING" do describe :cites_listing do context "for genus Varanus" do - specify { expect(@genus.cites_listing).to eq('I/II') } + specify { @genus.cites_listing.should == 'I/II' } end context "for species Varanus bengalensis" do - specify { expect(@species1.cites_listing).to eq('I') } + specify { @species1.cites_listing.should == 'I' } end end describe :eu_listing do context "for genus Varanus" do - specify { expect(@genus.eu_listing).to eq('A/B') } + specify { @genus.eu_listing.should == 'A/B' } end context "for species Varanus bengalensis" do - specify { expect(@species1.eu_listing).to eq('A') } + specify { @species1.eu_listing.should == 'A' } end end describe :cites_listed do context "for family Varanidae" do - specify { expect(@family.cites_listed).to eq(false) } + specify { @family.cites_listed.should == false } end context "for genus Varanus" do - specify { expect(@genus.cites_listed).to be_truthy } + specify { @genus.cites_listed.should be_truthy } end context "for species Varanus bengalensis" do - specify { expect(@species1.cites_listed).to be_truthy } + specify { @species1.cites_listed.should be_truthy } end end describe :eu_listed do context "for family Varanidae" do - specify { expect(@family.eu_listed).to eq(false) } + specify { @family.eu_listed.should == false } end context "for genus Varanus" do - specify { expect(@genus.eu_listed).to be_truthy } + specify { @genus.eu_listed.should be_truthy } end context "for species Varanus bengalensis" do - specify { expect(@species1.eu_listed).to be_truthy } + specify { @species1.eu_listed.should be_truthy } end end diff --git a/spec/models/taxon_concept_prefix_matcher_spec.rb b/spec/models/taxon_concept_prefix_matcher_spec.rb index 69736f7875..709e3c75e5 100644 --- a/spec/models/taxon_concept_prefix_matcher_spec.rb +++ b/spec/models/taxon_concept_prefix_matcher_spec.rb @@ -50,8 +50,8 @@ SearchParams.new(:taxonomy => { :id => taxonomy.id }, :scientific_name => 'Ab') } let(:matcher) { TaxonConceptPrefixMatcher.new matcher_params } - specify { expect(matcher.taxon_concepts).to include(taxon_concept4) } - specify { expect(matcher.taxon_concepts).not_to include(hybrid) } + specify { matcher.taxon_concepts.should include(taxon_concept4) } + specify { matcher.taxon_concepts.should_not include(hybrid) } end context "when name status H" do @@ -59,8 +59,8 @@ SearchParams.new(:taxonomy => { :id => taxonomy.id }, :scientific_name => 'Ab', :name_status => 'H') } let(:matcher) { TaxonConceptPrefixMatcher.new matcher_params } - specify { expect(matcher.taxon_concepts).not_to include(taxon_concept4) } - specify { expect(matcher.taxon_concepts).to include(hybrid) } + specify { matcher.taxon_concepts.should_not include(taxon_concept4) } + specify { matcher.taxon_concepts.should include(hybrid) } end context "when rank scope applied" do @@ -76,9 +76,8 @@ } specify { - expect(parent_matcher.taxon_concepts.map(&:full_name)).to eq( + parent_matcher.taxon_concepts.map(&:full_name).should == ['Aab', 'Aac'] - ) } let(:ancestor_matcher_params) { @@ -93,9 +92,8 @@ } specify { - expect(ancestor_matcher.taxon_concepts.map(&:full_name)).to eq( + ancestor_matcher.taxon_concepts.map(&:full_name).should == ['Aaa'] - ) } let(:self_and_ancestor_matcher_params) { @@ -110,9 +108,8 @@ } specify { - expect(self_and_ancestor_matcher.taxon_concepts.map(&:full_name)).to eq( + self_and_ancestor_matcher.taxon_concepts.map(&:full_name).should == ['Aaa', 'Aaab'] - ) } end @@ -129,9 +126,8 @@ } specify { - expect(ancestor_matcher.taxon_concepts.map(&:full_name)).to eq( + ancestor_matcher.taxon_concepts.map(&:full_name).should == ['Aaa', 'Aab', 'Aac'] - ) } let(:descendant_matcher_params) { @@ -146,9 +142,8 @@ } specify { - expect(descendant_matcher.taxon_concepts.map(&:full_name)).to eq( + descendant_matcher.taxon_concepts.map(&:full_name).should == ['Aaab', 'Aab', 'Abb'] - ) } end diff --git a/spec/models/taxon_relationship_spec.rb b/spec/models/taxon_relationship_spec.rb index cbcce73ca3..33843d4a49 100644 --- a/spec/models/taxon_relationship_spec.rb +++ b/spec/models/taxon_relationship_spec.rb @@ -19,12 +19,12 @@ context 'a relationship with no opposite' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => false) } let!(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { expect(taxon_relationship.has_opposite?).to eq(false) } + specify { taxon_relationship.has_opposite?.should == false } end context 'with an opposite' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => true) } let(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { expect(taxon_relationship.has_opposite?).to eq(true) } + specify { taxon_relationship.has_opposite?.should == true } end end @@ -32,13 +32,13 @@ context 'when creating a bidirectional relationship' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => true) } let!(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { expect(taxon_relationship.has_opposite?).to eq(true) } + specify { taxon_relationship.has_opposite?.should == true } end context 'when creating a non bidirectional relationship' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => false) } let!(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { expect(taxon_relationship.has_opposite?).to eq(false) } + specify { taxon_relationship.has_opposite?.should == false } end end @@ -90,7 +90,7 @@ ) } specify { - expect(taxon_relationship2.valid?).to eq(false) + taxon_relationship2.valid?.should == false } end context "adding an intertaxonomic relationship between taxon concepts that are already related in the opposite direction (B -> A)" do @@ -116,7 +116,7 @@ ) } specify { - expect(taxon_relationship2.valid?).to eq(false) + taxon_relationship2.valid?.should == false } end context "adding an intertaxonomic relationship between taxon concepts that are not already related" do @@ -144,7 +144,7 @@ } specify { - expect(taxon_relationship2.valid?).to eq(true) + taxon_relationship2.valid?.should == true } end end diff --git a/spec/models/taxonomy_spec.rb b/spec/models/taxonomy_spec.rb index f2fd940082..667476afc3 100644 --- a/spec/models/taxonomy_spec.rb +++ b/spec/models/taxonomy_spec.rb @@ -14,41 +14,41 @@ describe :create do context "when valid" do let(:taxonomy) { build(:taxonomy, :name => 'WILDLIFE') } - specify { expect(taxonomy).to be_valid } + specify { taxonomy.should be_valid } end context "when name missing" do let(:taxonomy) { build(:taxonomy, :name => nil) } - specify { expect(taxonomy).to be_invalid } - specify { expect(taxonomy).to have(1).error_on(:name) } + specify { taxonomy.should be_invalid } + specify { taxonomy.should have(1).error_on(:name) } end context "when name duplicated" do let!(:taxonomy1) { create(:taxonomy) } let(:taxonomy2) { build(:taxonomy, :name => taxonomy1.name) } - specify { expect(taxonomy2).to be_invalid } - specify { expect(taxonomy2).to have(1).error_on(:name) } + specify { taxonomy2.should be_invalid } + specify { taxonomy2.should have(1).error_on(:name) } end end describe :update do context "when updating a non-protected name" do let(:taxonomy) { create(:taxonomy) } - specify { expect(taxonomy.update_attributes({ :name => 'WORLD OF LOLCATS' })).to be_truthy } + specify { taxonomy.update_attributes({ :name => 'WORLD OF LOLCATS' }).should be_truthy } end context "when updating a protected name" do - specify { expect(cites_eu.update_attributes({ :name => 'WORLD OF LOLCATS' })).to be_falsey } + specify { cites_eu.update_attributes({ :name => 'WORLD OF LOLCATS' }).should be_falsey } end end describe :destroy do context "when no dependent objects attached" do let(:taxonomy) { create(:taxonomy, :name => 'WILDLIFE') } - specify { expect(taxonomy.destroy).to be_truthy } + specify { taxonomy.destroy.should be_truthy } end context "when dependent objects attached" do let(:taxonomy) { create(:taxonomy, :name => 'WILDLIFE') } let!(:designation) { create(:designation, :taxonomy => taxonomy) } - specify { expect(taxonomy.destroy).to be_falsey } + specify { taxonomy.destroy.should be_falsey } end context "when protected name" do - specify { expect(cites_eu.destroy).to be_falsey } + specify { cites_eu.destroy.should be_falsey } end end end diff --git a/spec/models/term_spec.rb b/spec/models/term_spec.rb index 03dc9bddf7..6b39148e4f 100644 --- a/spec/models/term_spec.rb +++ b/spec/models/term_spec.rb @@ -18,7 +18,7 @@ describe :destroy do context "when no dependent objects attached" do let(:term) { create(:term) } - specify { expect(term.destroy).to be_truthy } + specify { term.destroy.should be_truthy } end context "when dependent objects attached" do let(:term) { create(:term) } @@ -30,16 +30,16 @@ :start_notification_id => create_cites_suspension_notification.id ) } - specify { expect(term.destroy).to be_falsey } + specify { term.destroy.should be_falsey } end context "when CITES quota" do let(:geo_entity) { create(:geo_entity) } let!(:quota) { create(:quota, :terms => [term], :geo_entity_id => geo_entity.id) } - specify { expect(term.destroy).to be_falsey } + specify { term.destroy.should be_falsey } end context "when shipments" do before(:each) { create(:shipment, :term => term) } - specify { expect(term.destroy).to be_falsey } + specify { term.destroy.should be_falsey } end end end diff --git a/spec/models/trade/annual_report_upload_spec.rb b/spec/models/trade/annual_report_upload_spec.rb index 5009d6b86d..2838815d38 100644 --- a/spec/models/trade/annual_report_upload_spec.rb +++ b/spec/models/trade/annual_report_upload_spec.rb @@ -51,7 +51,7 @@ def invalid_file :csv_source_file => exporter_file ) } - specify { expect(subject).to be_valid } + specify { subject.should be_valid } end context "when uploaded file as importer with exporter column headers" do subject { @@ -61,7 +61,7 @@ def invalid_file :csv_source_file => exporter_file ) } - specify { expect(subject).not_to be_valid } + specify { subject.should_not be_valid } end context "when uploaded file as importer with importer column headers" do subject { @@ -71,7 +71,7 @@ def invalid_file :csv_source_file => importer_file ) } - specify { expect(subject).to be_valid } + specify { subject.should be_valid } end context "when uploaded file as exporter with importer column headers" do subject { @@ -81,7 +81,7 @@ def invalid_file :csv_source_file => importer_file ) } - specify { expect(subject).not_to be_valid } + specify { subject.should_not be_valid } end end @@ -96,7 +96,7 @@ def invalid_file :csv_source_file => importer_file ) } - specify { expect(subject.validation_errors).to be_empty } + specify { subject.validation_errors.should be_empty } end describe :create do @@ -111,7 +111,7 @@ def invalid_file } specify { sandbox_klass = Trade::SandboxTemplate.ar_klass(subject.sandbox.table_name) - expect(sandbox_klass.count).to eq(10) + sandbox_klass.count.should == 10 } end end @@ -125,7 +125,7 @@ def invalid_file ) } specify { - expect(subject.sandbox).to receive(:destroy) + subject.sandbox.should_receive(:destroy) subject.destroy } end diff --git a/spec/models/trade/distinct_values_validation_rule_spec.rb b/spec/models/trade/distinct_values_validation_rule_spec.rb index 4c3da03fcb..313384298b 100644 --- a/spec/models/trade/distinct_values_validation_rule_spec.rb +++ b/spec/models/trade/distinct_values_validation_rule_spec.rb @@ -51,7 +51,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(1) + subject.validation_errors_for_aru(@aru).size.should == 1 } end context 'exporter should not equal importer (I)' do @@ -68,7 +68,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(1) + subject.validation_errors_for_aru(@aru).size.should == 1 } end context 'exporter should not equal country of origin' do @@ -81,7 +81,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(1) + subject.validation_errors_for_aru(@aru).size.should == 1 } end end diff --git a/spec/models/trade/filter_spec.rb b/spec/models/trade/filter_spec.rb index df9ef90298..df0087ee40 100644 --- a/spec/models/trade/filter_spec.rb +++ b/spec/models/trade/filter_spec.rb @@ -12,9 +12,9 @@ :internal => false, :taxon_with_descendants => true }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject).not_to include(@shipment2) } - specify { expect(subject.length).to eq(2) } + specify { subject.should include(@shipment1) } + specify { subject.should_not include(@shipment2) } + specify { subject.length.should == 2 } end context "at FAMILY rank" do subject { Trade::Filter.new({ @@ -22,7 +22,7 @@ :internal => false, :taxon_with_descendants => false }).results } - specify { expect(subject.length).to eq(0) } + specify { subject.length.should == 0 } end end context "in the admin interface" do @@ -31,18 +31,18 @@ :taxon_concepts_ids => [@animal_genus.id], :internal => true }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject).not_to include(@shipment2) } - specify { expect(subject.length).to eq(2) } + specify { subject.should include(@shipment1) } + specify { subject.should_not include(@shipment2) } + specify { subject.length.should == 2 } end context "at FAMILY rank" do subject { Trade::Filter.new({ :taxon_concepts_ids => [@plant_family.id], :internal => true }).results } - specify { expect(subject).to include(@shipment2) } - specify { expect(subject).not_to include(@shipment1) } - specify { expect(subject.length).to eq(4) } + specify { subject.should include(@shipment2) } + specify { subject.should_not include(@shipment1) } + specify { subject.length.should == 4 } end context "at mixed ranks" do subject { @@ -51,9 +51,9 @@ :internal => true }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject).to include(@shipment2) } - specify { expect(subject.length).to eq(6) } + specify { subject.should include(@shipment1) } + specify { subject.should include(@shipment2) } + specify { subject.length.should == 6 } end end context "when status N shipments present" do @@ -65,7 +65,7 @@ :taxon_concepts_ids => [@status_N_species.id] }).results } - specify { expect(subject).to include(@shipment_of_status_N) } + specify { subject.should include(@shipment_of_status_N) } end context "when subspecies shipments present" do before(:each) do @@ -76,7 +76,7 @@ :taxon_concepts_ids => [@animal_species.id] }).results } - specify { expect(subject).to include(@shipment_of_subspecies) } + specify { subject.should include(@shipment_of_subspecies) } end context "when synonym subspecies shipments present" do before(:each) do @@ -92,7 +92,7 @@ :taxon_concepts_ids => [@animal_species.id] }).results } - specify { expect(subject).not_to include(@shipment_of_synonym_subspecies) } + specify { subject.should_not include(@shipment_of_synonym_subspecies) } end context "when searching by accepted name" do subject { @@ -100,7 +100,7 @@ :taxon_concepts_ids => [@plant_species.id] }).results } - specify { expect(subject).to include(@shipment_of_synonym_subspecies) } + specify { subject.should include(@shipment_of_synonym_subspecies) } end end end @@ -119,160 +119,160 @@ :reported_taxon_concepts_ids => [@trade_name.id] }).results } - specify { expect(subject).to include(@shipment_of_trade_name) } + specify { subject.should include(@shipment_of_trade_name) } end end context "when searching by appendices" do subject { Trade::Filter.new({ :appendices => ['I'] }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(1) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 1 } end context "when searching for terms_ids" do subject { Trade::Filter.new({ :terms_ids => [@term_cav.id] }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(3) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 3 } end context "when searching for units_ids" do subject { Trade::Filter.new({ :units_ids => [@unit.id] }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(3) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 3 } end context "when searching for purposes_ids" do subject { Trade::Filter.new({ :purposes_ids => [@purpose.id] }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(7) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 7 } end context "when searching for sources_ids" do context "when code" do subject { Trade::Filter.new({ :sources_ids => [@source.id] }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(2) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 2 } end context "when blank" do subject { Trade::Filter.new({ :source_blank => true }).results } - specify { expect(subject).to include(@shipment6) } - specify { expect(subject.length).to eq(1) } + specify { subject.should include(@shipment6) } + specify { subject.length.should == 1 } end context "when both code and blank" do subject { Trade::Filter.new({ :sources_ids => [@source.id], :source_blank => true }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(3) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 3 } end context "when wild" do subject { Trade::Filter.new({ :sources_ids => [@source_wild.id], :source_blank => true }).results } - specify { expect(subject).to include(@shipment3) } - specify { expect(subject.length).to eq(5) } + specify { subject.should include(@shipment3) } + specify { subject.length.should == 5 } end context "when wild and internal" do subject { Trade::Filter.new({ :sources_ids => [@source_wild.id], :source_blank => true, :internal => true }).results } - specify { expect(subject).to include(@shipment3) } - specify { expect(subject.length).to eq(4) } + specify { subject.should include(@shipment3) } + specify { subject.length.should == 4 } end end context "when searching for importers_ids" do subject { Trade::Filter.new({ :importers_ids => [@argentina.id] }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(2) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 2 } end context "when searching for exporters_ids" do subject { Trade::Filter.new({ :exporters_ids => [@argentina.id] }).results } - specify { expect(subject).to include(@shipment2) } - specify { expect(subject.length).to eq(5) } + specify { subject.should include(@shipment2) } + specify { subject.length.should == 5 } end context "when searching for countries_of_origin_ids" do subject { Trade::Filter.new({ :countries_of_origin_ids => [@argentina.id] }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(2) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 2 } end context "when searching by year" do context "when time range specified" do subject { Trade::Filter.new({ :time_range_start => 2013, :time_range_end => 2015 }).results } - specify { expect(subject).to include(@shipment2) } - specify { expect(subject.length).to eq(6) } + specify { subject.should include(@shipment2) } + specify { subject.length.should == 6 } end context "when time range specified incorrectly" do subject { Trade::Filter.new({ :time_range_start => 2013, :time_range_end => 2012 }).results } - specify { expect(subject.length).to eq(0) } + specify { subject.length.should == 0 } end context "when time range start specified" do subject { Trade::Filter.new({ :time_range_start => 2012 }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(7) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 7 } end context "when time range end specified" do subject { Trade::Filter.new({ :time_range_end => 2012 }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(1) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 1 } end end context "when searching by reporter_type" do context "when reporter type is not I or E" do subject { Trade::Filter.new({ :internal => true, :reporter_type => 'K' }).results } - specify { expect(subject.length).to eq(7) } + specify { subject.length.should == 7 } end context "when reporter type is I" do subject { Trade::Filter.new({ :internal => true, :reporter_type => 'I' }).results } - specify { expect(subject).to include(@shipment2) } - specify { expect(subject.length).to eq(5) } + specify { subject.should include(@shipment2) } + specify { subject.length.should == 5 } end context "when reporter type is E" do subject { Trade::Filter.new({ :internal => true, :reporter_type => 'E' }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(2) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 2 } end end context "when searching by permit" do context "when permit number" do subject { Trade::Filter.new({ :internal => true, :permits_ids => [@export_permit1.id] }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(1) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 1 } end context "when blank" do subject { Trade::Filter.new({ :internal => true, :permit_blank => true }).results } - specify { expect(subject).to include(@shipment2) } - specify { expect(subject.length).to eq(5) } + specify { subject.should include(@shipment2) } + specify { subject.length.should == 5 } end context "when both permit number and blank" do subject { Trade::Filter.new({ :internal => true, :permits_ids => [@export_permit1.id], :permit_blank => true }).results } - specify { expect(subject.length).to eq(6) } + specify { subject.length.should == 6 } end end context "when searching by quantity" do subject { Trade::Filter.new({ :internal => true, :quantity => 20 }).results } - specify { expect(subject).to include(@shipment1) } - specify { expect(subject.length).to eq(1) } + specify { subject.should include(@shipment1) } + specify { subject.length.should == 1 } end end describe :total_cnt do context "when none matches" do subject { Trade::Filter.new({ :appendices => ['III'] }) } - specify { expect(subject.total_cnt).to eq(0) } + specify { subject.total_cnt.should == 0 } end context "when one matches" do subject { Trade::Filter.new({ :appendices => ['I'] }) } - specify { expect(subject.total_cnt).to eq(1) } + specify { subject.total_cnt.should == 1 } end context "when two match" do subject { Trade::Filter.new({ :purposes_ids => [@purpose.id] }) } - specify { expect(subject.total_cnt).to eq(7) } + specify { subject.total_cnt.should == 7 } end end diff --git a/spec/models/trade/inclusion_validation_rule_spec.rb b/spec/models/trade/inclusion_validation_rule_spec.rb index e7612dc869..ff6f00ca80 100644 --- a/spec/models/trade/inclusion_validation_rule_spec.rb +++ b/spec/models/trade/inclusion_validation_rule_spec.rb @@ -149,7 +149,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload)).to be_empty + subject.validation_errors_for_aru(annual_report_upload).should be_empty } end context 'trading partner should be a valid iso code' do @@ -176,7 +176,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) + subject.validation_errors_for_aru(annual_report_upload).size.should == 1 } end context 'term can only be paired with unit as defined by term_trade_codes_pairs table' do @@ -203,7 +203,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) + subject.validation_errors_for_aru(annual_report_upload).size.should == 1 } end context "when required unit blank" do @@ -215,7 +215,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) + subject.validation_errors_for_aru(annual_report_upload).size.should == 1 } end end @@ -235,7 +235,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(2) + subject.validation_errors_for_aru(annual_report_upload).size.should == 2 } end context 'taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table' do @@ -256,7 +256,7 @@ end specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) + subject.validation_errors_for_aru(annual_report_upload).size.should == 1 } end context "when hybrid" do @@ -273,7 +273,7 @@ end specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) + subject.validation_errors_for_aru(annual_report_upload).size.should == 1 } end end diff --git a/spec/models/trade/permit_matcher_spec.rb b/spec/models/trade/permit_matcher_spec.rb index 10d95e86a8..e74cfd9618 100644 --- a/spec/models/trade/permit_matcher_spec.rb +++ b/spec/models/trade/permit_matcher_spec.rb @@ -7,23 +7,23 @@ end context "when regular query" do subject { Trade::PermitMatcher.new({ :permit_query => '006' }).results } - specify { expect(subject).to include(@permit) } + specify { subject.should include(@permit) } end context "when wildcard query" do subject { Trade::PermitMatcher.new({ :permit_query => '%AA' }).results } - specify { expect(subject).to include(@permit) } + specify { subject.should include(@permit) } end context "when malicious query" do subject { Trade::PermitMatcher.new({ :permit_query => '006\'' }).results } - specify { expect(subject).to be_empty } + specify { subject.should be_empty } end context "when leading whitespace" do subject { Trade::PermitMatcher.new({ :permit_query => ' 006' }).results } - specify { expect(subject).to include(@permit) } + specify { subject.should include(@permit) } end context "when trailing whitespace" do subject { Trade::PermitMatcher.new({ :permit_query => '006AAA ' }).results } - specify { expect(subject).to include(@permit) } + specify { subject.should include(@permit) } end end end diff --git a/spec/models/trade/pov_inclusion_validation_rule_spec.rb b/spec/models/trade/pov_inclusion_validation_rule_spec.rb index 7e028e6f87..3b02d2b41c 100644 --- a/spec/models/trade/pov_inclusion_validation_rule_spec.rb +++ b/spec/models/trade/pov_inclusion_validation_rule_spec.rb @@ -73,7 +73,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(1) + subject.validation_errors_for_aru(@aru).size.should == 1 } end context "when W source and country of origin blank and exporter doesn't match distribution (I)" do @@ -96,7 +96,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(1) + subject.validation_errors_for_aru(@aru).size.should == 1 } end context "when W source and country XX" do @@ -119,7 +119,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru)).to be_empty + subject.validation_errors_for_aru(@aru).should be_empty } end context "when W source and country doesn't match distribution of higher taxa" do @@ -142,7 +142,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru)).to be_empty + subject.validation_errors_for_aru(@aru).should be_empty } end context "when invalid scope specified" do diff --git a/spec/models/trade/sandbox_spec.rb b/spec/models/trade/sandbox_spec.rb index 6b2a91c240..876afdd971 100644 --- a/spec/models/trade/sandbox_spec.rb +++ b/spec/models/trade/sandbox_spec.rb @@ -47,7 +47,7 @@ specify { sandbox_klass = Trade::SandboxTemplate.ar_klass(subject.table_name) subject.destroy - expect(ActiveRecord::Base.connection.table_exists?('trade_sandbox_1')).to be_falsey + ActiveRecord::Base.connection.table_exists?('trade_sandbox_1').should be_falsey } end diff --git a/spec/models/trade/sandbox_template_spec.rb b/spec/models/trade/sandbox_template_spec.rb index 6be0160989..7b275bfcb5 100644 --- a/spec/models/trade/sandbox_template_spec.rb +++ b/spec/models/trade/sandbox_template_spec.rb @@ -55,7 +55,7 @@ end specify { @shipment1.update_attributes(:taxon_name => canis_aureus.full_name) - expect(@shipment1.reload.taxon_concept_id).to eq(canis_aureus.id) + @shipment1.reload.taxon_concept_id.should == canis_aureus.id } end @@ -76,13 +76,13 @@ ) end specify { - expect(@shipment.reload.taxon_concept_id).to be_nil + @shipment.reload.taxon_concept_id.should be_nil sandbox_klass.update_batch( { taxon_name: 'Canis lupus' }, @validation_error, annual_report_upload ) - expect(@shipment.reload.taxon_concept_id).to eq(canis_lupus.id) + @shipment.reload.taxon_concept_id.should == canis_lupus.id } end diff --git a/spec/models/trade/scoped_inclusion_validation_rule_spec.rb b/spec/models/trade/scoped_inclusion_validation_rule_spec.rb index f55cad3c84..1d9b324a38 100644 --- a/spec/models/trade/scoped_inclusion_validation_rule_spec.rb +++ b/spec/models/trade/scoped_inclusion_validation_rule_spec.rb @@ -19,7 +19,7 @@ create_taxon_concept_country_of_origin_validation } specify { - expect(subject.validation_errors(@aru).size).to eq(0) + subject.validation_errors(@aru).size.should == 0 } end @@ -46,7 +46,7 @@ create_taxon_concept_country_of_origin_validation } specify { - expect(subject.validation_errors(@aru).size).to eq(0) + subject.validation_errors(@aru).size.should == 0 } end diff --git a/spec/models/trade/shipment_spec.rb b/spec/models/trade/shipment_spec.rb index 3d5261f867..65395b15c7 100644 --- a/spec/models/trade/shipment_spec.rb +++ b/spec/models/trade/shipment_spec.rb @@ -38,15 +38,15 @@ describe :create do context "when reporter_type not given" do subject { build(:shipment, :reporter_type => nil) } - specify { expect(subject.error_on(:reporter_type).size).to eq(2) } + specify { subject.should have(2).error_on(:reporter_type) } end context "when appendix valid" do subject { build(:shipment, :appendix => 'N') } - specify { expect(subject).to be_valid } + specify { subject.should be_valid } end context "when appendix not valid" do subject { build(:shipment, :appendix => 'I/II') } - specify { expect(subject.error_on(:appendix).size).to eq(1) } + specify { subject.should have(1).error_on(:appendix) } end context "when permit numbers given" do before(:each) do @@ -57,13 +57,13 @@ ) end context "when export permit" do - specify { expect(@shipment.export_permit_number).to eq('A') } + specify { @shipment.export_permit_number.should == 'A' } end context "when import permit" do - specify { expect(@shipment.import_permit_number).to eq('B') } + specify { @shipment.import_permit_number.should == 'B' } end context "when origin permit" do - specify { expect(@shipment.origin_permit_number).to eq('C') } + specify { @shipment.origin_permit_number.should == 'C' } end end end @@ -120,7 +120,7 @@ :taxon_concept => @taxon_concept, :appendix => 'II', :year => 2013 ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "invalid" do subject { @@ -129,7 +129,7 @@ :taxon_concept => @taxon_concept, :appendix => 'N', :year => 2013 ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "valid" do subject { @@ -138,7 +138,7 @@ :taxon_concept => @taxon_concept, :appendix => 'I', :year => 2013 ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end end @@ -160,7 +160,7 @@ :taxon_concept => @taxon_concept, :appendix => 'N', :year => 2013 ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end end @@ -181,7 +181,7 @@ :taxon_concept => @taxon_concept, :appendix => 'N', :year => 2013 ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end end @@ -206,7 +206,7 @@ :term => @cav, :unit => @bag ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "valid" do subject { @@ -215,7 +215,7 @@ :term => @cav, :unit => @kil ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end context "blank unit is valid" do subject { @@ -224,7 +224,7 @@ :term => @cav, :unit => nil ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end context "blank unit is invalid" do subject { @@ -233,7 +233,7 @@ :term => @cap, :unit => nil ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end end context "when term + purpose" do @@ -252,7 +252,7 @@ :term => @cav, :purpose => @b ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "valid" do subject { @@ -261,7 +261,7 @@ :term => @cav, :purpose => @p ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end end context "when species name + term" do @@ -280,7 +280,7 @@ :taxon_concept => @taxon_concept, :term => @cav ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "valid" do subject { @@ -289,7 +289,7 @@ :taxon_concept => @taxon_concept, :term => @bal ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end end context "when species name + country of origin" do @@ -305,7 +305,7 @@ :country_of_origin => @poland ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "valid" do subject { @@ -316,7 +316,7 @@ :country_of_origin => @argentina ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end context "blank" do subject { @@ -327,7 +327,7 @@ :country_of_origin => nil ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end end context "when species name + exporter" do @@ -344,7 +344,7 @@ :exporter => @poland ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "valid" do subject { @@ -356,7 +356,7 @@ :exporter => @argentina ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end context "valid with XX" do subject { @@ -368,7 +368,7 @@ :exporter => @xx ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end end context "when exporter + country of origin" do @@ -384,7 +384,7 @@ :country_of_origin => @argentina ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "valid" do subject { @@ -395,7 +395,7 @@ :country_of_origin => @argentina ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end end context "when exporter + importer" do @@ -411,7 +411,7 @@ :exporter => @argentina ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "valid" do subject { @@ -422,7 +422,7 @@ :exporter => @argentina ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end end context "when species name + source code" do @@ -442,7 +442,7 @@ :source => @artificial ) } - specify { expect(subject.warnings).not_to be_empty } + specify { subject.warnings.should_not be_empty } end context "valid" do subject { @@ -452,7 +452,7 @@ :source => @wild ) } - specify { expect(subject.warnings).to be_empty } + specify { subject.warnings.should be_empty } end end end diff --git a/spec/models/trade/shipments_comptab_export_spec.rb b/spec/models/trade/shipments_comptab_export_spec.rb index 2371af5826..677aeb07eb 100644 --- a/spec/models/trade/shipments_comptab_export_spec.rb +++ b/spec/models/trade/shipments_comptab_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsComptabExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end context "when public" do subject { Trade::ShipmentsComptabExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end end describe :query do context "when internal" do subject { Trade::ShipmentsComptabExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.query.ntuples).to eq(4) } + specify { subject.query.ntuples.should == 4 } end context "when public" do subject { Trade::ShipmentsComptabExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.query.ntuples).to eq(3) } + specify { subject.query.ntuples.should == 3 } end end diff --git a/spec/models/trade/shipments_export_spec.rb b/spec/models/trade/shipments_export_spec.rb index 04c591339b..5fb7f56e3e 100644 --- a/spec/models/trade/shipments_export_spec.rb +++ b/spec/models/trade/shipments_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end context "when public" do subject { Trade::ShipmentsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end end describe :query do context "when internal" do subject { Trade::ShipmentsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.query.ntuples).to eq(4) } + specify { subject.query.ntuples.should == 4 } end context "when public" do subject { Trade::ShipmentsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.query.ntuples).to eq(3) } + specify { subject.query.ntuples.should == 3 } end end diff --git a/spec/models/trade/shipments_gross_exports_export_spec.rb b/spec/models/trade/shipments_gross_exports_export_spec.rb index a24542671e..731238ed3a 100644 --- a/spec/models/trade/shipments_gross_exports_export_spec.rb +++ b/spec/models/trade/shipments_gross_exports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end context "when public" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end end describe :query do context "when internal" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.query.ntuples).to eq(4) } + specify { subject.query.ntuples.should == 4 } end context "when public" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.query.ntuples).to eq(3) } + specify { subject.query.ntuples.should == 3 } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/shipments_gross_imports_export_spec.rb b/spec/models/trade/shipments_gross_imports_export_spec.rb index a4e5f25c0e..028853fbe1 100644 --- a/spec/models/trade/shipments_gross_imports_export_spec.rb +++ b/spec/models/trade/shipments_gross_imports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end context "when public" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end end describe :query do context "when internal" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.query.ntuples).to eq(4) } + specify { subject.query.ntuples.should == 4 } end context "when public" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.query.ntuples).to eq(3) } + specify { subject.query.ntuples.should == 3 } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/shipments_net_exports_export_spec.rb b/spec/models/trade/shipments_net_exports_export_spec.rb index 60a11f6afc..e7dd4e576d 100644 --- a/spec/models/trade/shipments_net_exports_export_spec.rb +++ b/spec/models/trade/shipments_net_exports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsNetExportsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end context "when public" do subject { Trade::ShipmentsNetExportsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end end describe :query do context "when internal" do subject { Trade::ShipmentsNetExportsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.query.ntuples).to eq(4) } + specify { subject.query.ntuples.should == 4 } end context "when public" do subject { Trade::ShipmentsNetExportsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.query.ntuples).to eq(3) } + specify { subject.query.ntuples.should == 3 } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/shipments_net_imports_export_spec.rb b/spec/models/trade/shipments_net_imports_export_spec.rb index 2cf261f6ea..5bca60f606 100644 --- a/spec/models/trade/shipments_net_imports_export_spec.rb +++ b/spec/models/trade/shipments_net_imports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsNetImportsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end context "when public" do subject { Trade::ShipmentsNetImportsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.total_cnt).to eq(4) } + specify { subject.total_cnt.should == 4 } end end describe :query do context "when internal" do subject { Trade::ShipmentsNetImportsExport.new(:internal => true, :per_page => 4) } - specify { expect(subject.query.ntuples).to eq(4) } + specify { subject.query.ntuples.should == 4 } end context "when public" do subject { Trade::ShipmentsNetImportsExport.new(:internal => false, :per_page => 3) } - specify { expect(subject.query.ntuples).to eq(3) } + specify { subject.query.ntuples.should == 3 } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb b/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb index 92e5cbbe5e..c141d8e3cb 100644 --- a/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb +++ b/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb @@ -76,7 +76,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(0) + subject.validation_errors_for_aru(@aru).size.should == 0 } end context "when old listing" do @@ -93,12 +93,12 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(1) + subject.validation_errors_for_aru(@aru).size.should == 1 } specify { subject.refresh_errors_if_needed(@aru) ve = subject.validation_errors_for_aru(@aru).first - expect(ve.error_message).to eq('taxon_name Loxodonta africana with appendix II with year 1996 is invalid') + ve.error_message.should == 'taxon_name Loxodonta africana with appendix II with year 1996 is invalid' } end context "when appendix N and CITES listed" do @@ -112,12 +112,12 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(1) + subject.validation_errors_for_aru(@aru).size.should == 1 } specify { subject.refresh_errors_if_needed(@aru) ve = subject.validation_errors_for_aru(@aru).first - expect(ve.error_message).to eq('taxon_name Loxodonta africana with appendix N with year 1996 is invalid') + ve.error_message.should == 'taxon_name Loxodonta africana with appendix N with year 1996 is invalid' } end context "when reported under a synonym, but otherwise fine" do @@ -131,7 +131,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(0) + subject.validation_errors_for_aru(@aru).size.should == 0 } end context "when hybrid" do @@ -168,7 +168,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(0) + subject.validation_errors_for_aru(@aru).size.should == 0 } end end @@ -184,7 +184,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(0) + subject.validation_errors_for_aru(@aru).size.should == 0 } end context "when not CITES listed and not EU listed" do @@ -199,7 +199,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - expect(subject.validation_errors_for_aru(@aru).size).to eq(1) + subject.validation_errors_for_aru(@aru).size.should == 1 } end end diff --git a/spec/models/trade/taxon_concept_source_validation_rule_spec.rb b/spec/models/trade/taxon_concept_source_validation_rule_spec.rb index 28b82a9ee2..af16dc1b1d 100644 --- a/spec/models/trade/taxon_concept_source_validation_rule_spec.rb +++ b/spec/models/trade/taxon_concept_source_validation_rule_spec.rb @@ -41,12 +41,12 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) + subject.validation_errors_for_aru(annual_report_upload).size.should == 1 } specify { subject.refresh_errors_if_needed(annual_report_upload) ve = subject.validation_errors_for_aru(annual_report_upload).first - expect(ve.error_message).to eq("taxon_name #{@animal.full_name} with source_code A is invalid") + ve.error_message.should == "taxon_name #{@animal.full_name} with source_code A is invalid" } end context "when species name is from Kingdom Plantae, source_code can't be C or R" do @@ -62,7 +62,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(2) + subject.validation_errors_for_aru(annual_report_upload).size.should == 2 } end end diff --git a/spec/models/trade/validation_rule_spec.rb b/spec/models/trade/validation_rule_spec.rb index b236d58596..3f8b4794f1 100644 --- a/spec/models/trade/validation_rule_spec.rb +++ b/spec/models/trade/validation_rule_spec.rb @@ -137,7 +137,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) + subject.validation_errors_for_aru(annual_report_upload).size.should == 1 } end end @@ -158,7 +158,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) + subject.validation_errors_for_aru(annual_report_upload).size.should == 1 } end end @@ -175,7 +175,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) + subject.validation_errors_for_aru(annual_report_upload).size.should == 1 } end end diff --git a/spec/models/trade_restriction_spec.rb b/spec/models/trade_restriction_spec.rb index 00b953f3b6..f2b0b23afe 100644 --- a/spec/models/trade_restriction_spec.rb +++ b/spec/models/trade_restriction_spec.rb @@ -46,11 +46,11 @@ end it "should return @quota1 if filter set to current" do result = Quota.filter_is_current("current") - expect(result).to eq([@quota1]) + result.should == [@quota1] end it 'should return both @quota1 and @quota2 if filter set to "all"' do result = Quota.filter_is_current("all") - expect(result).to match_array([@quota1, @quota2]) + result.should =~ [@quota1, @quota2] end end @@ -67,15 +67,15 @@ end it 'should get all quotas if geo_entities filter not set' do result = Quota.filter_geo_entities({}) - expect(result).to match_array([@quota1, @quota2, @quota3, @quota4]) + result.should =~ [@quota1, @quota2, @quota3, @quota4] end it 'should return quota1 and quota3 if geo_entities filter set to @geo_entity1' do result = Quota.filter_geo_entities({ "geo_entities_ids" => [@geo_entity1.id] }) - expect(result).to match_array([@quota1, @quota3]) + result.should =~ [@quota1, @quota3] end it 'should return quota1, quota3, and quota4 if geo_entities filter set to @geo_entity1 and @geo_entity3' do result = Quota.filter_geo_entities({ "geo_entities_ids" => [@geo_entity1.id, @geo_entity3.id] }) - expect(result).to match_array([@quota1, @quota3, @quota4]) + result.should =~ [@quota1, @quota3, @quota4] end end @@ -89,15 +89,15 @@ end it 'should get all quotas if years filter not set' do result = Quota.filter_years({}) - expect(result).to match_array([@quota1, @quota2, @quota3, @quota4]) + result.should =~ [@quota1, @quota2, @quota3, @quota4] end it 'should return quota1 and quota3 if years filter set to 2012' do result = Quota.filter_years({ "years" => [2012] }) - expect(result).to match_array([@quota1, @quota3]) + result.should =~ [@quota1, @quota3] end it 'should return quota1, quota3, and quota4 if years filter set to 2012 and 2013' do result = Quota.filter_years({ "years" => [2012, 2013] }) - expect(result).to match_array([@quota1, @quota3, @quota4]) + result.should =~ [@quota1, @quota3, @quota4] end end end diff --git a/spec/models/unit_spec.rb b/spec/models/unit_spec.rb index 296529fc5c..ad8e4725dc 100644 --- a/spec/models/unit_spec.rb +++ b/spec/models/unit_spec.rb @@ -18,18 +18,18 @@ describe :destroy do context "when no dependent objects attached" do let(:unit) { create(:unit) } - specify { expect(unit.destroy).to be_truthy } + specify { unit.destroy.should be_truthy } end context "when dependent objects attached" do let(:unit) { create(:unit) } context "when quotas" do let(:geo_entity) { create(:geo_entity) } let!(:quota) { create(:quota, :unit => unit, :geo_entity_id => geo_entity.id) } - specify { expect(unit.destroy).to be_falsey } + specify { unit.destroy.should be_falsey } end context "when shipments" do before(:each) { create(:shipment, :unit => unit) } - specify { expect(unit.destroy).to be_falsey } + specify { unit.destroy.should be_falsey } end end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 94508582db..27c62321ac 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -36,7 +36,7 @@ describe :destroy do context "when no dependent objects attached" do let(:user) { create(:user) } - specify { expect(user.destroy).to be_truthy } + specify { user.destroy.should be_truthy } end context "when dependent objects attached" do let(:user) { create(:user) } @@ -44,7 +44,7 @@ user.make_current create(:shipment) end - specify { expect(user.destroy).to be_falsey } + specify { user.destroy.should be_falsey } end end @@ -55,38 +55,38 @@ context "when is a Data Manager" do let(:user) { create(:user, role: User::MANAGER) } - it { is_expected.to be_able_to(:manage, :all) } + it { should be_able_to(:manage, :all) } end context "when is a Data Contributor" do let(:user) { create(:user, role: User::CONTRIBUTOR) } - it { is_expected.to be_able_to(:create, TaxonConcept) } - it { is_expected.not_to be_able_to(:destroy, TaxonConcept) } + it { should be_able_to(:create, TaxonConcept) } + it { should_not be_able_to(:destroy, TaxonConcept) } end context "when is a E-library Viewer" do let(:user) { create(:user, role: User::ELIBRARY_USER) } - it { is_expected.not_to be_able_to(:manage, TaxonConcept) } + it { should_not be_able_to(:manage, TaxonConcept) } end context "when is an API User" do let(:user) { create(:user, role: User::API_USER) } - it { is_expected.not_to be_able_to(:manage, TaxonConcept) } + it { should_not be_able_to(:manage, TaxonConcept) } end context "when is a Secretariat" do let(:user) { create(:user, role: User::SECRETARIAT) } - it { is_expected.not_to be_able_to(:create, :all) } - it { is_expected.not_to be_able_to(:update, :all) } - it { is_expected.not_to be_able_to(:destroy, :all) } + it { should_not be_able_to(:create, :all) } + it { should_not be_able_to(:update, :all) } + it { should_not be_able_to(:destroy, :all) } end context "when is not active" do let(:user) { create(:user, role: User::MANAGER, is_active: false) } - it { is_expected.not_to be_able_to(:create, :all) } - it { is_expected.not_to be_able_to(:update, :all) } - it { is_expected.not_to be_able_to(:destroy, :all) } + it { should_not be_able_to(:create, :all) } + it { should_not be_able_to(:update, :all) } + it { should_not be_able_to(:destroy, :all) } end end end diff --git a/spec/workers/eu_regulation_activation_worker_spec.rb b/spec/workers/eu_regulation_activation_worker_spec.rb index 3e9789cd54..dadd184bf5 100644 --- a/spec/workers/eu_regulation_activation_worker_spec.rb +++ b/spec/workers/eu_regulation_activation_worker_spec.rb @@ -29,16 +29,16 @@ EuRegulationActivationWorker.new.perform(eu_regulation.id, true) end - specify { expect(eu_regulation.listing_changes.reload.first.is_current).to be_truthy } - specify { expect(prev_eu_regulation.listing_changes.reload.first.is_current).to be_truthy } + specify { eu_regulation.listing_changes.reload.first.is_current.should be_truthy } + specify { prev_eu_regulation.listing_changes.reload.first.is_current.should be_truthy } describe "Set old EU regulation to false" do before do EuRegulationActivationWorker.new.perform(prev_eu_regulation.id, false) end - specify { expect(eu_regulation.listing_changes.reload.first.is_current).to be_truthy } - specify { expect(prev_eu_regulation.listing_changes.reload.first.is_current).to be_falsey } + specify { eu_regulation.listing_changes.reload.first.is_current.should be_truthy } + specify { prev_eu_regulation.listing_changes.reload.first.is_current.should be_falsey } end end diff --git a/spec/workers/event_listing_changes_copy_worker_spec.rb b/spec/workers/event_listing_changes_copy_worker_spec.rb index 2650a87b06..7538921e6f 100644 --- a/spec/workers/event_listing_changes_copy_worker_spec.rb +++ b/spec/workers/event_listing_changes_copy_worker_spec.rb @@ -39,14 +39,14 @@ ) } before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - specify { expect(eu_regulation.listing_changes.reload.count).to eq(1) } - specify { expect(eu_regulation.listing_changes.first.is_current).to be_falsey } + specify { eu_regulation.listing_changes.reload.count.should == 1 } + specify { eu_regulation.listing_changes.first.is_current.should be_falsey } end context "when copy into current regulation" do before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - specify { expect(eu_regulation.listing_changes.reload.count).to eq(1) } - specify { expect(eu_regulation.listing_changes.first.is_current).to be_truthy } + specify { eu_regulation.listing_changes.reload.count.should == 1 } + specify { eu_regulation.listing_changes.first.is_current.should be_truthy } end context "when exclusion" do @@ -67,10 +67,10 @@ } before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - specify { expect(eu_regulation.listing_changes.reload.count).to eq(1) } - specify { expect(eu_regulation.listing_changes.first.exclusions.count).to eq(2) } - specify { expect(eu_regulation.listing_changes.first.taxonomic_exclusions.count).to eq(1) } - specify { expect(eu_regulation.listing_changes.first.geographic_exclusions.count).to eq(1) } + specify { eu_regulation.listing_changes.reload.count.should == 1 } + specify { eu_regulation.listing_changes.first.exclusions.count.should == 2 } + specify { eu_regulation.listing_changes.first.taxonomic_exclusions.count.should == 1 } + specify { eu_regulation.listing_changes.first.geographic_exclusions.count.should == 1 } end end diff --git a/spec/workers/quotas_copy_worker_spec.rb b/spec/workers/quotas_copy_worker_spec.rb index 847957f607..996be3e8b8 100644 --- a/spec/workers/quotas_copy_worker_spec.rb +++ b/spec/workers/quotas_copy_worker_spec.rb @@ -44,10 +44,10 @@ before(:each) do QuotasCopyWorker.new.perform(job_defaults) end - specify { expect(Quota.count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(1) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } - specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } + specify { Quota.count(true).should == 2 } + specify { Quota.where(:is_current => true).count(true).should == 1 } + specify { Quota.where(:is_current => false).count(true).should == 1 } + specify { Quota.where(:is_current => false).first.id.should == quota.id } end describe "Try to copy quota from wrong year" do @@ -56,9 +56,9 @@ "from_year" => quota.start_date.year + 1 })) end - specify { expect(Quota.count(true)).to eq(1) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(1) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(0) } + specify { Quota.count(true).should == 1 } + specify { Quota.where(:is_current => true).count(true).should == 1 } + specify { Quota.where(:is_current => false).count(true).should == 0 } end describe "Copy quota when there are no current quotas" do @@ -67,9 +67,9 @@ quota.save QuotasCopyWorker.new.perform(job_defaults) end - specify { expect(Quota.count(true)).to eq(1) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(0) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { Quota.count(true).should == 1 } + specify { Quota.where(:is_current => true).count(true).should == 0 } + specify { Quota.where(:is_current => false).count(true).should == 1 } end describe "When multiple quotas copy quota for given country" do @@ -87,11 +87,11 @@ "included_geo_entities_ids" => [geo_entity.id] })) end - specify { expect(Quota.count(true)).to eq(3) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } - specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } + specify { Quota.count(true).should == 3 } + specify { Quota.where(:is_current => true).count(true).should == 2 } + specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } + specify { Quota.where(:is_current => false).count(true).should == 1 } + specify { Quota.where(:is_current => false).first.id.should == quota.id } end describe "When multiple quotas copy quota for both countries" do @@ -109,11 +109,11 @@ "included_geo_entities_ids" => [geo_entity.id.to_s, geo_entity2.id.to_s] })) end - specify { expect(Quota.count(true)).to eq(4) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => false).map(&:id)).to include(quota.id) } - specify { expect(Quota.where(:is_current => false).map(&:id)).to include(@quota2.id) } + specify { Quota.count(true).should == 4 } + specify { Quota.where(:is_current => true).count(true).should == 2 } + specify { Quota.where(:is_current => false).count(true).should == 2 } + specify { Quota.where(:is_current => false).map(&:id).should include(quota.id) } + specify { Quota.where(:is_current => false).map(&:id).should include(@quota2.id) } end describe "When multiple quotas don't copy quota for given country" do @@ -131,11 +131,11 @@ "excluded_geo_entities_ids" => [geo_entity2.id.to_s] })) end - specify { expect(Quota.count(true)).to eq(3) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } - specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } + specify { Quota.count(true).should == 3 } + specify { Quota.where(:is_current => true).count(true).should == 2 } + specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } + specify { Quota.where(:is_current => false).count(true).should == 1 } + specify { Quota.where(:is_current => false).first.id.should == quota.id } end describe "When multiple quotas copy quota for given taxon_concept" do @@ -152,11 +152,11 @@ "included_taxon_concepts_ids" => quota.taxon_concept_id.to_s })) end - specify { expect(Quota.count(true)).to eq(3) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } - specify { expect(Quota.where(:is_current => false).map(&:id)).to include(quota.id) } + specify { Quota.count(true).should == 3 } + specify { Quota.where(:is_current => true).count(true).should == 2 } + specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } + specify { Quota.where(:is_current => false).count(true).should == 1 } + specify { Quota.where(:is_current => false).map(&:id).should include(quota.id) } end describe "When multiple quotas copy quota for both taxon_concepts" do @@ -174,11 +174,11 @@ "included_taxon_concepts_ids" => "#{taxon_concept.id},#{tc.id}" })) end - specify { expect(Quota.count(true)).to eq(4) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(@quota2.id) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => false).map(&:id)).to include(quota.id) } + specify { Quota.count(true).should == 4 } + specify { Quota.where(:is_current => true).count(true).should == 2 } + specify { Quota.where(:is_current => true).map(&:id).should_not include(@quota2.id) } + specify { Quota.where(:is_current => false).count(true).should == 2 } + specify { Quota.where(:is_current => false).map(&:id).should include(quota.id) } end describe "When multiple quotas don't copy quota for given taxon_concept" do @@ -195,11 +195,11 @@ "excluded_taxon_concepts_ids" => tc.id.to_s })) end - specify { expect(Quota.count(true)).to eq(3) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } - specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } + specify { Quota.count(true).should == 3 } + specify { Quota.where(:is_current => true).count(true).should == 2 } + specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } + specify { Quota.where(:is_current => false).count(true).should == 1 } + specify { Quota.where(:is_current => false).first.id.should == quota.id } end describe "When text to replace passed, should be replaced" do @@ -219,14 +219,14 @@ })) end - specify { expect(Quota.count(true)).to eq(4) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(@quota2.id) } - specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(quota.id) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).map(&:notes)).to include(@quota2.notes) } - specify { expect(Quota.where(:is_current => true).map(&:notes)).not_to include(quota.notes) } - specify { expect(Quota.where(:is_current => true).map(&:notes)).to include('Le Salmon is my favourite fish') } + specify { Quota.count(true).should == 4 } + specify { Quota.where(:is_current => true).count(true).should == 2 } + specify { Quota.where(:is_current => true).map(&:id).should_not include(@quota2.id) } + specify { Quota.where(:is_current => true).map(&:id).should_not include(quota.id) } + specify { Quota.where(:is_current => false).count(true).should == 2 } + specify { Quota.where(:is_current => true).map(&:notes).should include(@quota2.notes) } + specify { Quota.where(:is_current => true).map(&:notes).should_not include(quota.notes) } + specify { Quota.where(:is_current => true).map(&:notes).should include('Le Salmon is my favourite fish') } end describe "When url passed, should be replaced" do @@ -242,11 +242,11 @@ :notes => "Derp di doo wildlife") QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) end - specify { expect(Quota.count(true)).to eq(4) } - specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(@quota2.id) } - specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(quota.id) } - specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } - specify { expect(Quota.where(:is_current => true).map(&:url)).to include('http://myurl.co.uk') } + specify { Quota.count(true).should == 4 } + specify { Quota.where(:is_current => true).count(true).should == 2 } + specify { Quota.where(:is_current => true).map(&:id).should_not include(@quota2.id) } + specify { Quota.where(:is_current => true).map(&:id).should_not include(quota.id) } + specify { Quota.where(:is_current => false).count(true).should == 2 } + specify { Quota.where(:is_current => true).map(&:url).should include('http://myurl.co.uk') } end end From 4efade856600599e6204d9359ab86d4feab67c8a Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 17:10:32 +0000 Subject: [PATCH 063/334] Revert "transpec" This reverts commit 0ff20ae52ced7987c5adb2691cef6749e41d1472. --- spec/workers/submission_worker_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/workers/submission_worker_spec.rb b/spec/workers/submission_worker_spec.rb index 9279eb300f..44ca697554 100644 --- a/spec/workers/submission_worker_spec.rb +++ b/spec/workers/submission_worker_spec.rb @@ -64,7 +64,7 @@ def deliver } specify "leading space is stripped" do SubmissionWorker.new.perform(@aru.id, @submitter.id) - expect(Trade::Permit.find_by_number('BBB')).not_to be_nil + Trade::Permit.find_by_number('BBB').should_not be_nil end context "when permit previously reported" do before(:each) { create(:permit, :number => 'xxx') } @@ -127,11 +127,11 @@ def deliver } specify { SubmissionWorker.new.perform(@aru.id, @submitter.id) - expect(Trade::Shipment.first.taxon_concept_id).to eq(@species.id) + Trade::Shipment.first.taxon_concept_id.should == @species.id } specify { SubmissionWorker.new.perform(@aru.id, @submitter.id) - expect(Trade::Shipment.first.reported_taxon_concept_id).to eq(@synonym.id) + Trade::Shipment.first.reported_taxon_concept_id.should == @synonym.id } end end From abba38d911746a85771d7ab28d9511b89cb1c700 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 17:24:59 +0000 Subject: [PATCH 064/334] rollback rspec 3 syntax --- spec/controllers/cites_trade/exports_controller_spec.rb | 6 +++--- spec/models/checklist/pdf/history_annotations_key_spec.rb | 4 ++-- spec/models/checklist/pdf/index_annotations_key_spec.rb | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/controllers/cites_trade/exports_controller_spec.rb b/spec/controllers/cites_trade/exports_controller_spec.rb index f0ad108bf9..b82475bbd2 100644 --- a/spec/controllers/cites_trade/exports_controller_spec.rb +++ b/spec/controllers/cites_trade/exports_controller_spec.rb @@ -22,9 +22,9 @@ end it "logs download information from public interface to the TradeDataDownload model" do create(:shipment) - expect_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') - allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) - allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") + Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') + Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) + Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") lambda do get :download, :filters => { :report_type => 'comptab', diff --git a/spec/models/checklist/pdf/history_annotations_key_spec.rb b/spec/models/checklist/pdf/history_annotations_key_spec.rb index 695760bc3a..c7e017c25e 100644 --- a/spec/models/checklist/pdf/history_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/history_annotations_key_spec.rb @@ -6,8 +6,8 @@ describe :annotations_key do subject { Checklist::Pdf::HistoryAnnotationsKey.new } specify { - allow(subject).to receive(:non_hash_annotations_key).and_return('x') - allow(subject).to receive(:hash_annotations_key).and_return('x') + subject.stub(:non_hash_annotations_key).and_return('x') + subject.stub(:hash_annotations_key).and_return('x') subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in" } end diff --git a/spec/models/checklist/pdf/index_annotations_key_spec.rb b/spec/models/checklist/pdf/index_annotations_key_spec.rb index d1cbe83d79..1b944817db 100644 --- a/spec/models/checklist/pdf/index_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/index_annotations_key_spec.rb @@ -6,8 +6,8 @@ describe :annotations_key do subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - allow(subject).to receive(:non_hash_annotations_key).and_return('x') - allow(subject).to receive(:hash_annotations_key).and_return('x') + subject.stub(:non_hash_annotations_key).and_return('x') + subject.stub(:hash_annotations_key).and_return('x') subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in" } end @@ -100,7 +100,7 @@ end subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - allow(LatexToPdf).to receive(:html2latex).and_return('x') + LatexToPdf.stub(:html2latex).and_return('x') subject.non_hash_annotations_key.should == "\\section*{\\nonHashAnnotations}\n\\cfbox{orange}{\\superscript{1} \\textbf{\\textit{Foobarus bizarrus}}}\n\nx\n\n\\cfbox{green}{\\superscript{2} \\textbf{\\textit{Foobaria curiosa}}}\n\nx\n\n" } end From 5cfe78fad351ebf94357c4078e57ef2559417a14 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Wed, 10 Jan 2024 17:27:47 +0000 Subject: [PATCH 065/334] rollback timecop --- Gemfile | 1 + Gemfile.lock | 2 ++ .../timelines_for_taxon_concept_spec.rb | 4 ++-- spec/models/cites_suspension_spec.rb | 4 ++-- spec/models/document_search_spec.rb | 16 ++++++------- .../trade/inclusion_validation_rule_spec.rb | 24 +++++++++---------- spec/models/trade/validation_rule_spec.rb | 24 +++++++++---------- spec/spec_helper.rb | 1 - 8 files changed, 37 insertions(+), 39 deletions(-) diff --git a/Gemfile b/Gemfile index 787fdaaca6..d539a28b5d 100644 --- a/Gemfile +++ b/Gemfile @@ -118,6 +118,7 @@ group :test, :development do gem 'rspec-collection_matchers', '1.1.3' gem "json_spec", '1.1.5' gem "database_cleaner", "1.2.0" # TODO, should remove after upgrade Rails. + gem "timecop", '0.6.3' gem "launchy", '2.4.3' # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' diff --git a/Gemfile.lock b/Gemfile.lock index 953d8cabdd..aadfea1e44 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -524,6 +524,7 @@ GEM thor (0.20.3) thread_safe (0.3.6) tilt (1.3.7) + timecop (0.6.3) timeout (0.4.0) tins (1.32.1) sync @@ -656,6 +657,7 @@ DEPENDENCIES susy (= 2.2.14) test-unit (= 3.1.5) traco (~> 5.3, >= 5.3.3) + timecop (= 0.6.3) uglifier (= 2.7.2) underscore-rails (= 1.4.3) web-console (~> 2.0) diff --git a/spec/models/checklist/timelines_for_taxon_concept_spec.rb b/spec/models/checklist/timelines_for_taxon_concept_spec.rb index dee5ddb570..5072ccd499 100644 --- a/spec/models/checklist/timelines_for_taxon_concept_spec.rb +++ b/spec/models/checklist/timelines_for_taxon_concept_spec.rb @@ -2,11 +2,11 @@ describe Checklist::TimelinesForTaxonConcept do before do - travel_to Time.local(1990) + Timecop.freeze(Time.local(1990)) end after do - travel_back + Timecop.return end describe :timelines do diff --git a/spec/models/cites_suspension_spec.rb b/spec/models/cites_suspension_spec.rb index 1708bef946..ab12ebc0b6 100644 --- a/spec/models/cites_suspension_spec.rb +++ b/spec/models/cites_suspension_spec.rb @@ -50,7 +50,7 @@ ) } before do - travel -10.minutes + Timecop.freeze(10.minutes.ago) @genus = create_cites_eu_genus @taxon_concept = create_cites_eu_species(parent: @genus) @another_taxon_concept = create_cites_eu_species @@ -64,7 +64,7 @@ :taxon_concept_id => @another_taxon_concept.id, :geo_entity_id => rwanda.id ) - travel_back + Timecop.return end context "touching taxa" do diff --git a/spec/models/document_search_spec.rb b/spec/models/document_search_spec.rb index 87ae859b43..4731ec947a 100644 --- a/spec/models/document_search_spec.rb +++ b/spec/models/document_search_spec.rb @@ -291,7 +291,7 @@ describe :documents_need_refreshing? do before(:each) do @d = nil - travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do + Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do @d = create(:proposal) DocumentSearch.refresh_citations_and_documents end @@ -301,7 +301,7 @@ end context "when document created in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do create(:proposal) end expect(DocumentSearch.documents_need_refreshing?).to be_truthy @@ -309,7 +309,7 @@ end context "when document destroyed in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @d.destroy end expect(DocumentSearch.documents_need_refreshing?).to be_truthy @@ -317,7 +317,7 @@ end context "when document updated in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @d.update_attributes(is_public: true) end expect(DocumentSearch.documents_need_refreshing?).to be_truthy @@ -328,7 +328,7 @@ describe :citations_need_refreshing? do before(:each) do @d = nil - travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do + Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do @d = create(:proposal) @c = create(:document_citation, document: @d) @c_tc = create(:document_citation_taxon_concept, document_citation: @c) @@ -340,7 +340,7 @@ end context "when citation created in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do create(:document_citation_taxon_concept, document_citation: @c) end expect(DocumentSearch.citations_need_refreshing?).to be_truthy @@ -348,7 +348,7 @@ end context "when citation destroyed in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @c_tc.destroy end expect(DocumentSearch.citations_need_refreshing?).to be_truthy @@ -356,7 +356,7 @@ end context "when citation updated in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @c_tc.update_attributes(taxon_concept_id: create_cites_eu_species.id) end expect(DocumentSearch.citations_need_refreshing?).to be_truthy diff --git a/spec/models/trade/inclusion_validation_rule_spec.rb b/spec/models/trade/inclusion_validation_rule_spec.rb index ff6f00ca80..b0a34dbca1 100644 --- a/spec/models/trade/inclusion_validation_rule_spec.rb +++ b/spec/models/trade/inclusion_validation_rule_spec.rb @@ -110,24 +110,22 @@ context "when updates and error fixed for all records" do specify "error record is destroyed" do - travel_to(Time.now + 1) do - @shipment2.update_attributes(taxon_name: 'Canis lupus') - @shipment3.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { Trade::ValidationError.count }.by(-1) - end + Timecop.travel(Time.now + 1) + @shipment2.update_attributes(taxon_name: 'Canis lupus') + @shipment3.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { Trade::ValidationError.count }.by(-1) end end context "when updates and error fixed for some records" do specify "error record is updated to reflect new error_count" do - travel_to(Time.now + 1) do - @shipment2.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { @validation_error.reload.error_count }.by(-1) - end + Timecop.travel(Time.now + 1) + @shipment2.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { @validation_error.reload.error_count }.by(-1) end end diff --git a/spec/models/trade/validation_rule_spec.rb b/spec/models/trade/validation_rule_spec.rb index 3f8b4794f1..b7f88b79ff 100644 --- a/spec/models/trade/validation_rule_spec.rb +++ b/spec/models/trade/validation_rule_spec.rb @@ -100,24 +100,22 @@ context "when updates and error fixed for all records" do specify "error record is destroyed" do - travel_to(Time.now + 1) do - @shipment2.update_attributes(taxon_name: 'Canis lupus') - @shipment3.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { Trade::ValidationError.count }.by(-1) - end + Timecop.travel(Time.now + 1) + @shipment2.update_attributes(taxon_name: 'Canis lupus') + @shipment3.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { Trade::ValidationError.count }.by(-1) end end context "when updates and error fixed for some records" do specify "error record is updated to reflect new error_count" do - travel_to(Time.now + 1) do - @shipment2.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { @validation_error.reload.error_count }.by(-1) - end + Timecop.travel(Time.now + 1) + @shipment2.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { @validation_error.reload.error_count }.by(-1) end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6ecce131b9..00735d6b37 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -46,7 +46,6 @@ config.infer_base_class_for_anonymous_controllers = true config.infer_spec_type_from_file_location! - config.include ActiveSupport::Testing::TimeHelpers config.include Devise::Test::ControllerHelpers, type: :controller config.extend ControllerMacros, :type => :controller From b6380900f904e352bcf1aec418d0de185233441c Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 11 Jan 2024 12:23:27 +0000 Subject: [PATCH 066/334] patch Arel 6.0.4 --- config/initializers/arel_patch.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 config/initializers/arel_patch.rb diff --git a/config/initializers/arel_patch.rb b/config/initializers/arel_patch.rb new file mode 100644 index 0000000000..eeaf7e6989 --- /dev/null +++ b/config/initializers/arel_patch.rb @@ -0,0 +1,13 @@ +# TODO: May need to remove this file when upgrade Rails. +# https://github.com/rails/arel/pull/470 +# Backport Arel 8.0.0 code to 6.0.4, to fix eq(nil) generate `= NULL` instead of `IS NULL`. +# https://github.com/rails/arel/blob/d6af2090b16f7d061aa43913d610c6fada58b7e2/lib/arel/nodes/casted.rb#L27 + +module Arel + module Nodes + class Quoted < Arel::Nodes::Unary # :nodoc: + alias :val :value # <-- Backport + def nil?; val.nil?; end # <-- Backport + end + end +end From 9fcb4d410180496e59f8ce6e8400520f57ceaa1a Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 11 Jan 2024 13:01:38 +0000 Subject: [PATCH 067/334] downgrade wicked gem to keep same behaviour --- Gemfile | 6 +++++- Gemfile.lock | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index d539a28b5d..4ca418674f 100644 --- a/Gemfile +++ b/Gemfile @@ -27,7 +27,11 @@ gem 'cancancan', '1.17.0' # TODO, need upgrade to 2.0 for Rails 5 gem 'ahoy_matey', '1.6.1' # TODO: latest 5.0.2. Can't upgrade to 2.0 until upgrade to Rails 5 gem 'browser', '2.5.3' # Latest 5.3.1 @ 2021, doesn't work with this project, maybe try again after upgrade ruby > 2.5 and rails >= 5 -gem 'wicked', '~> 2.0' # TODO: latest +# TODO: starting from v1.4, it break our test due to redirection changes: +# rspec ./spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb:147 +# rspec ./spec/controllers/admin/nomenclature_changes/split_controller_spec.rb:191 +gem 'wicked', '~> 1.3', '>= 1.3.4' + gem 'groupdate', '2.4.0' # TODO: seems only ApiRequest#recent_requests using this. Suggest rewrite and remove dependencies. gem 'rubyzip', '~> 2.3', '>= 2.3.2' # TODO: latest diff --git a/Gemfile.lock b/Gemfile.lock index aadfea1e44..129ab2339f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -553,7 +553,7 @@ GEM webrick (1.3.1) whenever (0.11.0) chronic (>= 0.6.3) - wicked (2.0.0) + wicked (1.3.4) railties (>= 3.0.7) wkhtmltopdf-binary (0.12.6.6) xpath (2.1.0) @@ -656,14 +656,14 @@ DEPENDENCIES sprockets (= 2.12.5) susy (= 2.2.14) test-unit (= 3.1.5) - traco (~> 5.3, >= 5.3.3) timecop (= 0.6.3) + traco (~> 5.3, >= 5.3.3) uglifier (= 2.7.2) underscore-rails (= 1.4.3) web-console (~> 2.0) webrick (= 1.3.1) whenever (= 0.11.0) - wicked (~> 2.0) + wicked (= 1.3.4) wkhtmltopdf-binary (~> 0.12.6.6) RUBY VERSION From 7a12ce787a21bcb578dcfdb1e4a832c6e60fa764 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 11 Jan 2024 13:14:15 +0000 Subject: [PATCH 068/334] commit missed gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 129ab2339f..111b11d497 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -663,7 +663,7 @@ DEPENDENCIES web-console (~> 2.0) webrick (= 1.3.1) whenever (= 0.11.0) - wicked (= 1.3.4) + wicked (~> 1.3, >= 1.3.4) wkhtmltopdf-binary (~> 0.12.6.6) RUBY VERSION From 4c8b734dafb49c343f2646c28d18013e98611123 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 11 Jan 2024 13:39:13 +0000 Subject: [PATCH 069/334] Remove timecop gem, again. --- Gemfile | 1 - Gemfile.lock | 2 -- .../timelines_for_taxon_concept_spec.rb | 4 ++-- spec/models/cites_suspension_spec.rb | 4 ++-- spec/models/document_search_spec.rb | 16 ++++++------- .../trade/inclusion_validation_rule_spec.rb | 24 ++++++++++--------- spec/models/trade/validation_rule_spec.rb | 24 ++++++++++--------- spec/spec_helper.rb | 1 + 8 files changed, 39 insertions(+), 37 deletions(-) diff --git a/Gemfile b/Gemfile index 4ca418674f..952b84de3e 100644 --- a/Gemfile +++ b/Gemfile @@ -122,7 +122,6 @@ group :test, :development do gem 'rspec-collection_matchers', '1.1.3' gem "json_spec", '1.1.5' gem "database_cleaner", "1.2.0" # TODO, should remove after upgrade Rails. - gem "timecop", '0.6.3' gem "launchy", '2.4.3' # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' diff --git a/Gemfile.lock b/Gemfile.lock index 111b11d497..fd66980323 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -524,7 +524,6 @@ GEM thor (0.20.3) thread_safe (0.3.6) tilt (1.3.7) - timecop (0.6.3) timeout (0.4.0) tins (1.32.1) sync @@ -656,7 +655,6 @@ DEPENDENCIES sprockets (= 2.12.5) susy (= 2.2.14) test-unit (= 3.1.5) - timecop (= 0.6.3) traco (~> 5.3, >= 5.3.3) uglifier (= 2.7.2) underscore-rails (= 1.4.3) diff --git a/spec/models/checklist/timelines_for_taxon_concept_spec.rb b/spec/models/checklist/timelines_for_taxon_concept_spec.rb index 5072ccd499..dee5ddb570 100644 --- a/spec/models/checklist/timelines_for_taxon_concept_spec.rb +++ b/spec/models/checklist/timelines_for_taxon_concept_spec.rb @@ -2,11 +2,11 @@ describe Checklist::TimelinesForTaxonConcept do before do - Timecop.freeze(Time.local(1990)) + travel_to Time.local(1990) end after do - Timecop.return + travel_back end describe :timelines do diff --git a/spec/models/cites_suspension_spec.rb b/spec/models/cites_suspension_spec.rb index ab12ebc0b6..1708bef946 100644 --- a/spec/models/cites_suspension_spec.rb +++ b/spec/models/cites_suspension_spec.rb @@ -50,7 +50,7 @@ ) } before do - Timecop.freeze(10.minutes.ago) + travel -10.minutes @genus = create_cites_eu_genus @taxon_concept = create_cites_eu_species(parent: @genus) @another_taxon_concept = create_cites_eu_species @@ -64,7 +64,7 @@ :taxon_concept_id => @another_taxon_concept.id, :geo_entity_id => rwanda.id ) - Timecop.return + travel_back end context "touching taxa" do diff --git a/spec/models/document_search_spec.rb b/spec/models/document_search_spec.rb index 4731ec947a..87ae859b43 100644 --- a/spec/models/document_search_spec.rb +++ b/spec/models/document_search_spec.rb @@ -291,7 +291,7 @@ describe :documents_need_refreshing? do before(:each) do @d = nil - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do @d = create(:proposal) DocumentSearch.refresh_citations_and_documents end @@ -301,7 +301,7 @@ end context "when document created in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do create(:proposal) end expect(DocumentSearch.documents_need_refreshing?).to be_truthy @@ -309,7 +309,7 @@ end context "when document destroyed in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @d.destroy end expect(DocumentSearch.documents_need_refreshing?).to be_truthy @@ -317,7 +317,7 @@ end context "when document updated in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @d.update_attributes(is_public: true) end expect(DocumentSearch.documents_need_refreshing?).to be_truthy @@ -328,7 +328,7 @@ describe :citations_need_refreshing? do before(:each) do @d = nil - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL + 1).minutes) do @d = create(:proposal) @c = create(:document_citation, document: @d) @c_tc = create(:document_citation_taxon_concept, document_citation: @c) @@ -340,7 +340,7 @@ end context "when citation created in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do create(:document_citation_taxon_concept, document_citation: @c) end expect(DocumentSearch.citations_need_refreshing?).to be_truthy @@ -348,7 +348,7 @@ end context "when citation destroyed in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @c_tc.destroy end expect(DocumentSearch.citations_need_refreshing?).to be_truthy @@ -356,7 +356,7 @@ end context "when citation updated in last #{DocumentSearch::REFRESH_INTERVAL} minutes" do specify do - Timecop.travel(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do + travel_to(Time.now - (DocumentSearch::REFRESH_INTERVAL - 1).minutes) do @c_tc.update_attributes(taxon_concept_id: create_cites_eu_species.id) end expect(DocumentSearch.citations_need_refreshing?).to be_truthy diff --git a/spec/models/trade/inclusion_validation_rule_spec.rb b/spec/models/trade/inclusion_validation_rule_spec.rb index b0a34dbca1..ff6f00ca80 100644 --- a/spec/models/trade/inclusion_validation_rule_spec.rb +++ b/spec/models/trade/inclusion_validation_rule_spec.rb @@ -110,22 +110,24 @@ context "when updates and error fixed for all records" do specify "error record is destroyed" do - Timecop.travel(Time.now + 1) - @shipment2.update_attributes(taxon_name: 'Canis lupus') - @shipment3.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { Trade::ValidationError.count }.by(-1) + travel_to(Time.now + 1) do + @shipment2.update_attributes(taxon_name: 'Canis lupus') + @shipment3.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { Trade::ValidationError.count }.by(-1) + end end end context "when updates and error fixed for some records" do specify "error record is updated to reflect new error_count" do - Timecop.travel(Time.now + 1) - @shipment2.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { @validation_error.reload.error_count }.by(-1) + travel_to(Time.now + 1) do + @shipment2.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { @validation_error.reload.error_count }.by(-1) + end end end diff --git a/spec/models/trade/validation_rule_spec.rb b/spec/models/trade/validation_rule_spec.rb index b7f88b79ff..3f8b4794f1 100644 --- a/spec/models/trade/validation_rule_spec.rb +++ b/spec/models/trade/validation_rule_spec.rb @@ -100,22 +100,24 @@ context "when updates and error fixed for all records" do specify "error record is destroyed" do - Timecop.travel(Time.now + 1) - @shipment2.update_attributes(taxon_name: 'Canis lupus') - @shipment3.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { Trade::ValidationError.count }.by(-1) + travel_to(Time.now + 1) do + @shipment2.update_attributes(taxon_name: 'Canis lupus') + @shipment3.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { Trade::ValidationError.count }.by(-1) + end end end context "when updates and error fixed for some records" do specify "error record is updated to reflect new error_count" do - Timecop.travel(Time.now + 1) - @shipment2.update_attributes(taxon_name: 'Canis lupus') - expect { - validation_rule.refresh_errors_if_needed(annual_report_upload) - }.to change { @validation_error.reload.error_count }.by(-1) + travel_to(Time.now + 1) do + @shipment2.update_attributes(taxon_name: 'Canis lupus') + expect { + validation_rule.refresh_errors_if_needed(annual_report_upload) + }.to change { @validation_error.reload.error_count }.by(-1) + end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 00735d6b37..6ecce131b9 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -46,6 +46,7 @@ config.infer_base_class_for_anonymous_controllers = true config.infer_spec_type_from_file_location! + config.include ActiveSupport::Testing::TimeHelpers config.include Devise::Test::ControllerHelpers, type: :controller config.extend ControllerMacros, :type => :controller From 33b9706302dac21d341ac6c0e22b6be5029b51ef Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 11 Jan 2024 14:03:32 +0000 Subject: [PATCH 070/334] transpec, again --- .../admin/change_types_controller_spec.rb | 14 +- .../admin/cites_acs_controller_spec.rb | 4 +- .../admin/cites_cops_controller_spec.rb | 4 +- ..._extraordinary_meetings_controller_spec.rb | 4 +- .../cites_hash_annotations_controller_spec.rb | 4 +- .../admin/cites_pcs_controller_spec.rb | 4 +- ...uspension_notifications_controller_spec.rb | 4 +- .../cites_suspensions_controller_spec.rb | 20 +-- .../admin/cites_tcs_controller_spec.rb | 4 +- .../admin/designations_controller_spec.rb | 18 +-- .../admin/distributions_controller_spec.rb | 26 ++-- .../admin/document_batches_controller_spec.rb | 12 +- .../admin/documents_controller_spec.rb | 66 ++++----- .../admin/ec_srgs_controller_spec.rb | 4 +- .../eu_council_regulations_controller_spec.rb | 4 +- .../eu_hash_annotations_controller_spec.rb | 4 +- ...mplementing_regulations_controller_spec.rb | 4 +- .../admin/eu_opinions_controller_spec.rb | 42 +++--- .../admin/eu_regulations_controller_spec.rb | 6 +- ..._suspension_regulations_controller_spec.rb | 6 +- .../admin/eu_suspensions_controller_spec.rb | 6 +- .../admin/events_controller_spec.rb | 22 +-- .../admin/exports_controller_spec.rb | 52 +++---- .../admin/geo_entities_controller_spec.rb | 14 +- .../hybrid_relationships_controller_spec.rb | 18 +-- .../admin/instruments_controller_spec.rb | 28 ++-- .../admin/languages_controller_spec.rb | 14 +- .../admin/listing_changes_controller_spec.rb | 10 +- .../lump_controller_spec.rb | 32 ++--- .../split_controller_spec.rb | 60 ++++---- .../status_swap_controller_spec.rb | 22 +-- .../status_to_accepted_controller_spec.rb | 16 +-- .../status_to_synonym_controller_spec.rb | 18 +-- .../nomenclature_changes_controller_spec.rb | 6 +- .../admin/ranks_controller_spec.rb | 14 +- .../admin/references_controller_spec.rb | 18 +-- .../admin/species_listings_controller_spec.rb | 14 +- .../admin/srg_histories_controller_spec.rb | 12 +- .../synonym_relationships_controller_spec.rb | 18 +-- .../controllers/admin/tags_controller_spec.rb | 14 +- ...taxon_cites_suspensions_controller_spec.rb | 26 ++-- .../admin/taxon_commons_controller_spec.rb | 36 ++--- .../taxon_concept_comments_controller_spec.rb | 10 +- ...axon_concept_references_controller_spec.rb | 18 +-- .../admin/taxon_concepts_controller_spec.rb | 42 +++--- .../taxon_eu_suspensions_controller_spec.rb | 36 ++--- .../taxon_listing_changes_controller_spec.rb | 40 +++--- .../admin/taxon_quotas_controller_spec.rb | 30 ++-- .../taxon_relationships_controller_spec.rb | 28 ++-- .../admin/taxonomies_controller_spec.rb | 24 ++-- ...ade_names_relationships_controller_spec.rb | 18 +-- .../admin/users_controller_spec.rb | 18 +-- ...complete_taxon_concepts_controller_spec.rb | 4 +- .../document_geo_entities_controller_spec.rb | 6 +- .../api/document_tags_controller.rb | 2 +- .../api/documents_controller_spec.rb | 20 +-- .../controllers/api/events_controller_spec.rb | 4 +- .../api/geo_entities_controller_spec.rb | 4 +- .../api/purposes_controller_spec.rb | 2 +- .../api/sources_controller_spec.rb | 2 +- spec/controllers/api/terms_controller_spec.rb | 2 +- spec/controllers/api/units_controller_spec.rb | 2 +- .../checklist/geo_entities_controller_spec.rb | 4 +- .../taxon_concepts_controller_spec.rb | 4 +- .../cites_trade/exports_controller_spec.rb | 24 ++-- .../cites_trade/shipments_controller_spec.rb | 16 +-- spec/controllers/pages_controller_spec.rb | 4 +- .../registrations_controller_spec.rb | 8 +- .../species/exports_controller_spec.rb | 16 +-- .../annual_report_uploads_controller_spec.rb | 10 +- .../trade/ember_controller_spec.rb | 2 +- .../trade/exports_controller_spec.rb | 6 +- .../sandbox_shipments_controller_spec.rb | 16 +-- .../trade/shipments_controller_spec.rb | 54 ++++---- .../validation_errors_controller_spec.rb | 2 +- .../trade/validation_rules_controller_spec.rb | 2 +- spec/helpers/admin_helper_spec.rb | 8 +- spec/helpers/listing_changes_helper_spec.rb | 16 ++- spec/models/annotation_spec.rb | 6 +- spec/models/change_type_spec.rb | 4 +- spec/models/checklist/annotations_spec.rb | 4 +- .../appendix_population_and_region_spec.rb | 14 +- .../checklist/appendix_population_spec.rb | 26 ++-- spec/models/checklist/appendix_spec.rb | 4 +- spec/models/checklist/checklist_spec.rb | 6 +- spec/models/checklist/common_names_spec.rb | 14 +- .../checklist/higher_taxa_injector_spec.rb | 39 +++--- .../models/checklist/higher_taxa_item_spec.rb | 4 +- spec/models/checklist/order_spec.rb | 25 ++-- .../pdf/history_annotations_key_spec.rb | 8 +- spec/models/checklist/pdf/history_spec.rb | 8 +- .../pdf/index_annotations_key_spec.rb | 12 +- .../checklist/pdf/index_fetcher_spec.rb | 4 +- spec/models/checklist/scientific_name_spec.rb | 8 +- spec/models/checklist/synonyms_spec.rb | 2 +- .../taxon_concept_prefix_matcher_spec.rb | 8 +- spec/models/checklist/timeline_spec.rb | 46 ++++--- .../timelines_for_taxon_concept_spec.rb | 20 +-- spec/models/cites_cop_spec.rb | 12 +- .../cites_suspension_notification_spec.rb | 18 +-- spec/models/cites_suspension_spec.rb | 14 +- spec/models/common_name_spec.rb | 6 +- spec/models/dashboard_stats_species_spec.rb | 6 +- spec/models/dashboard_stats_trade_spec.rb | 8 +- spec/models/designation_spec.rb | 28 ++-- spec/models/eu_decision_spec.rb | 12 +- spec/models/eu_opinion_spec.rb | 14 +- spec/models/eu_regulation_spec.rb | 22 +-- spec/models/eu_suspension_spec.rb | 36 ++--- spec/models/event_spec.rb | 16 +-- spec/models/geo_entity_spec.rb | 16 +-- spec/models/html_to_latex_spec.rb | 12 +- spec/models/hybrid_relationship_spec.rb | 6 +- spec/models/listing_change_spec.rb | 10 +- spec/models/nomenclature_change/lump_spec.rb | 2 +- .../models/nomenclature_change/output_spec.rb | 2 +- spec/models/nomenclature_change/split_spec.rb | 2 +- .../status_to_accepted_spec.rb | 4 +- .../status_to_synonym_spec.rb | 8 +- spec/models/preset_tag_spec.rb | 10 +- spec/models/purpose_spec.rb | 6 +- spec/models/quota_spec.rb | 18 +-- spec/models/rank_spec.rb | 18 +-- spec/models/sapi/geoip_spec.rb | 4 +- spec/models/source_spec.rb | 8 +- .../species/common_names_export_spec.rb | 10 +- spec/models/species/documents_export_spec.rb | 12 +- .../species/hybrid_prefix_matcher_spec.rb | 6 +- .../invisible_subspecies_search_spec.rb | 4 +- spec/models/species/listings_export_spec.rb | 28 ++-- .../orphaned_taxon_concepts_export_spec.rb | 10 +- spec/models/species/search_spec.rb | 8 +- .../species/species_reference_output_spec.rb | 10 +- .../species/standard_reference_output_spec.rb | 10 +- .../synonyms_and_trade_names_export_spec.rb | 10 +- .../taxon_concept_prefix_matcher_spec.rb | 30 ++-- .../species/taxon_concepts_export_spec.rb | 10 +- .../species/trade_name_prefix_matcher_spec.rb | 18 +-- .../species/visible_subspecies_search_spec.rb | 2 +- spec/models/synonym_relationship_spec.rb | 6 +- spec/models/taxon_common_spec.rb | 2 +- spec/models/taxon_concept/agalychnis_spec.rb | 24 ++-- spec/models/taxon_concept/agave_spec.rb | 24 ++-- spec/models/taxon_concept/ailuropoda_spec.rb | 16 +-- .../taxon_concept/arctocephalus_spec.rb | 18 +-- .../taxon_concept/boa_constrictor_spec.rb | 80 +++++------ .../taxon_concept/caiman_latirostris_spec.rb | 44 +++--- spec/models/taxon_concept/canis_lupus_spec.rb | 22 +-- .../taxon_concept/caretta_caretta_cms_spec.rb | 12 +- .../taxon_concept/cedrela_montana_spec.rb | 12 +- .../taxon_concept/cervus_elaphus_cms_spec.rb | 14 +- .../taxon_concept/cervus_elaphus_spec.rb | 62 ++++----- spec/models/taxon_concept/colophon_spec.rb | 24 ++-- spec/models/taxon_concept/dalbergia_spec.rb | 12 +- spec/models/taxon_concept/destroy_spec.rb | 26 ++-- spec/models/taxon_concept/diospyros_spec.rb | 24 ++-- .../taxon_concept/falconiformes_spec.rb | 68 +++++----- spec/models/taxon_concept/hybrids_spec.rb | 16 +-- .../loxodonta_africana_cms_spec.rb | 16 +-- .../taxon_concept/loxodonta_africana_spec.rb | 18 +-- .../taxon_concept/mellivora_capensis_spec.rb | 18 +-- spec/models/taxon_concept/moschus_spec.rb | 34 ++--- .../taxon_concept/natator_depressus_spec.rb | 4 +- .../taxon_concept/notomys_aquilo_spec.rb | 8 +- .../taxon_concept/panax_ginseng_spec.rb | 16 +-- spec/models/taxon_concept/pereskia_spec.rb | 24 ++-- .../platysternon_megacephalum_spec.rb | 16 +-- .../taxon_concept/pristis_microdon_spec.rb | 16 +-- .../taxon_concept/pseudomys_fieldi_spec.rb | 12 +- .../taxon_concept/psittaciformes_spec.rb | 72 +++++----- spec/models/taxon_concept/synonyms_spec.rb | 20 +-- spec/models/taxon_concept/tapiridae_spec.rb | 24 ++-- spec/models/taxon_concept/trade_names_spec.rb | 20 +-- spec/models/taxon_concept/uroplatus_spec.rb | 34 ++--- spec/models/taxon_concept/validation_spec.rb | 32 ++--- spec/models/taxon_concept/varanidae_spec.rb | 32 ++--- .../taxon_concept_prefix_matcher_spec.rb | 23 ++-- spec/models/taxon_relationship_spec.rb | 14 +- spec/models/taxonomy_spec.rb | 20 +-- spec/models/term_spec.rb | 8 +- .../models/trade/annual_report_upload_spec.rb | 14 +- .../distinct_values_validation_rule_spec.rb | 6 +- spec/models/trade/filter_spec.rb | 128 +++++++++--------- .../trade/inclusion_validation_rule_spec.rb | 14 +- spec/models/trade/permit_matcher_spec.rb | 10 +- .../pov_inclusion_validation_rule_spec.rb | 8 +- spec/models/trade/sandbox_spec.rb | 2 +- spec/models/trade/sandbox_template_spec.rb | 6 +- .../scoped_inclusion_validation_rule_spec.rb | 4 +- spec/models/trade/shipment_spec.rb | 62 ++++----- .../trade/shipments_comptab_export_spec.rb | 8 +- spec/models/trade/shipments_export_spec.rb | 8 +- .../shipments_gross_exports_export_spec.rb | 8 +- .../shipments_gross_imports_export_spec.rb | 8 +- .../shipments_net_exports_export_spec.rb | 8 +- .../shipments_net_imports_export_spec.rb | 8 +- ...cept_appendix_year_validation_rule_spec.rb | 18 +-- ...xon_concept_source_validation_rule_spec.rb | 6 +- spec/models/trade/validation_rule_spec.rb | 6 +- spec/models/trade_restriction_spec.rb | 16 +-- spec/models/unit_spec.rb | 6 +- spec/models/user_spec.rb | 26 ++-- .../eu_regulation_activation_worker_spec.rb | 8 +- .../event_listing_changes_copy_worker_spec.rb | 16 +-- spec/workers/quotas_copy_worker_spec.rb | 108 +++++++-------- spec/workers/submission_worker_spec.rb | 12 +- 206 files changed, 1752 insertions(+), 1735 deletions(-) diff --git a/spec/controllers/admin/change_types_controller_spec.rb b/spec/controllers/admin/change_types_controller_spec.rb index 04bd95bc65..166354d29a 100644 --- a/spec/controllers/admin/change_types_controller_spec.rb +++ b/spec/controllers/admin/change_types_controller_spec.rb @@ -11,22 +11,22 @@ change_type2_2 = create(:change_type, :designation => designation2, :name => 'DEL') change_type1 = create(:change_type, :designation => designation1, :name => 'ADD') get :index - assigns(:change_types).should eq([change_type1, change_type2_1, change_type2_2]) + expect(assigns(:change_types)).to eq([change_type1, change_type2_1, change_type2_2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, change_type: build_attributes(:change_type) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, change_type: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -34,11 +34,11 @@ let(:change_type) { create(:change_type) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => change_type.id, :change_type => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => change_type.id, :change_type => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -46,7 +46,7 @@ let(:change_type) { create(:change_type) } it "redirects after delete" do delete :destroy, :id => change_type.id - response.should redirect_to(admin_change_types_url) + expect(response).to redirect_to(admin_change_types_url) end end diff --git a/spec/controllers/admin/cites_acs_controller_spec.rb b/spec/controllers/admin/cites_acs_controller_spec.rb index 084851a8a5..fc922035c7 100644 --- a/spec/controllers/admin/cites_acs_controller_spec.rb +++ b/spec/controllers/admin/cites_acs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_acs sorted by name" do get :index - assigns(:cites_acs).should eq([@cites_ac1, @cites_ac2]) + expect(assigns(:cites_acs)).to eq([@cites_ac1, @cites_ac2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_cops_controller_spec.rb b/spec/controllers/admin/cites_cops_controller_spec.rb index 523a9dd898..a42f74943d 100644 --- a/spec/controllers/admin/cites_cops_controller_spec.rb +++ b/spec/controllers/admin/cites_cops_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_cops sorted by name" do get :index - assigns(:cites_cops).should eq([@cites_cop2, @cites_cop1]) + expect(assigns(:cites_cops)).to eq([@cites_cop2, @cites_cop1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb b/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb index 6045ec8fce..00ff71be23 100644 --- a/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb +++ b/spec/controllers/admin/cites_extraordinary_meetings_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_extraordinary_meetings sorted by name" do get :index - assigns(:cites_extraordinary_meetings).should eq([@cites_ex1, @cites_ex2]) + expect(assigns(:cites_extraordinary_meetings)).to eq([@cites_ex1, @cites_ex2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_hash_annotations_controller_spec.rb b/spec/controllers/admin/cites_hash_annotations_controller_spec.rb index 03813a42cd..8ab9bf1523 100644 --- a/spec/controllers/admin/cites_hash_annotations_controller_spec.rb +++ b/spec/controllers/admin/cites_hash_annotations_controller_spec.rb @@ -20,11 +20,11 @@ describe "GET index" do it "assigns @annotations sorted by parent_symbol and symbol" do get :index - assigns(:annotations).should eq([@annotation2, @annotation1]) + expect(assigns(:annotations)).to eq([@annotation2, @annotation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_pcs_controller_spec.rb b/spec/controllers/admin/cites_pcs_controller_spec.rb index 828cf1886f..8256cf5b21 100644 --- a/spec/controllers/admin/cites_pcs_controller_spec.rb +++ b/spec/controllers/admin/cites_pcs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_pcs sorted by name" do get :index - assigns(:cites_pcs).should eq([@cites_pc1, @cites_pc2]) + expect(assigns(:cites_pcs)).to eq([@cites_pc1, @cites_pc2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb b/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb index 3fcb985475..d658fd1419 100644 --- a/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb +++ b/spec/controllers/admin/cites_suspension_notifications_controller_spec.rb @@ -12,13 +12,13 @@ describe "GET index" do it "assigns @cites_suspension_notifications sorted by name" do get :index - assigns(:cites_suspension_notifications).should eq([ + expect(assigns(:cites_suspension_notifications)).to eq([ @cites_suspension_notification2, @cites_suspension_notification1 ]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/cites_suspensions_controller_spec.rb b/spec/controllers/admin/cites_suspensions_controller_spec.rb index e350f2e175..cfa6ce7e5d 100644 --- a/spec/controllers/admin/cites_suspensions_controller_spec.rb +++ b/spec/controllers/admin/cites_suspensions_controller_spec.rb @@ -10,7 +10,7 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end it "assigns @cites_suspensions" do get :index @@ -21,14 +21,14 @@ describe "GET new" do it "renders the new template" do get :new - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) country = create(:geo_entity) get :new - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -39,14 +39,14 @@ :cites_suspension => { :start_notification_id => create_cites_suspension_notification.id } - response.should redirect_to( + expect(response).to redirect_to( admin_cites_suspensions_url ) end end it "renders new when not successful" do post :create, :cites_suspension => {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -59,14 +59,14 @@ end it "renders the edit template" do get :edit, :id => @cites_suspension.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) country = create(:geo_entity) get :new, :id => @cites_suspension.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -85,7 +85,7 @@ :publication_date => 1.week.ago }, :id => @cites_suspension.id - response.should redirect_to( + expect(response).to redirect_to( admin_cites_suspensions_url ) end @@ -97,7 +97,7 @@ :start_notification_id => nil }, :id => @cites_suspension.id - response.should render_template('edit') + expect(response).to render_template('edit') end end @@ -110,7 +110,7 @@ end it "redirects after delete" do delete :destroy, :id => @cites_suspension.id - response.should redirect_to( + expect(response).to redirect_to( admin_cites_suspensions_url ) end diff --git a/spec/controllers/admin/cites_tcs_controller_spec.rb b/spec/controllers/admin/cites_tcs_controller_spec.rb index d084dc802c..8de97bc2c4 100644 --- a/spec/controllers/admin/cites_tcs_controller_spec.rb +++ b/spec/controllers/admin/cites_tcs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @cites_tcs sorted by name" do get :index - assigns(:cites_tcs).should eq([@cites_tc1, @cites_tc2]) + expect(assigns(:cites_tcs)).to eq([@cites_tc1, @cites_tc2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/designations_controller_spec.rb b/spec/controllers/admin/designations_controller_spec.rb index 19add5d096..52c724438c 100644 --- a/spec/controllers/admin/designations_controller_spec.rb +++ b/spec/controllers/admin/designations_controller_spec.rb @@ -11,18 +11,18 @@ describe "GET index" do it "assigns @designations sorted by name" do get :index - assigns(:designations).should eq([@designation2, @designation1]) + expect(assigns(:designations)).to eq([@designation2, @designation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - response.body.should have_json_size(2) - parse_json(response.body, "0/text").should == 'AA' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/text")).to eq('AA') end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, designation: build_attributes(:designation) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, designation: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -43,11 +43,11 @@ let(:designation) { create(:designation) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => designation.id, :designation => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => designation.id, :designation => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -55,7 +55,7 @@ let(:designation) { create(:designation) } it "redirects after delete" do delete :destroy, :id => designation.id - response.should redirect_to(admin_designations_url) + expect(response).to redirect_to(admin_designations_url) end end diff --git a/spec/controllers/admin/distributions_controller_spec.rb b/spec/controllers/admin/distributions_controller_spec.rb index c8697e97db..08665f8e0c 100644 --- a/spec/controllers/admin/distributions_controller_spec.rb +++ b/spec/controllers/admin/distributions_controller_spec.rb @@ -9,21 +9,21 @@ describe "XHR GET 'new'" do it "returns http success and renders the new template" do xhr :get, :new, :taxon_concept_id => @taxon_concept.id - response.should be_success - response.should render_template('new') + expect(response).to be_success + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) country = create(:geo_entity) xhr :get, :new, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end it "assigns the distribution variable" do xhr :get, :new, :taxon_concept_id => @taxon_concept.id - assigns(:distribution).should_not be_nil - assigns(:tags).should_not be_nil - assigns(:geo_entities).should_not be_nil + expect(assigns(:distribution)).not_to be_nil + expect(assigns(:tags)).not_to be_nil + expect(assigns(:geo_entities)).not_to be_nil end end @@ -39,7 +39,7 @@ :reference => { :reference_id => reference.id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders create when successful and is creating a reference" do xhr :post, :create, @@ -52,7 +52,7 @@ :author => reference.author, :year => reference.year } - response.should render_template("create") + expect(response).to render_template("create") end end @@ -61,19 +61,19 @@ it "renders the new template" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the distribution variable" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - assigns(:distribution).should_not be_nil + expect(assigns(:distribution)).not_to be_nil end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -87,7 +87,7 @@ :distribution => { :geo_entity_id => geo_entity.id } - response.should be_success + expect(response).to be_success end end @@ -97,7 +97,7 @@ delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => distribution.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_distributions_url(distribution.taxon_concept) ) end diff --git a/spec/controllers/admin/document_batches_controller_spec.rb b/spec/controllers/admin/document_batches_controller_spec.rb index 4898efb69f..5fb0a73e71 100644 --- a/spec/controllers/admin/document_batches_controller_spec.rb +++ b/spec/controllers/admin/document_batches_controller_spec.rb @@ -10,14 +10,14 @@ let(:document) { create(:document) } it "renders the new template" do get :new - response.should render_template('new') + expect(response).to render_template('new') end end context "when event" do let(:document) { create(:document, event_id: event.id) } it "renders the new template" do get :new - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -45,7 +45,7 @@ post :create, document_batch: { date: Date.today, documents_attributes: { "0" => document_attrs }, files: files } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) end it "does not create a new Document" do @@ -60,7 +60,7 @@ post :create, document_batch: { date: nil, documents_attributes: { "0" => document_attrs }, files: files } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -71,14 +71,14 @@ post :create, event_id: event.id, document_batch: { date: Date.today, documents_attributes: { "0" => document_attrs }, files: files } - response.should redirect_to(admin_event_documents_url(event)) + expect(response).to redirect_to(admin_event_documents_url(event)) end it "renders new when not successful" do post :create, event_id: event.id, document_batch: { date: nil, documents_attributes: { "0" => document_attrs }, files: files } - response.should render_template('new') + expect(response).to render_template('new') end end end diff --git a/spec/controllers/admin/documents_controller_spec.rb b/spec/controllers/admin/documents_controller_spec.rb index 0d8c2388b7..2039145a4e 100644 --- a/spec/controllers/admin/documents_controller_spec.rb +++ b/spec/controllers/admin/documents_controller_spec.rb @@ -28,41 +28,41 @@ it "assigns @documents sorted by time of creation" do get :index - assigns(:documents).should eq([@document3, @public_document, @document2, @document1]) + expect(assigns(:documents)).to eq([@document3, @public_document, @document2, @document1]) end context "search" do it "runs a full text search on title" do get :index, 'title_query' => 'good' - assigns(:documents).should eq([@document2]) + expect(assigns(:documents)).to eq([@document2]) end it "retrieves documents inclusive of the given start date" do get :index, "document_date_start" => '25/12/2014' - assigns(:documents).should eq([@public_document, @document2, @document1]) + expect(assigns(:documents)).to eq([@public_document, @document2, @document1]) end it "retrieves documents inclusive of the given end date" do get :index, "document_date_end" => '01/01/2014' - assigns(:documents).should eq([@document3]) + expect(assigns(:documents)).to eq([@document3]) end it "retrieves documents after the given date" do get :index, "document_date_start" => '10/01/2014' - assigns(:documents).should eq([@public_document, @document2, @document1]) + expect(assigns(:documents)).to eq([@public_document, @document2, @document1]) end it "retrieves documents before the given date" do get :index, "document_date_end" => '10/01/2014' - assigns(:documents).should eq([@document3]) + expect(assigns(:documents)).to eq([@document3]) end it "ignores invalid dates" do get :index, "document_date_start" => '34/24/12', "document_date_end" => '34/24/12' - assigns(:documents).should eq([@document3, @public_document, @document2, @document1]) + expect(assigns(:documents)).to eq([@document3, @public_document, @document2, @document1]) end it "retrieves documents for taxon concept" do get :index, "taxon_concepts_ids" => taxon_concept.id - assigns(:documents).should eq([@public_document, @document1]) + expect(assigns(:documents)).to eq([@public_document, @document1]) end it "retrieves documents for geo entity" do get :index, "geo_entities_ids" => [geo_entity.id] - assigns(:documents).should eq([@document2]) + expect(assigns(:documents)).to eq([@document2]) end context 'by proposal outcome' do before(:each) do @@ -72,7 +72,7 @@ end it "retrieves documents for tag" do get :index, "document_tags_ids" => [proposal_outcome.id] - assigns(:documents).map(&:id).should eq([@document3].map(&:id)) + expect(assigns(:documents).map(&:id)).to eq([@document3].map(&:id)) end end context 'by document tags' do @@ -83,11 +83,11 @@ end it "retrieves documents for review_phase tag" do get :index, "document_tags_ids" => [review_phase.id] - assigns(:documents).map(&:id).should eq([@document3].map(&:id)) + expect(assigns(:documents).map(&:id)).to eq([@document3].map(&:id)) end it "retrieves documents for process_stage tag" do get :index, "document_tags_ids" => [process_stage.id] - assigns(:documents).map(&:id).should eq([@document3].map(&:id)) + expect(assigns(:documents).map(&:id)).to eq([@document3].map(&:id)) end end end @@ -95,27 +95,27 @@ context "when no event" do it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end context "when event" do it "renders the event/documents/index template" do get :index, events_ids: [event.id] - response.should render_template('admin/event_documents/index') + expect(response).to render_template('admin/event_documents/index') end it "assigns @documents for event, sorted by title" do @document3 = create(:document, title: 'CC hello world', event: event2) DocumentSearch.refresh_citations_and_documents get :index, events_ids: [event.id, event2.id] - assigns(:documents).should eq([@document3, @document2, @document1, @public_document]) + expect(assigns(:documents)).to eq([@document3, @document2, @document1, @public_document]) end end context "when secretariat is logged in" do login_secretariat_user it "returns only public documents" do get :index - assigns(:documents).should eq([@public_document]) + expect(assigns(:documents)).to eq([@public_document]) end end end @@ -128,7 +128,7 @@ it "renders the edit template" do get :edit, id: document.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -138,12 +138,12 @@ let(:document) { create(:document) } it "redirects to index when successful" do put :update, id: document.id, document: { date: Date.today } - response.should redirect_to(admin_documents_url) - flash[:notice].should_not be_nil + expect(response).to redirect_to(admin_documents_url) + expect(flash[:notice]).not_to be_nil end it "renders new when not successful" do put :update, id: document.id, document: { date: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -151,12 +151,12 @@ let(:document) { create(:document, event_id: event.id) } it "redirects to index when successful" do put :update, id: document.id, event_id: event.id, document: { date: Date.today } - response.should redirect_to(admin_event_documents_url(event)) - flash[:notice].should_not be_nil + expect(response).to redirect_to(admin_event_documents_url(event)) + expect(flash[:notice]).not_to be_nil end it "renders new when not successful" do put :update, id: document.id, event_id: event.id, document: { date: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -170,7 +170,7 @@ put :update, id: document.id, document: { date: Date.today, review_details_attributes: { review_phase_id: review_phase.id } } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) expect(document.reload.review_details.review_phase_id).to eq(review_phase.id) end @@ -179,7 +179,7 @@ put :update, id: document.id, document: { date: Date.today, review_details_attributes: { process_stage_id: process_stage.id } } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) expect(document.reload.review_details.process_stage_id).to eq(process_stage.id) end @@ -188,7 +188,7 @@ put :update, id: document.id, document: { date: Date.today, review_details_attributes: { recommended_category: recommended_category } } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) expect(document.reload.review_details.recommended_category).to eq(recommended_category) end @@ -202,7 +202,7 @@ put :update, id: document.id, document: { date: Date.today, proposal_details_attributes: { proposal_outcome_id: proposal_outcome.id } } - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) expect(document.reload.proposal_details.proposal_outcome_id).to eq(proposal_outcome.id) end @@ -225,7 +225,7 @@ } it "redirects after delete" do delete :destroy, id: document.id - response.should redirect_to(admin_documents_url) + expect(response).to redirect_to(admin_documents_url) end end @@ -243,9 +243,9 @@ it "returns properly formatted json" do xhr :get, :autocomplete, :format => 'json', :title => 'tit' - response.body.should have_json_size(2) - parse_json(response.body, "0/title").should == 'Title' - parse_json(response.body, "1/title").should == 'Title2' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/title")).to eq('Title') + expect(parse_json(response.body, "1/title")).to eq('Title2') end end @@ -253,8 +253,8 @@ it "returns properly formatted json" do xhr :get, :autocomplete, :format => 'json', :title => 'tit', :event_id => event.id - response.body.should have_json_size(1) - parse_json(response.body, "0/title").should == 'Title' + expect(response.body).to have_json_size(1) + expect(parse_json(response.body, "0/title")).to eq('Title') end end end diff --git a/spec/controllers/admin/ec_srgs_controller_spec.rb b/spec/controllers/admin/ec_srgs_controller_spec.rb index 1c3309c1e5..719c08ef5f 100644 --- a/spec/controllers/admin/ec_srgs_controller_spec.rb +++ b/spec/controllers/admin/ec_srgs_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @ec_srgs sorted by name" do get :index - assigns(:ec_srgs).sort.should eq([@cites_srg1, @cites_srg2].sort) + expect(assigns(:ec_srgs).sort).to eq([@cites_srg1, @cites_srg2].sort) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/eu_council_regulations_controller_spec.rb b/spec/controllers/admin/eu_council_regulations_controller_spec.rb index dc65da0f49..d69f1fff86 100644 --- a/spec/controllers/admin/eu_council_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_council_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_regulations sorted by effective_at" do get :index - assigns(:eu_council_regulations).should eq([@eu_regulation2, @eu_regulation1]) + expect(assigns(:eu_council_regulations)).to eq([@eu_regulation2, @eu_regulation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/eu_hash_annotations_controller_spec.rb b/spec/controllers/admin/eu_hash_annotations_controller_spec.rb index 58e892e822..f53a38cba9 100644 --- a/spec/controllers/admin/eu_hash_annotations_controller_spec.rb +++ b/spec/controllers/admin/eu_hash_annotations_controller_spec.rb @@ -20,11 +20,11 @@ describe "GET index" do it "assigns @annotations sorted by parent_symbol and symbol" do get :index - assigns(:annotations).should eq([@annotation2, @annotation1]) + expect(assigns(:annotations)).to eq([@annotation2, @annotation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb b/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb index 19914088ab..d3181c415a 100644 --- a/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_implementing_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_regulations sorted by effective_at" do get :index - assigns(:eu_implementing_regulations).should eq([@eu_regulation2, @eu_regulation1]) + expect(assigns(:eu_implementing_regulations)).to eq([@eu_regulation2, @eu_regulation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end diff --git a/spec/controllers/admin/eu_opinions_controller_spec.rb b/spec/controllers/admin/eu_opinions_controller_spec.rb index db3c8fc652..c54d779d05 100644 --- a/spec/controllers/admin/eu_opinions_controller_spec.rb +++ b/spec/controllers/admin/eu_opinions_controller_spec.rb @@ -11,24 +11,24 @@ describe "GET index" do it "renders the index template" do get :index, taxon_concept_id: @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, taxon_concept_id: @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do create(:geo_entity, :geo_entity_type_id => territory_geo_entity_type.id) create(:geo_entity) get :new, taxon_concept_id: @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -54,7 +54,7 @@ ) }, taxon_concept_id: @taxon_concept.id - response.should redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) + expect(response).to redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) end end context "when event is present" do @@ -70,7 +70,7 @@ ) }, taxon_concept_id: @taxon_concept.id - response.should redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) + expect(response).to redirect_to(admin_taxon_concept_eu_opinions_url(@taxon_concept)) end end end @@ -79,7 +79,7 @@ it "renders new" do post :create, eu_opinion: {}, taxon_concept_id: @taxon_concept.id - response.should render_template("new") + expect(response).to render_template("new") end end end @@ -94,12 +94,12 @@ end it "renders the edit template" do get :edit, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id, start_event_id: @eu_regulation.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns @geo_entities" do territory = create(:geo_entity, geo_entity_type_id: territory_geo_entity_type.id) get :edit, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id, start_event_id: @eu_regulation.id - assigns(:geo_entities).should include(territory) + expect(assigns(:geo_entities)).to include(territory) end end @@ -125,7 +125,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -141,7 +141,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -156,7 +156,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -172,7 +172,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end @@ -190,7 +190,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -205,7 +205,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -220,7 +220,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -234,7 +234,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -249,7 +249,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -264,7 +264,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -279,7 +279,7 @@ }, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -295,7 +295,7 @@ it "redirects after delete" do delete :destroy, id: @eu_opinion.id, taxon_concept_id: @taxon_concept.id, start_event_id: @eu_regulation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_opinions_url(@taxon_concept) ) end diff --git a/spec/controllers/admin/eu_regulations_controller_spec.rb b/spec/controllers/admin/eu_regulations_controller_spec.rb index 263a953e3c..ad9d058301 100644 --- a/spec/controllers/admin/eu_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_regulations sorted by effective_at" do get :index - assigns(:eu_regulations).should eq([@eu_regulation2, @eu_regulation1]) + expect(assigns(:eu_regulations)).to eq([@eu_regulation2, @eu_regulation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -25,7 +25,7 @@ let(:eu_regulation) { create_eu_regulation } it "renders create when successful" do xhr :post, :activate, :format => 'js', :id => eu_regulation.id - response.should render_template("create") + expect(response).to render_template("create") end end diff --git a/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb b/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb index bcbf45e332..758d36195e 100644 --- a/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb +++ b/spec/controllers/admin/eu_suspension_regulations_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @eu_suspension_regulations sorted by effective_at" do get :index - assigns(:eu_suspension_regulations).should eq([@eu_suspension_regulation2, @eu_suspension_regulation1]) + expect(assigns(:eu_suspension_regulations)).to eq([@eu_suspension_regulation2, @eu_suspension_regulation1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -25,7 +25,7 @@ let(:eu_suspension_regulation) { create_eu_suspension_regulation(:is_current => true) } it "renders create when successful" do xhr :post, :activate, :format => 'js', :id => eu_suspension_regulation.id - response.should render_template("create") + expect(response).to render_template("create") end end diff --git a/spec/controllers/admin/eu_suspensions_controller_spec.rb b/spec/controllers/admin/eu_suspensions_controller_spec.rb index 97275959ec..08b9bc48b3 100644 --- a/spec/controllers/admin/eu_suspensions_controller_spec.rb +++ b/spec/controllers/admin/eu_suspensions_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "renders the index template" do get :index, :eu_suspension_regulation_id => @eu_suspension_regulation - response.should render_template("index") + expect(response).to render_template("index") end it "renders the admin layout" do get :index, :eu_suspension_regulation_id => @eu_suspension_regulation - response.should render_template('layouts/admin') + expect(response).to render_template('layouts/admin') end end @@ -31,7 +31,7 @@ it "redirects after delete" do delete :destroy, :id => @eu_suspension.id, :eu_suspension_regulation_id => @eu_suspension_regulation.id - response.should redirect_to( + expect(response).to redirect_to( admin_eu_suspension_regulation_eu_suspensions_url(@eu_suspension_regulation) ) end diff --git a/spec/controllers/admin/events_controller_spec.rb b/spec/controllers/admin/events_controller_spec.rb index 6a4d00d483..ac8b1ccb12 100644 --- a/spec/controllers/admin/events_controller_spec.rb +++ b/spec/controllers/admin/events_controller_spec.rb @@ -12,11 +12,11 @@ describe "GET index" do it "assigns @events sorted by name" do get :index - assigns(:events).should eq([@event2, @event1]) + expect(assigns(:events)).to eq([@event2, @event1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -24,22 +24,22 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the event variable" do xhr :get, :new - assigns(:event).should_not be_nil + expect(assigns(:event)).not_to be_nil end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, event: FactoryGirl.attributes_for(:event) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, event: { :name => nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -47,11 +47,11 @@ let(:event) { create(:event) } it "renders the edit template" do xhr :get, :edit, :id => event.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :edit, :id => event.id - assigns(:event).should_not be_nil + expect(assigns(:event)).not_to be_nil end end @@ -59,11 +59,11 @@ let(:event) { create(:event) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => event.id, :event => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => event.id, :event => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -71,7 +71,7 @@ let(:event) { create(:event) } it "redirects after delete" do delete :destroy, :id => event.id - response.should redirect_to(admin_events_url) + expect(response).to redirect_to(admin_events_url) end end diff --git a/spec/controllers/admin/exports_controller_spec.rb b/spec/controllers/admin/exports_controller_spec.rb index 62ecc38bdf..b26720a5de 100644 --- a/spec/controllers/admin/exports_controller_spec.rb +++ b/spec/controllers/admin/exports_controller_spec.rb @@ -6,8 +6,8 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") - response.should render_template("layouts/admin") + expect(response).to render_template("index") + expect(response).to render_template("layouts/admin") end end describe "GET download with data_type=Names" do @@ -17,40 +17,40 @@ context "all" do it "returns taxon concepts names file" do create(:taxon_concept) - Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') + allow_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names" - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") end it "redirects when no results" do get :download, :data_type => "Names" - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end context "CITES_EU" do it "returns CITES_EU taxon concepts names file" do create_cites_eu_species - Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') + allow_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CITES_EU' } - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end context "CMS" do it "returns CMS taxon concepts names file" do create_cms_species - Species::TaxonConceptsNamesExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_names.csv') + allow_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:public_file_name).and_return('taxon_concepts_names.csv') get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_names.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_names.csv\"") end it "redirects when no results" do get :download, :data_type => "Names", :filters => { :taxonomy => 'CMS' } - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end end @@ -62,42 +62,42 @@ it "returns taxon concepts distributions file" do tc = create(:taxon_concept) create(:distribution, :taxon_concept_id => tc.id) - Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') + allow_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions" - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") end it "redirects when no results" do get :download, :data_type => "Distributions" - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end context "CITES_EU" do it "returns CITES_EU taxon concepts distributions file" do tc = create_cites_eu_species create(:distribution, :taxon_concept_id => tc.id) - Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') + allow_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CITES_EU' } - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end context "CMS" do it "returns CMS taxon concepts distributions file" do tc = create_cms_species create(:distribution, :taxon_concept_id => tc.id) - Species::TaxonConceptsDistributionsExport.any_instance.stub(:public_file_name).and_return('taxon_concepts_distributions.csv') + allow_any_instance_of(Species::TaxonConceptsDistributionsExport).to receive(:public_file_name).and_return('taxon_concepts_distributions.csv') get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"taxon_concepts_distributions.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"taxon_concepts_distributions.csv\"") end it "redirects when no results" do get :download, :data_type => "Distributions", :filters => { :taxonomy => 'CMS' } - response.should redirect_to(admin_exports_path) + expect(response).to redirect_to(admin_exports_path) end end end diff --git a/spec/controllers/admin/geo_entities_controller_spec.rb b/spec/controllers/admin/geo_entities_controller_spec.rb index dcbd651c30..12e244d200 100644 --- a/spec/controllers/admin/geo_entities_controller_spec.rb +++ b/spec/controllers/admin/geo_entities_controller_spec.rb @@ -22,11 +22,11 @@ describe "GET index" do it "assigns @geo_entities sorted by name" do get :index - assigns(:geo_entities).should eq([@geo_entity2, @geo_entity1]) + expect(assigns(:geo_entities)).to eq([@geo_entity2, @geo_entity1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -38,14 +38,14 @@ name_en: 'CC', iso_code2: 'CC' } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, geo_entity: { geo_entity_type_id: country_geo_entity_type.id, iso_code2: nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -53,11 +53,11 @@ let(:geo_entity) { create(:geo_entity, geo_entity_type: country_geo_entity_type) } it "responds with 200 when successful" do xhr :put, :update, format: 'json', id: geo_entity.id, geo_entity: { iso_code2: 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, format: 'json', id: geo_entity.id, geo_entity: { iso_code2: nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -65,7 +65,7 @@ let(:geo_entity) { create(:geo_entity) } it "redirects after delete" do delete :destroy, id: geo_entity.id - response.should redirect_to(admin_geo_entities_url) + expect(response).to redirect_to(admin_geo_entities_url) end end diff --git a/spec/controllers/admin/hybrid_relationships_controller_spec.rb b/spec/controllers/admin/hybrid_relationships_controller_spec.rb index bb76659b5a..3b6e0337b4 100644 --- a/spec/controllers/admin/hybrid_relationships_controller_spec.rb +++ b/spec/controllers/admin/hybrid_relationships_controller_spec.rb @@ -16,11 +16,11 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - assigns(:hybrid_relationship).should_not be_nil + expect(assigns(:hybrid_relationship)).not_to be_nil end end @@ -31,7 +31,7 @@ :taxon_relationship => { other_taxon_concept_id: hybrid.id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -39,7 +39,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -47,12 +47,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => hybrid_relationship.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => hybrid_relationship.id - assigns(:hybrid_relationship).should_not be_nil + expect(assigns(:hybrid_relationship)).not_to be_nil end end @@ -64,7 +64,7 @@ :taxon_relationship => { other_taxon_concept_id: hybrid.id } - response.should render_template("create") + expect(response).to render_template("create") end it "responds with json when not successful" do xhr :put, :update, :format => 'js', @@ -73,7 +73,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -82,7 +82,7 @@ delete :destroy, :taxon_concept_id => taxon_concept.id, :id => hybrid_relationship.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(hybrid_relationship.taxon_concept) ) end diff --git a/spec/controllers/admin/instruments_controller_spec.rb b/spec/controllers/admin/instruments_controller_spec.rb index 6014dcecab..335f3cb4c3 100644 --- a/spec/controllers/admin/instruments_controller_spec.rb +++ b/spec/controllers/admin/instruments_controller_spec.rb @@ -11,18 +11,18 @@ describe "GET index" do it "assigns @instruments sorted by name" do get :index - assigns(:instruments).should eq([@instrument2, @instrument1]) + expect(assigns(:instruments)).to eq([@instrument2, @instrument1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - response.body.should have_json_size(2) - parse_json(response.body, "0/text").should == 'AA' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/text")).to eq('AA') end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, instrument: build_attributes(:instrument) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, instrument: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -43,11 +43,11 @@ let(:instrument) { create(:instrument) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => instrument.id, :instrument => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => instrument.id, :instrument => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -55,17 +55,17 @@ let(:instrument) { create(:instrument) } it "redirects after delete" do delete :destroy, :id => instrument.id - flash[:notice].should_not be_nil - flash[:alert].should be_nil - response.should redirect_to(admin_instruments_url) + expect(flash[:notice]).not_to be_nil + expect(flash[:alert]).to be_nil + expect(response).to redirect_to(admin_instruments_url) end let(:instrument2) { create(:instrument) } let!(:taxon_instrument) { create(:taxon_instrument, :instrument_id => instrument2.id) } it "fails to delete instrument because there are dependent objects" do delete :destroy, :id => instrument2.id - flash[:notice].should be_nil - flash[:alert].should_not be_nil - instrument2.reload.should_not be_nil + expect(flash[:notice]).to be_nil + expect(flash[:alert]).not_to be_nil + expect(instrument2.reload).not_to be_nil end end diff --git a/spec/controllers/admin/languages_controller_spec.rb b/spec/controllers/admin/languages_controller_spec.rb index 5634b95779..6eab1781cb 100644 --- a/spec/controllers/admin/languages_controller_spec.rb +++ b/spec/controllers/admin/languages_controller_spec.rb @@ -8,22 +8,22 @@ language1 = create(:language, :iso_code1 => 'BB', :iso_code3 => 'BBB') language2 = create(:language, :iso_code1 => 'AA', :iso_code3 => 'AAA') get :index - assigns(:languages).should eq([language2, language1]) + expect(assigns(:languages)).to eq([language2, language1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, language: FactoryGirl.attributes_for(:language) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, language: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -31,11 +31,11 @@ let(:language) { create(:language) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => language.id, :language => { :iso_code1 => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => language.id, :language => { :iso_code1 => 'zzz' } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -43,7 +43,7 @@ let(:language) { create(:language) } it "redirects after delete" do delete :destroy, :id => language.id - response.should redirect_to(admin_languages_url) + expect(response).to redirect_to(admin_languages_url) end end diff --git a/spec/controllers/admin/listing_changes_controller_spec.rb b/spec/controllers/admin/listing_changes_controller_spec.rb index 73f4d73c8b..bbcc93854c 100644 --- a/spec/controllers/admin/listing_changes_controller_spec.rb +++ b/spec/controllers/admin/listing_changes_controller_spec.rb @@ -43,16 +43,16 @@ :effective_at => 1.week.ago ) get :index, :eu_regulation_id => @eu_regulation.id - assigns(:listing_changes).should eq([listing_change2, listing_change1]) - assigns(:eu_regulation).should eq @eu_regulation + expect(assigns(:listing_changes)).to eq([listing_change2, listing_change1]) + expect(assigns(:eu_regulation)).to eq @eu_regulation end it "renders the index template" do get :index, :eu_regulation_id => @eu_regulation.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the admin layout" do get :index, :eu_regulation_id => @eu_regulation.id - response.should render_template('layouts/admin') + expect(response).to render_template('layouts/admin') end end @@ -70,7 +70,7 @@ it "redirects after delete" do delete :destroy, :id => @listing_change.id, :eu_regulation_id => @eu_regulation.id - response.should redirect_to( + expect(response).to redirect_to( admin_eu_regulation_listing_changes_url(@eu_regulation) ) end diff --git a/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb index 8d6a10a7e7..9d47f43bec 100644 --- a/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb @@ -10,7 +10,7 @@ end it 'renders the inputs template' do get :show, id: :inputs, nomenclature_change_id: @lump.id - response.should render_template('inputs') + expect(response).to render_template('inputs') end end context 'outputs' do @@ -20,7 +20,7 @@ end it 'renders the outputs template' do get :show, id: :outputs, nomenclature_change_id: @lump.id - response.should render_template('outputs') + expect(response).to render_template('outputs') end end context 'reassignments' do @@ -32,7 +32,7 @@ end it 'renders the notes template' do get :show, id: :notes, nomenclature_change_id: @lump.id - response.should render_template('notes') + expect(response).to render_template('notes') end context "when legislation present" do before(:each) do @@ -40,13 +40,13 @@ end it 'renders the legislation template' do get :show, id: :legislation, nomenclature_change_id: @lump.id - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context "when no legislation" do it 'redirects to next step' do get :show, id: :legislation, nomenclature_change_id: @lump.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_lump_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -55,7 +55,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @lump.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -63,7 +63,7 @@ describe 'POST create' do it 'redirects to lump wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_lump_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'inputs' ) @@ -83,7 +83,7 @@ 1 => { taxon_concept_id: create_cites_eu_species.id } } }, nomenclature_change_id: @lump.id, id: 'inputs' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_lump_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'outputs' ) @@ -98,7 +98,7 @@ 0 => { taxon_concept_id: nil } } }, nomenclature_change_id: @lump.id, id: 'inputs' - response.should render_template('inputs') + expect(response).to render_template('inputs') end end context 'when last step' do @@ -106,15 +106,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @lump.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @lump.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end @@ -130,7 +130,7 @@ context 'when step is legislation' do it 'renders notes step' do get :show, id: :notes, nomenclature_change_id: @lump.id, back: true - response.should render_template('notes') + expect(response).to render_template('notes') end end context 'when step is summary' do @@ -140,15 +140,15 @@ end it 'renders legislation step' do get :show, id: :legislation, nomenclature_change_id: @lump.id, back: true - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context 'when no legislation' do it 'redirects to notes step' do get :show, id: :legislation, nomenclature_change_id: @lump.id, back: true - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes get :show, id: :notes, nomenclature_change_id: @lump.id - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes end end end diff --git a/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb index 61cedb41fa..f2bc0f7507 100644 --- a/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/split_controller_spec.rb @@ -11,7 +11,7 @@ end it 'renders the inputs template' do get :show, id: :inputs, nomenclature_change_id: @split.id - response.should render_template('inputs') + expect(response).to render_template('inputs') end end context 'outputs' do @@ -20,7 +20,7 @@ end it 'renders the outputs template' do get :show, id: :outputs, nomenclature_change_id: @split.id - response.should render_template('outputs') + expect(response).to render_template('outputs') end end context 'reassignments' do @@ -29,7 +29,7 @@ end it 'renders the notes template' do get :show, id: :notes, nomenclature_change_id: @split.id - response.should render_template('notes') + expect(response).to render_template('notes') end context "when children present" do before(:each) do @@ -37,13 +37,13 @@ end it 'renders the children template' do get :show, id: :children, nomenclature_change_id: @split.id - response.should render_template('children') + expect(response).to render_template('children') end end context "when no children" do it 'redirects to next step' do get :show, id: :children, nomenclature_change_id: @split.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'names' ) @@ -60,13 +60,13 @@ end it 'renders the names template' do get :show, id: :names, nomenclature_change_id: @split.id - response.should render_template('names') + expect(response).to render_template('names') end end context "when no names" do it 'redirects to next step' do get :show, id: :names, nomenclature_change_id: @split.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'distribution' ) @@ -79,13 +79,13 @@ end it 'renders the distribution template' do get :show, id: :distribution, nomenclature_change_id: @split.id - response.should render_template('distribution') + expect(response).to render_template('distribution') end end context "when no distribution" do it 'redirects to next step' do get :show, id: :distribution, nomenclature_change_id: @split.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'legislation' ) @@ -98,13 +98,13 @@ end it 'renders the legislation template' do get :show, id: :legislation, nomenclature_change_id: @split.id - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context "when no legislation" do it 'redirects to next step' do get :show, id: :legislation, nomenclature_change_id: @split.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -113,7 +113,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @split.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -121,7 +121,7 @@ describe 'POST create' do it 'redirects to split wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'inputs' ) @@ -138,7 +138,7 @@ put :update, nomenclature_change_split: { input_attributes: { taxon_concept_id: create_cites_eu_species.id } }, nomenclature_change_id: @split.id, id: 'inputs' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_split_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'outputs' ) @@ -151,7 +151,7 @@ nomenclature_change_split: { input_attributes: { taxon_concept_id: nil } }, nomenclature_change_id: @split.id, id: 'inputs' - response.should render_template('inputs') + expect(response).to render_template('inputs') end end context 'when last step' do @@ -159,15 +159,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @split.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @split.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end @@ -184,15 +184,15 @@ end it 'renders children template' do get :show, id: :children, nomenclature_change_id: @split.id, back: true - response.should render_template('children') + expect(response).to render_template('children') end end context 'when no children' do it 'redirects to notes step' do get :show, id: :children, nomenclature_change_id: @split.id, back: true - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes get :show, id: :notes, nomenclature_change_id: @split.id - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes end end end @@ -207,15 +207,15 @@ end it 'renders names template' do get :show, id: :names, nomenclature_change_id: @split.id, back: :true - response.should render_template('names') + expect(response).to render_template('names') end end context 'when no names and no children' do it 'redirects to notes step' do get :show, id: :names, nomenclature_change_id: @split.id, back: true - response.should redirect_to action: :show, id: :children + expect(response).to redirect_to action: :show, id: :children get :show, id: :children, nomenclature_change_id: @split.id - response.should redirect_to action: :show, id: :notes + expect(response).to redirect_to action: :show, id: :notes end end end @@ -226,15 +226,15 @@ end it 'renders distribution template' do get :show, id: :distribution, nomenclature_change_id: @split.id, back: true - response.should render_template('distribution') + expect(response).to render_template('distribution') end end context 'when no distribution and no names' do it 'redirects to children step' do get :show, id: :distribution, nomenclature_change_id: @split.id, back: true - response.should redirect_to action: :show, id: :names + expect(response).to redirect_to action: :show, id: :names get :show, id: :names, nomenclature_change_id: @split.id - response.should redirect_to action: :show, id: :children + expect(response).to redirect_to action: :show, id: :children end end end @@ -245,15 +245,15 @@ end it 'renders legislation template' do get :show, id: :legislation, nomenclature_change_id: @split.id, back: true - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context 'when no legislation and no distribution' do it 'redirects to names step' do get :show, id: :legislation, nomenclature_change_id: @split.id, back: true - response.should redirect_to action: :show, id: :distribution + expect(response).to redirect_to action: :show, id: :distribution get :show, id: :distribution, nomenclature_change_id: @split.id - response.should redirect_to action: :show, id: :names + expect(response).to redirect_to action: :show, id: :names end end end diff --git a/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb index bb42fdd211..2f124144d0 100644 --- a/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/status_swap_controller_spec.rb @@ -11,7 +11,7 @@ end it 'renders the primary_output template' do get :show, id: :primary_output, nomenclature_change_id: @status_change.id - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'swap' do @@ -20,7 +20,7 @@ end it 'renders the swap template' do get :show, id: :secondary_output, nomenclature_change_id: @status_change.id - response.should render_template('secondary_output') + expect(response).to render_template('secondary_output') end end context 'reassignments' do @@ -33,13 +33,13 @@ end it 'renders the legislation template' do get :show, id: :legislation, nomenclature_change_id: @status_change.id - response.should render_template('legislation') + expect(response).to render_template('legislation') end end context "when no legislation" do it 'redirects to next step' do get :show, id: :legislation, nomenclature_change_id: @status_change.id - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_swap_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -53,7 +53,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @status_change.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -61,7 +61,7 @@ describe 'POST create' do it 'redirects to status_change wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_swap_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'primary_output' ) @@ -81,7 +81,7 @@ new_name_status: 'S' } }, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_swap_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'secondary_output' ) @@ -92,7 +92,7 @@ it 're-renders step' do put :update, nomenclature_change_status_swap: {}, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'when last step' do @@ -100,15 +100,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end diff --git a/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb index a04996557d..1ad1a65cea 100644 --- a/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/status_to_accepted_controller_spec.rb @@ -11,7 +11,7 @@ end it 'renders the primary_output template' do get :show, id: :primary_output, nomenclature_change_id: @status_change.id - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'summary' do @@ -20,7 +20,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @status_change.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -28,7 +28,7 @@ describe 'POST create' do it 'redirects to status_change wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_to_accepted_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'primary_output' ) @@ -54,7 +54,7 @@ new_name_status: 'A' } }, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_to_accepted_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'summary' ) @@ -65,7 +65,7 @@ it 're-renders step' do put :update, nomenclature_change_status_to_accepted: {}, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'when last step' do @@ -73,15 +73,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end diff --git a/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb b/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb index 95aa5eeba7..f750f8e7d1 100644 --- a/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes/status_to_synonym_controller_spec.rb @@ -12,7 +12,7 @@ end it 'renders the primary_output template' do get :show, id: :primary_output, nomenclature_change_id: @status_change.id - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'relay' do @@ -21,7 +21,7 @@ end it 'renders the relay template' do get :show, id: :relay, nomenclature_change_id: @status_change.id - response.should render_template('relay') + expect(response).to render_template('relay') end end @@ -31,7 +31,7 @@ end it 'renders the summary template' do get :show, id: :summary, nomenclature_change_id: @status_change.id - response.should render_template('summary') + expect(response).to render_template('summary') end end end @@ -39,7 +39,7 @@ describe 'POST create' do it 'redirects to status_change wizard' do post :create, nomenclature_change_id: 'new' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_to_synonym_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'primary_output' ) @@ -59,7 +59,7 @@ new_name_status: 'S' } }, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should redirect_to( + expect(response).to redirect_to( admin_nomenclature_change_status_to_synonym_url( nomenclature_change_id: assigns(:nomenclature_change).id, :id => 'relay' ) @@ -70,7 +70,7 @@ it 're-renders step' do put :update, nomenclature_change_status_to_synonym: {}, nomenclature_change_id: @status_change.id, id: 'primary_output' - response.should render_template('primary_output') + expect(response).to render_template('primary_output') end end context 'when last step' do @@ -78,15 +78,15 @@ login_secretariat_user it 'redirects to admin root path' do put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end context 'when user is manager' do it 'redirects to nomenclature changes path' do pending("Strange render mismatch after upgrading to Rails 4") put :update, nomenclature_change_id: @status_change.id, id: 'summary' - response.should be_successful - response.should render_template("nomenclature_changes") + expect(response).to be_successful + expect(response).to render_template("nomenclature_changes") end end end diff --git a/spec/controllers/admin/nomenclature_changes_controller_spec.rb b/spec/controllers/admin/nomenclature_changes_controller_spec.rb index 959ec64f88..672f29be57 100644 --- a/spec/controllers/admin/nomenclature_changes_controller_spec.rb +++ b/spec/controllers/admin/nomenclature_changes_controller_spec.rb @@ -8,11 +8,11 @@ nomenclature_change1 = create(:nomenclature_change) nomenclature_change2 = create(:nomenclature_change) get :index - assigns(:collection).should eq([nomenclature_change2, nomenclature_change1]) + expect(assigns(:collection)).to eq([nomenclature_change2, nomenclature_change1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end @@ -20,7 +20,7 @@ let(:nomenclature_change) { create(:nomenclature_change) } it "redirects after delete" do delete :destroy, :id => nomenclature_change.id - response.should redirect_to(admin_nomenclature_changes_url) + expect(response).to redirect_to(admin_nomenclature_changes_url) end end diff --git a/spec/controllers/admin/ranks_controller_spec.rb b/spec/controllers/admin/ranks_controller_spec.rb index 93961b14c3..dbe03df3f3 100644 --- a/spec/controllers/admin/ranks_controller_spec.rb +++ b/spec/controllers/admin/ranks_controller_spec.rb @@ -8,22 +8,22 @@ rank2 = create(:rank, name: Rank::PHYLUM, taxonomic_position: '2') rank1 = create(:rank, name: Rank::KINGDOM, taxonomic_position: '1') get :index - assigns(:ranks).should eq([rank1, rank2]) + expect(assigns(:ranks)).to eq([rank1, rank2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, rank: build_attributes(:rank) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, rank: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -31,11 +31,11 @@ let(:rank) { create(:rank) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => rank.id, :rank => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => rank.id, :rank => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -43,7 +43,7 @@ let(:rank) { create(:rank) } it "redirects after delete" do delete :destroy, :id => rank.id - response.should redirect_to(admin_ranks_url) + expect(response).to redirect_to(admin_ranks_url) end end diff --git a/spec/controllers/admin/references_controller_spec.rb b/spec/controllers/admin/references_controller_spec.rb index ee0207cbc5..c1bd708f6c 100644 --- a/spec/controllers/admin/references_controller_spec.rb +++ b/spec/controllers/admin/references_controller_spec.rb @@ -12,18 +12,18 @@ describe "GET index" do it "assigns @references sorted by citation" do get :index - assigns(:references).should eq([@reference2, @reference1]) + expect(assigns(:references)).to eq([@reference2, @reference1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - response.body.should have_json_size(2) - parse_json(response.body, "0/text").should == 'AA' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/text")).to eq('AA') end end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, reference: FactoryGirl.attributes_for(:reference) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, reference: { :citation => nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -43,11 +43,11 @@ let(:reference) { create(:reference) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => reference.id, :reference => { :citation => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => reference.id, :reference => { :citation => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -55,7 +55,7 @@ let(:reference) { create(:reference) } it "redirects after delete" do delete :destroy, :id => reference.id - response.should redirect_to(admin_references_url) + expect(response).to redirect_to(admin_references_url) end end diff --git a/spec/controllers/admin/species_listings_controller_spec.rb b/spec/controllers/admin/species_listings_controller_spec.rb index e9196e7ca9..bb8c91a415 100644 --- a/spec/controllers/admin/species_listings_controller_spec.rb +++ b/spec/controllers/admin/species_listings_controller_spec.rb @@ -11,22 +11,22 @@ species_listing2_2 = create(:species_listing, :designation => designation2, :name => 'II') species_listing1 = create(:species_listing, :designation => designation1, :name => 'I') get :index - assigns(:species_listings).should eq([species_listing1, species_listing2_1, species_listing2_2]) + expect(assigns(:species_listings)).to eq([species_listing1, species_listing2_1, species_listing2_2]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, species_listing: build_attributes(:species_listing) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, species_listing: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -34,11 +34,11 @@ let(:species_listing) { create(:species_listing) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => species_listing.id, :species_listing => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => species_listing.id, :species_listing => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -46,7 +46,7 @@ let(:species_listing) { create(:species_listing) } it "redirects after delete" do delete :destroy, :id => species_listing.id - response.should redirect_to(admin_species_listings_url) + expect(response).to redirect_to(admin_species_listings_url) end end diff --git a/spec/controllers/admin/srg_histories_controller_spec.rb b/spec/controllers/admin/srg_histories_controller_spec.rb index 187f9afea4..2667db0ae8 100644 --- a/spec/controllers/admin/srg_histories_controller_spec.rb +++ b/spec/controllers/admin/srg_histories_controller_spec.rb @@ -6,7 +6,7 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end @@ -19,7 +19,7 @@ it "renders the create js template" do post :create, srg_history: { name: 'test' }, format: :js - response.should render_template("create") + expect(response).to render_template("create") end end @@ -27,7 +27,7 @@ it "renders new" do post :create, srg_history: {}, format: :js - response.should render_template("new") + expect(response).to render_template("new") end end end @@ -41,7 +41,7 @@ it "renders the create js template" do put :update, id: @srg_history.id, format: :js - response.should render_template("create") + expect(response).to render_template("create") end end @@ -52,7 +52,7 @@ id: @srg_history.id, format: :js - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -65,7 +65,7 @@ it "redirects after delete" do delete :destroy, id: @srg_history.id - response.should redirect_to(admin_srg_histories_url) + expect(response).to redirect_to(admin_srg_histories_url) end end end diff --git a/spec/controllers/admin/synonym_relationships_controller_spec.rb b/spec/controllers/admin/synonym_relationships_controller_spec.rb index b6cb176324..1a1f7982e9 100644 --- a/spec/controllers/admin/synonym_relationships_controller_spec.rb +++ b/spec/controllers/admin/synonym_relationships_controller_spec.rb @@ -16,11 +16,11 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the synonym_relationship variable" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - assigns(:synonym_relationship).should_not be_nil + expect(assigns(:synonym_relationship)).not_to be_nil end end @@ -31,7 +31,7 @@ :taxon_relationship => { other_taxon_concept_id: synonym.id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -39,7 +39,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -47,12 +47,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => synonym_relationship.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the synonym_relationship variable" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => synonym_relationship.id - assigns(:synonym_relationship).should_not be_nil + expect(assigns(:synonym_relationship)).not_to be_nil end end @@ -64,7 +64,7 @@ :taxon_relationship => { other_taxon_concept_id: synonym.id } - response.should render_template('create') + expect(response).to render_template('create') end it "responds with json when not successful" do xhr :put, :update, :format => 'js', @@ -73,7 +73,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -82,7 +82,7 @@ delete :destroy, :taxon_concept_id => taxon_concept.id, :id => synonym_relationship.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(synonym_relationship.taxon_concept) ) end diff --git a/spec/controllers/admin/tags_controller_spec.rb b/spec/controllers/admin/tags_controller_spec.rb index fbe3c6173c..3f4bb6d265 100644 --- a/spec/controllers/admin/tags_controller_spec.rb +++ b/spec/controllers/admin/tags_controller_spec.rb @@ -6,8 +6,8 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") - response.should render_template("layouts/admin") + expect(response).to render_template("index") + expect(response).to render_template("layouts/admin") end end @@ -15,11 +15,11 @@ it "renders create when successful" do xhr :post, :create, preset_tag: { name: "Test Tag", model: "TaxonConcept" } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, preset_tag: {} - response.should render_template("new") + expect(response).to render_template("new") end end @@ -29,12 +29,12 @@ it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => preset_tag.id, :preset_tag => {} - response.should be_success + expect(response).to be_success end it "responds with json error when not successful" do xhr :put, :update, :format => 'json', :id => preset_tag.id, :preset_tag => { :model => 'FakeCategory' } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end end @@ -43,7 +43,7 @@ let(:preset_tag) { create(:preset_tag) } it "redirects after delete" do delete :destroy, :id => preset_tag.id - response.should redirect_to(admin_tags_url) + expect(response).to redirect_to(admin_tags_url) end end end diff --git a/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb b/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb index 05d4151a5b..ed01e82bd4 100644 --- a/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb +++ b/spec/controllers/admin/taxon_cites_suspensions_controller_spec.rb @@ -15,18 +15,18 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -38,7 +38,7 @@ :start_notification_id => create_cites_suspension_notification.id }, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) end @@ -46,14 +46,14 @@ it "renders new when not successful" do post :create, :cites_suspension => {}, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end describe "GET edit" do it "renders the edit template" do get :edit, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('edit') + expect(response).to render_template('edit') end end @@ -66,7 +66,7 @@ }, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) end @@ -79,7 +79,7 @@ }, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('edit') + expect(response).to render_template('edit') end end @@ -87,7 +87,7 @@ it "redirects after delete" do delete :destroy, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) end @@ -99,11 +99,11 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -111,10 +111,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_cites_suspensions_url(@taxon_concept) delete :destroy, :id => @cites_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_cites_suspensions_url(@taxon_concept) ) - CitesSuspension.find(@cites_suspension.id).should_not be_nil + expect(CitesSuspension.find(@cites_suspension.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_commons_controller_spec.rb b/spec/controllers/admin/taxon_commons_controller_spec.rb index 61fe953185..4682c712a7 100644 --- a/spec/controllers/admin/taxon_commons_controller_spec.rb +++ b/spec/controllers/admin/taxon_commons_controller_spec.rb @@ -11,8 +11,8 @@ describe "XHR GET 'new'" do it "returns http success and renders the new template" do xhr :get, :new, { :taxon_concept_id => @taxon_concept.id, :format => 'js' } - response.should be_success - response.should render_template('new') + expect(response).to be_success + expect(response).to render_template('new') end end @@ -24,14 +24,14 @@ :name => @common_name.name, :language_id => @common_name.language_id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, :taxon_concept_id => @taxon_concept.id, :taxon_common => { } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -46,12 +46,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_common.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the taxon common variable" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_common.id - assigns(:taxon_common).should_not be_nil + expect(assigns(:taxon_common)).not_to be_nil end end @@ -71,7 +71,7 @@ :name => @common_name.name, :language_id => @common_name.language_id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :put, :update, :format => 'js', @@ -80,7 +80,7 @@ :taxon_common => { :common_name_id => nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -96,7 +96,7 @@ delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => taxon_common.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(@taxon_concept) ) end @@ -116,11 +116,11 @@ it "updates associated @taxon_concept's dependents_updated_at when taxon common is updated" do - @taxon_concept.dependents_updated_at.should be_nil + expect(@taxon_concept.dependents_updated_at).to be_nil # it gets updated by the creation of the taxon_common # but object needs to be reloaded - @taxon_concept.reload.dependents_updated_at.should_not be_nil + expect(@taxon_concept.reload.dependents_updated_at).not_to be_nil old_date = @taxon_concept.dependents_updated_at xhr :put, :update, :format => 'js', @@ -131,25 +131,25 @@ :language_id => @common_name.language_id } - @taxon_concept.reload.dependents_updated_at.should_not == old_date + expect(@taxon_concept.reload.dependents_updated_at).not_to eq(old_date) end it "updates associated @taxon_concept's dependents_updated_at when taxon common is deleted" do - @taxon_concept.dependents_updated_at.should be_nil + expect(@taxon_concept.dependents_updated_at).to be_nil # it gets updated by the creation of the taxon_common # but object needs to be reloaded - @taxon_concept.reload.dependents_updated_at.should_not be_nil + expect(@taxon_concept.reload.dependents_updated_at).not_to be_nil old_date = @taxon_concept.dependents_updated_at delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => @taxon_common.id - @taxon_concept.reload.dependents_updated_at.should_not == old_date - TaxonCommon.where(:id => @taxon_common.id).size.should == 0 + expect(@taxon_concept.reload.dependents_updated_at).not_to eq(old_date) + expect(TaxonCommon.where(:id => @taxon_common.id).size).to eq(0) end end @@ -167,10 +167,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_names_url(@taxon_concept) delete :destroy, :id => taxon_common.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(@taxon_concept) ) - TaxonCommon.find(taxon_common.id).should_not be_nil + expect(TaxonCommon.find(taxon_common.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_concept_comments_controller_spec.rb b/spec/controllers/admin/taxon_concept_comments_controller_spec.rb index 2a248ec3c5..4e08a8634e 100644 --- a/spec/controllers/admin/taxon_concept_comments_controller_spec.rb +++ b/spec/controllers/admin/taxon_concept_comments_controller_spec.rb @@ -10,7 +10,7 @@ describe 'GET index' do it 'renders the index template' do get :index, taxon_concept_id: @taxon_concept.id - response.should render_template('index') + expect(response).to render_template('index') end end @@ -19,10 +19,10 @@ post :create, taxon_concept_id: @taxon_concept.id, comment: { note: 'blah' } - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_comments_url(@taxon_concept) ) - flash[:notice].should_not be_nil + expect(flash[:notice]).not_to be_nil end end @@ -33,10 +33,10 @@ id: comment.id, taxon_concept_id: @taxon_concept.id, comment: { note: 'blah' } - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_comments_url(@taxon_concept) ) - flash[:notice].should_not be_nil + expect(flash[:notice]).not_to be_nil end end diff --git a/spec/controllers/admin/taxon_concept_references_controller_spec.rb b/spec/controllers/admin/taxon_concept_references_controller_spec.rb index a63aa8d539..b6808948e2 100644 --- a/spec/controllers/admin/taxon_concept_references_controller_spec.rb +++ b/spec/controllers/admin/taxon_concept_references_controller_spec.rb @@ -16,7 +16,7 @@ :reference_attributes => { :citation => "My nice literature" } } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -24,7 +24,7 @@ :taxon_concept_reference => { :reference_attributes => {} } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -39,12 +39,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_concept_reference.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the taxon concept reference variable" do xhr :get, :edit, :taxon_concept_id => @taxon_concept.id, :id => @taxon_concept_reference.id - assigns(:taxon_concept_reference).should_not be_nil + expect(assigns(:taxon_concept_reference)).not_to be_nil end end @@ -64,7 +64,7 @@ :reference_attributes => { :citation => "My nice literature" } } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :put, :update, :format => 'js', @@ -73,15 +73,15 @@ :taxon_concept_reference => { :reference_attributes => {} } - response.should render_template('new') + expect(response).to render_template('new') end end describe "XHR GET 'new'" do it "returns http success and renders the new template" do xhr :get, :new, { :taxon_concept_id => @taxon_concept.id, :format => 'js' } - response.should be_success - response.should render_template('new') + expect(response).to be_success + expect(response).to render_template('new') end end @@ -91,7 +91,7 @@ delete :destroy, :taxon_concept_id => @taxon_concept.id, :id => taxon_concept_reference.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_taxon_concept_references_url(taxon_concept_reference.taxon_concept) ) end diff --git a/spec/controllers/admin/taxon_concepts_controller_spec.rb b/spec/controllers/admin/taxon_concepts_controller_spec.rb index f6bbb2eb9f..dde27ef34f 100644 --- a/spec/controllers/admin/taxon_concepts_controller_spec.rb +++ b/spec/controllers/admin/taxon_concepts_controller_spec.rb @@ -16,20 +16,20 @@ end it "renders the index template" do get :index - response.should render_template("index") - response.should render_template("layouts/admin") + expect(response).to render_template("index") + expect(response).to render_template("layouts/admin") end it "redirects if 1 result" do get :index, search_params: { taxonomy: { id: cites_eu.id }, scientific_name: 'Foobarus i' } - response.should redirect_to(admin_taxon_concept_names_path(@taxon)) + expect(response).to redirect_to(admin_taxon_concept_names_path(@taxon)) end it "assigns taxa in taxonomic order" do get :index, search_params: { taxonomy: { id: cites_eu.id }, scientific_name: 'Foobarus' } - assigns(:taxon_concepts).should eq([@taxon.parent, @taxon]) + expect(assigns(:taxon_concepts)).to eq([@taxon.parent, @taxon]) end end @@ -43,23 +43,23 @@ scientific_name: 'Canis', parent_id: create_cites_eu_family } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, taxon_concept: {} - response.should render_template("new") + expect(response).to render_template("new") end it "renders new_synonym when not successful S" do xhr :post, :create, taxon_concept: { name_status: 'S' } - response.should render_template("new_synonym") + expect(response).to render_template("new_synonym") end it "renders new_hybrid when not successful H" do xhr :post, :create, taxon_concept: { name_status: 'H' } - response.should render_template("new_hybrid") + expect(response).to render_template("new_hybrid") end it "renders new_synonym when not successful N" do xhr :post, :create, taxon_concept: { name_status: 'N' } - response.should render_template("new_n_name") + expect(response).to render_template("new_n_name") end end @@ -69,24 +69,24 @@ it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => taxon_concept.id, :taxon_concept => {} - response.should be_success + expect(response).to be_success end it "responds with json error when not successful" do xhr :put, :update, :format => 'json', :id => taxon_concept.id, :taxon_concept => { :taxonomy_id => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end context "when HTML" do it "redirects to edit when successful" do put :update, :id => taxon_concept.id, :taxon_commons_attributes => FactoryGirl.attributes_for(:common_name) - response.should redirect_to(edit_admin_taxon_concept_url(taxon_concept)) + expect(response).to redirect_to(edit_admin_taxon_concept_url(taxon_concept)) end it "renders edit when not successful" do put :update, :id => taxon_concept.id, :taxon_concept => { :taxonomy_id => nil } - response.should render_template("edit") + expect(response).to render_template("edit") end end end @@ -95,7 +95,7 @@ let(:taxon_concept) { create(:taxon_concept) } it "redirects after delete" do delete :destroy, :id => taxon_concept.id - response.should redirect_to(admin_taxon_concepts_url) + expect(response).to redirect_to(admin_taxon_concepts_url) end end @@ -105,8 +105,8 @@ it "redirects to admin root path and doesn't delete" do delete :destroy, :id => taxon_concept.id - response.should redirect_to(admin_root_path) - TaxonConcept.where(:id => taxon_concept.id).size.should == 1 + expect(response).to redirect_to(admin_root_path) + expect(TaxonConcept.where(:id => taxon_concept.id).size).to eq(1) end end @@ -116,13 +116,13 @@ it "redirects to root path" do get :index - response.should redirect_to(root_path) + expect(response).to redirect_to(root_path) end it "redirects to root path and doesn't delete" do delete :destroy, :id => taxon_concept.id - response.should redirect_to(root_path) - TaxonConcept.where(:id => taxon_concept.id).size.should == 1 + expect(response).to redirect_to(root_path) + expect(TaxonConcept.where(:id => taxon_concept.id).size).to eq(1) end end @@ -135,8 +135,8 @@ it "returns properly formatted json" do xhr :get, :autocomplete, :format => 'json', :search_params => { :scientific_name => 'AAA' } - response.body.should have_json_size(1) - parse_json(response.body, "0/full_name").should == 'Aaa' + expect(response.body).to have_json_size(1) + expect(parse_json(response.body, "0/full_name")).to eq('Aaa') end end diff --git a/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb b/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb index f43ded20cf..f3ddd6a42d 100644 --- a/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb +++ b/spec/controllers/admin/taxon_eu_suspensions_controller_spec.rb @@ -10,24 +10,24 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do territory = create(:geo_entity, :geo_entity_type_id => territory_geo_entity_type.id) country = create(:geo_entity) get :new, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -46,7 +46,7 @@ ) }, :taxon_concept_id => @taxon_concept.id - response.should redirect_to(admin_taxon_concept_eu_suspensions_url(@taxon_concept.id)) + expect(response).to redirect_to(admin_taxon_concept_eu_suspensions_url(@taxon_concept.id)) end end @@ -54,7 +54,7 @@ it "renders new" do post :create, :eu_suspension => {}, :taxon_concept_id => @taxon_concept.id - response.should render_template("new") + expect(response).to render_template("new") end end end @@ -68,12 +68,12 @@ end it "renders the edit template" do get :edit, :id => @eu_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns @geo_entities" do territory = create(:geo_entity, :geo_entity_type_id => territory_geo_entity_type.id) get :edit, :id => @eu_suspension.id, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).should include(territory) + expect(assigns(:geo_entities)).to include(territory) end end @@ -98,7 +98,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) end @@ -115,7 +115,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) end @@ -132,7 +132,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end context "when eu_decision_type is not present" do @@ -145,7 +145,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -160,7 +160,7 @@ }, id: @eu_suspension.id, taxon_concept_id: @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end end @@ -175,7 +175,7 @@ it "redirects after delete" do delete :destroy, :id => @eu_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) end @@ -192,11 +192,11 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -204,10 +204,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_eu_suspensions_url(@taxon_concept) delete :destroy, :id => eu_suspension.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_eu_suspensions_url(@taxon_concept) ) - EuSuspension.find(eu_suspension.id).should_not be_nil + expect(EuSuspension.find(eu_suspension.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_listing_changes_controller_spec.rb b/spec/controllers/admin/taxon_listing_changes_controller_spec.rb index 4a44ef28a5..190acd9c39 100644 --- a/spec/controllers/admin/taxon_listing_changes_controller_spec.rb +++ b/spec/controllers/admin/taxon_listing_changes_controller_spec.rb @@ -41,18 +41,18 @@ ) get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - assigns(:listing_changes).should eq([listing_change2, listing_change1]) - assigns(:taxon_concept).should eq @taxon_concept + expect(assigns(:listing_changes)).to eq([listing_change2, listing_change1]) + expect(assigns(:taxon_concept)).to eq @taxon_concept end it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end @@ -60,12 +60,12 @@ it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @listing_change" do get :new, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - assigns(:listing_change).should_not be_nil + expect(assigns(:listing_change)).not_to be_nil end end @@ -80,7 +80,7 @@ }, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) end @@ -90,7 +90,7 @@ post :create, :listing_change => {}, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template("new") + expect(response).to render_template("new") end end @@ -108,13 +108,13 @@ get :edit, :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns the listing_change variable" do get :edit, :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - assigns(:listing_change).should_not be_nil + expect(assigns(:listing_change)).not_to be_nil end end @@ -141,7 +141,7 @@ :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) end @@ -179,7 +179,7 @@ :taxon_concept_id => taxon_concept.id, :designation_id => eu_designation.id, :redirect_to_eu_reg => "1" - response.should redirect_to( + expect(response).to redirect_to( admin_eu_regulation_listing_changes_url(eu_regulation) ) end @@ -189,7 +189,7 @@ :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "redirects to index page and removes annotation when fields cleared" do @@ -205,11 +205,11 @@ "id" => @annotation.id } } - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url( @taxon_concept, @designation) ) - @listing_change.reload.annotation.should be_nil + expect(@listing_change.reload.annotation).to be_nil end end @@ -227,7 +227,7 @@ delete :destroy, :id => @listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) end @@ -247,12 +247,12 @@ it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -261,10 +261,10 @@ delete :destroy, :id => listing_change.id, :taxon_concept_id => @taxon_concept.id, :designation_id => @designation.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_designation_listing_changes_url(@taxon_concept, @designation) ) - ListingChange.find(listing_change.id).should_not be_nil + expect(ListingChange.find(listing_change.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_quotas_controller_spec.rb b/spec/controllers/admin/taxon_quotas_controller_spec.rb index 54e28bfb92..368d807315 100644 --- a/spec/controllers/admin/taxon_quotas_controller_spec.rb +++ b/spec/controllers/admin/taxon_quotas_controller_spec.rb @@ -12,24 +12,24 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "GET new" do it "renders the new template" do get :new, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) get :new, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -44,7 +44,7 @@ :geo_entity_id => @geo_entity.id }, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) end @@ -52,7 +52,7 @@ it "renders new when not successful" do post :create, :quota => {}, :taxon_concept_id => @taxon_concept.id - response.should render_template("new") + expect(response).to render_template("new") end end @@ -67,13 +67,13 @@ end it "renders the edit template" do get :edit, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('edit') + expect(response).to render_template('edit') end it "assigns @geo_entities (country and territory) with two objects" do geo_entity_type_t = create(:geo_entity_type, :name => "TERRITORY") territory = create(:geo_entity, :geo_entity_type_id => geo_entity_type_t.id) get :edit, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - assigns(:geo_entities).size.should == 2 + expect(assigns(:geo_entities).size).to eq(2) end end @@ -95,7 +95,7 @@ }, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) end @@ -108,7 +108,7 @@ }, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end end @@ -124,7 +124,7 @@ it "redirects after delete" do delete :destroy, :id => @quota.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) end @@ -143,11 +143,11 @@ describe "GET index" do it "renders the index template" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => @taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "DELETE destroy" do @@ -155,10 +155,10 @@ @request.env['HTTP_REFERER'] = admin_taxon_concept_quotas_url(@taxon_concept) delete :destroy, :id => quota.id, :taxon_concept_id => @taxon_concept.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_quotas_url(@taxon_concept) ) - Quota.find(quota.id).should_not be_nil + expect(Quota.find(quota.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/taxon_relationships_controller_spec.rb b/spec/controllers/admin/taxon_relationships_controller_spec.rb index bb5f58b11f..131f7d7255 100644 --- a/spec/controllers/admin/taxon_relationships_controller_spec.rb +++ b/spec/controllers/admin/taxon_relationships_controller_spec.rb @@ -11,34 +11,34 @@ } it "assigns @taxon_relationships" do get :index, :taxon_concept_id => taxon_concept.id, :type => taxon_relationship.taxon_relationship_type.name - assigns(:taxon_relationships).should eq([taxon_relationship]) + expect(assigns(:taxon_relationships)).to eq([taxon_relationship]) assigns(:taxon_concept) end it "renders the index template" do get :index, :taxon_concept_id => taxon_concept.id - response.should render_template("index") + expect(response).to render_template("index") end it "renders the taxon_concepts_layout" do get :index, :taxon_concept_id => taxon_concept.id - response.should render_template('layouts/taxon_concepts') + expect(response).to render_template('layouts/taxon_concepts') end end describe "XHR POST create" do let(:taxon_relationship_attributes) { build_attributes(:taxon_relationship) } before do - TaxonRelationshipType.stub(:find).and_return(equal_relationship_type) + allow(TaxonRelationshipType).to receive(:find).and_return(equal_relationship_type) end it "renders create when successful" do xhr :post, :create, :taxon_relationship => taxon_relationship_attributes, :taxon_concept_id => taxon_concept.id - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do taxon_relationship = create(:taxon_relationship, taxon_relationship_attributes) xhr :post, :create, taxon_relationship: taxon_relationship_attributes, :taxon_concept_id => taxon_relationship.taxon_concept_id - response.should render_template("new") + expect(response).to render_template("new") end end @@ -59,16 +59,16 @@ } context "destroys relationship for taxon concept" do specify { - lambda do + expect do delete :destroy, taxon_concept_id: taxon_concept.id, id: rel.id - end.should change(TaxonRelationship, :count).by(-2) + end.to change(TaxonRelationship, :count).by(-2) } end context "destroys relationship for other taxon concept" do specify { - lambda do + expect do delete :destroy, taxon_concept_id: other_taxon_concept.id, id: rel.id - end.should change(TaxonRelationship, :count).by(-2) + end.to change(TaxonRelationship, :count).by(-2) } end end @@ -88,16 +88,16 @@ } context "destroys relationship for taxon concept" do specify { - lambda do + expect do delete :destroy, taxon_concept_id: taxon_concept.id, id: rel.id - end.should change(TaxonRelationship, :count).by(-1) + end.to change(TaxonRelationship, :count).by(-1) } end context "destroys relationship for other taxon concept" do specify { - lambda do + expect do delete :destroy, taxon_concept_id: other_taxon_concept.id, id: rel.id - end.should change(TaxonRelationship, :count).by(-1) + end.to change(TaxonRelationship, :count).by(-1) } end end diff --git a/spec/controllers/admin/taxonomies_controller_spec.rb b/spec/controllers/admin/taxonomies_controller_spec.rb index bf2983da47..d6386851d2 100644 --- a/spec/controllers/admin/taxonomies_controller_spec.rb +++ b/spec/controllers/admin/taxonomies_controller_spec.rb @@ -12,18 +12,18 @@ describe "GET index" do it "assigns @taxonomies sorted by name" do get :index - assigns(:taxonomies).should eq([@taxonomy2, @taxonomy1]) + expect(assigns(:taxonomies)).to eq([@taxonomy2, @taxonomy1]) end it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end describe "XHR GET index JSON" do it "renders json for dropdown" do xhr :get, :index, :format => 'json' - response.body.should have_json_size(2) - parse_json(response.body, "0/text").should == 'AA' + expect(response.body).to have_json_size(2) + expect(parse_json(response.body, "0/text")).to eq('AA') end end end @@ -31,11 +31,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, taxonomy: FactoryGirl.attributes_for(:taxonomy) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, taxonomy: { :name => nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -43,11 +43,11 @@ let(:taxonomy) { create(:taxonomy) } it "responds with 200 when successful" do xhr :put, :update, :format => 'json', :id => taxonomy.id, :taxonomy => { :name => 'ZZ' } - response.should be_success + expect(response).to be_success end it "responds with json when not successful" do xhr :put, :update, :format => 'json', :id => taxonomy.id, :taxonomy => { :name => nil } - JSON.parse(response.body).should include('errors') + expect(JSON.parse(response.body)).to include('errors') end end @@ -55,7 +55,7 @@ let(:taxonomy) { create(:taxonomy) } it "redirects after delete" do delete :destroy, :id => taxonomy.id - response.should redirect_to(admin_taxonomies_url) + expect(response).to redirect_to(admin_taxonomies_url) end end @@ -64,15 +64,15 @@ describe "GET index" do it "redirects to admin root" do get :index - response.should redirect_to admin_root_path + expect(response).to redirect_to admin_root_path end end describe "DELETE destroy" do let(:taxonomy) { create(:taxonomy) } it "fails to delete and redirects to admin_root_path" do delete :destroy, :id => taxonomy.id - response.should redirect_to(admin_root_path) - Taxonomy.find(taxonomy.id).should_not be_nil + expect(response).to redirect_to(admin_root_path) + expect(Taxonomy.find(taxonomy.id)).not_to be_nil end end end diff --git a/spec/controllers/admin/trade_names_relationships_controller_spec.rb b/spec/controllers/admin/trade_names_relationships_controller_spec.rb index 8f7e1ca18a..c5aace6928 100644 --- a/spec/controllers/admin/trade_names_relationships_controller_spec.rb +++ b/spec/controllers/admin/trade_names_relationships_controller_spec.rb @@ -16,11 +16,11 @@ describe "XHR GET new" do it "renders the new template" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the trade_name_relationship variable" do xhr :get, :new, :taxon_concept_id => taxon_concept.id - assigns(:trade_name_relationship).should_not be_nil + expect(assigns(:trade_name_relationship)).not_to be_nil end end @@ -31,7 +31,7 @@ :taxon_relationship => { other_taxon_concept_id: trade_name.id } - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, @@ -39,7 +39,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -47,12 +47,12 @@ it "renders the edit template" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => trade_name_relationship.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the trade_name_relationship variable" do xhr :get, :edit, :taxon_concept_id => taxon_concept.id, :id => trade_name_relationship.id - assigns(:trade_name_relationship).should_not be_nil + expect(assigns(:trade_name_relationship)).not_to be_nil end end @@ -64,7 +64,7 @@ :taxon_relationship => { other_taxon_concept_id: trade_name.id } - response.should render_template("create") + expect(response).to render_template("create") end it "responds with json when not successful" do xhr :put, :update, :format => 'js', @@ -73,7 +73,7 @@ :taxon_relationship => { other_taxon_concept_id: nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -82,7 +82,7 @@ delete :destroy, :taxon_concept_id => taxon_concept.id, :id => trade_name_relationship.id - response.should redirect_to( + expect(response).to redirect_to( admin_taxon_concept_names_url(trade_name_relationship.taxon_concept) ) end diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index 968a5412bd..bb66421e3c 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -7,7 +7,7 @@ describe "GET index" do it "renders the index template" do get :index - response.should render_template("index") + expect(response).to render_template("index") end end end @@ -15,11 +15,11 @@ describe "XHR POST create" do it "renders create when successful" do xhr :post, :create, user: FactoryGirl.attributes_for(:user) - response.should render_template("create") + expect(response).to render_template("create") end it "renders new when not successful" do xhr :post, :create, user: { :name => nil } - response.should render_template("new") + expect(response).to render_template("new") end end @@ -27,11 +27,11 @@ let(:user) { create(:user) } it "renders the edit template" do xhr :get, :edit, :id => user.id - response.should render_template('new') + expect(response).to render_template('new') end it "assigns the hybrid_relationship variable" do xhr :get, :edit, :id => user.id - assigns(:user).should_not be_nil + expect(assigns(:user)).not_to be_nil end end @@ -39,12 +39,12 @@ let(:user) { create(:user) } it "responds with 200 when successful" do xhr :put, :update, :format => 'js', :id => user.id, :user => { :name => 'ZZ' } - response.should be_success - response.should render_template('create') + expect(response).to be_success + expect(response).to render_template('create') end it "responds with template new when not successful" do xhr :put, :update, :format => 'js', :id => user.id, :user => { :name => nil } - response.should render_template('new') + expect(response).to render_template('new') end end @@ -52,7 +52,7 @@ let(:user) { create(:user) } it "redirects after delete" do delete :destroy, :id => user.id - response.should redirect_to(admin_users_url) + expect(response).to redirect_to(admin_users_url) end end diff --git a/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb b/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb index f2038e207f..8cb20f57b5 100644 --- a/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb +++ b/spec/controllers/api/auto_complete_taxon_concepts_controller_spec.rb @@ -8,13 +8,13 @@ get :index, :taxonomy => "CITES", :taxon_concept_query => "Boa", :ranks => ["SPECIES"], :visibility => "trade" - response.body.should have_json_size(1). + expect(response.body).to have_json_size(1). at_path("auto_complete_taxon_concepts") end it "returns 3 results when searching for species name and not filtering by rank" do get :index, :taxonomy => "CITES", :taxon_concept_query => "Boa" - response.body.should have_json_size(3). + expect(response.body).to have_json_size(3). at_path("auto_complete_taxon_concepts") end end diff --git a/spec/controllers/api/document_geo_entities_controller_spec.rb b/spec/controllers/api/document_geo_entities_controller_spec.rb index 1645e074f7..4a8abd36a9 100644 --- a/spec/controllers/api/document_geo_entities_controller_spec.rb +++ b/spec/controllers/api/document_geo_entities_controller_spec.rb @@ -25,17 +25,17 @@ it "returns Poland when searching by wolf" do get :index, taxon_concept_query: 'Canis lu' - response.body.should have_json_size(1).at_path('document_geo_entities') + expect(response.body).to have_json_size(1).at_path('document_geo_entities') end it "returns 0 geo entities when no match for taxon name" do get :index, taxon_concept_query: 'Lynx' - response.body.should have_json_size(0).at_path('document_geo_entities') + expect(response.body).to have_json_size(0).at_path('document_geo_entities') end it "returns all geo entities when no taxon name given" do get :index - response.body.should have_json_size(7).at_path('document_geo_entities') + expect(response.body).to have_json_size(7).at_path('document_geo_entities') end end diff --git a/spec/controllers/api/document_tags_controller.rb b/spec/controllers/api/document_tags_controller.rb index 4c6498fcd1..3d1399fdfd 100644 --- a/spec/controllers/api/document_tags_controller.rb +++ b/spec/controllers/api/document_tags_controller.rb @@ -7,7 +7,7 @@ end it "returns document tags" do get :index - response.body.should have_json_size(1).at_path('document_tags') + expect(response.body).to have_json_size(1).at_path('document_tags') end end end diff --git a/spec/controllers/api/documents_controller_spec.rb b/spec/controllers/api/documents_controller_spec.rb index 10ee72fc8b..268ed686a7 100644 --- a/spec/controllers/api/documents_controller_spec.rb +++ b/spec/controllers/api/documents_controller_spec.rb @@ -28,7 +28,7 @@ context "GET index returns all documents" do def get_all_documents get :index, taxon_concept_id: @taxon_concept.id - response.body.should have_json_size(4).at_path('documents') + expect(response.body).to have_json_size(4).at_path('documents') end context "GET index contributor" do login_contributor @@ -50,7 +50,7 @@ def get_all_documents context "GET index returns only public documents" do def get_public_documents get :index, taxon_concept_id: @taxon_concept.id - response.body.should have_json_size(3).at_path('documents') + expect(response.body).to have_json_size(3).at_path('documents') end context "GET index api user " do login_api_user @@ -69,7 +69,7 @@ def get_public_documents context "GET index returns only public documents for secretariat role" do def get_public_documents get :index, taxon_concept_id: @taxon_concept.id - response.body.should have_json_size(3).at_path('documents') + expect(response.body).to have_json_size(3).at_path('documents') end context "GET index api user " do login_secretariat_user @@ -83,7 +83,7 @@ def get_public_documents context "show action fails" do login_api_user it "should return 403 status when permission denied" do - controller.should_receive(:render_403) { controller.render nothing: true } + expect(controller).to receive(:render_403) { controller.render nothing: true } get :show, id: @document2.id end end @@ -91,7 +91,7 @@ def get_public_documents context "GET should retrieve documents with no event_type" do it "returns documents with no event_type" do get :index, event_type: "Other" - response.body.should have_json_size(1).at_path('documents') + expect(response.body).to have_json_size(1).at_path('documents') end end @@ -99,35 +99,35 @@ def get_public_documents context "single document selected" do it "should return 404 if file is missing" do expect(File).to receive(:exists?).and_return(false) - controller.should_receive(:render_404) { controller.render nothing: true } + expect(controller).to receive(:render_404) { controller.render nothing: true } get :download_zip, ids: @document2.id end it "should return zip file if file is found" do allow(controller).to receive(:render) expect(File).to receive(:exists?).and_return(true) get :download_zip, ids: @document2.id - response.headers['Content-Type'].should eq 'application/zip' + expect(response.headers['Content-Type']).to eq 'application/zip' end end context "multiple documents selected" do it "should return 404 if all files are missing" do expect(File).to receive(:exists?).and_return(false, false) - controller.should_receive(:render_404) { controller.render nothing: true } + expect(controller).to receive(:render_404) { controller.render nothing: true } get :download_zip, ids: "#{@document.id},#{@document2.id}" end it "should return zip file if at least a file is found" do expect(File).to receive(:exists?).and_return(false, true) get :download_zip, ids: "#{@document.id},#{@document2.id}" - response.headers['Content-Type'].should eq 'application/zip' + expect(response.headers['Content-Type']).to eq 'application/zip' end end context "cascading documents logic" do it "should get subspecies documents" do get :index, taxon_concepts_ids: [@taxon_concept.id] - response.body.should have_json_size(3).at_path('documents') + expect(response.body).to have_json_size(3).at_path('documents') end end end diff --git a/spec/controllers/api/events_controller_spec.rb b/spec/controllers/api/events_controller_spec.rb index 31db57c674..9c2374b196 100644 --- a/spec/controllers/api/events_controller_spec.rb +++ b/spec/controllers/api/events_controller_spec.rb @@ -9,8 +9,8 @@ end it "returns only E-library events most recent first" do get :index - response.body.should have_json_size(2).at_path('events') - response.body.should be_json_eql( + expect(response.body).to have_json_size(2).at_path('events') + expect(response.body).to be_json_eql( Species::EventSerializer.new(@copY).attributes.to_json ).at_path('events/0') end diff --git a/spec/controllers/api/geo_entities_controller_spec.rb b/spec/controllers/api/geo_entities_controller_spec.rb index 8b94051373..2ef04d6da8 100644 --- a/spec/controllers/api/geo_entities_controller_spec.rb +++ b/spec/controllers/api/geo_entities_controller_spec.rb @@ -37,11 +37,11 @@ describe "GET index" do it "returns regions" do get :index, :geo_entity_types_set => "1" - response.body.should have_json_size(1).at_path('geo_entities') + expect(response.body).to have_json_size(1).at_path('geo_entities') end it "returns countries & territories" do get :index, :geo_entity_types_set => "2" - response.body.should have_json_size(3).at_path('geo_entities') + expect(response.body).to have_json_size(3).at_path('geo_entities') end end end diff --git a/spec/controllers/api/purposes_controller_spec.rb b/spec/controllers/api/purposes_controller_spec.rb index ff87f5dbab..f3b582ef34 100644 --- a/spec/controllers/api/purposes_controller_spec.rb +++ b/spec/controllers/api/purposes_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns purposes" do get :index - response.body.should have_json_size(1).at_path('purposes') + expect(response.body).to have_json_size(1).at_path('purposes') end end end diff --git a/spec/controllers/api/sources_controller_spec.rb b/spec/controllers/api/sources_controller_spec.rb index 86d4c623dd..b46a484f7a 100644 --- a/spec/controllers/api/sources_controller_spec.rb +++ b/spec/controllers/api/sources_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns sources" do get :index - response.body.should have_json_size(1).at_path('sources') + expect(response.body).to have_json_size(1).at_path('sources') end end end diff --git a/spec/controllers/api/terms_controller_spec.rb b/spec/controllers/api/terms_controller_spec.rb index f6293eb5e8..e4e8feaab0 100644 --- a/spec/controllers/api/terms_controller_spec.rb +++ b/spec/controllers/api/terms_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns terms" do get :index - response.body.should have_json_size(1).at_path('terms') + expect(response.body).to have_json_size(1).at_path('terms') end end end diff --git a/spec/controllers/api/units_controller_spec.rb b/spec/controllers/api/units_controller_spec.rb index 6621b231fe..f582cb87f8 100644 --- a/spec/controllers/api/units_controller_spec.rb +++ b/spec/controllers/api/units_controller_spec.rb @@ -7,7 +7,7 @@ end it "returns units" do get :index - response.body.should have_json_size(1).at_path('units') + expect(response.body).to have_json_size(1).at_path('units') end end end diff --git a/spec/controllers/checklist/geo_entities_controller_spec.rb b/spec/controllers/checklist/geo_entities_controller_spec.rb index 78f42f0582..847c612080 100644 --- a/spec/controllers/checklist/geo_entities_controller_spec.rb +++ b/spec/controllers/checklist/geo_entities_controller_spec.rb @@ -37,11 +37,11 @@ describe "GET index" do it "returns regions" do get :index, :geo_entity_types_set => "1" - response.body.should have_json_size(1) + expect(response.body).to have_json_size(1) end it "returns countries & territories" do get :index, :geo_entity_types_set => "2" - response.body.should have_json_size(3) + expect(response.body).to have_json_size(3) end end end diff --git a/spec/controllers/checklist/taxon_concepts_controller_spec.rb b/spec/controllers/checklist/taxon_concepts_controller_spec.rb index 39b7046e2e..0321ee49a4 100644 --- a/spec/controllers/checklist/taxon_concepts_controller_spec.rb +++ b/spec/controllers/checklist/taxon_concepts_controller_spec.rb @@ -6,13 +6,13 @@ it "returns 1 result" do xhr :get, :autocomplete, :format => 'json', :scientific_name => 'Arctocephalus townsendi' - response.body.should have_json_size(1) + expect(response.body).to have_json_size(1) end end context "when query blank" do it "returns 0 results" do xhr :get, :autocomplete, :format => 'json' - response.body.should have_json_size(0) + expect(response.body).to have_json_size(0) end end end diff --git a/spec/controllers/cites_trade/exports_controller_spec.rb b/spec/controllers/cites_trade/exports_controller_spec.rb index b82475bbd2..2eef8d0947 100644 --- a/spec/controllers/cites_trade/exports_controller_spec.rb +++ b/spec/controllers/cites_trade/exports_controller_spec.rb @@ -7,37 +7,37 @@ it "returns count of shipments" do create(:shipment) get :download, :filters => { :report_type => 'raw' }, :format => :json - parse_json(response.body)['total'].should == 1 + expect(parse_json(response.body)['total']).to eq(1) end end context "comptab" do it "returns comptab shipments file" do create(:shipment) - Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') - Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) - Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") + allow_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') + allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) + allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") get :download, :filters => { :report_type => :comptab } - response.content_type.should eq("text/csv") - response.headers["Content-Disposition"].should eq("attachment; filename=\"shipments.csv\"") + expect(response.content_type).to eq("text/csv") + expect(response.headers["Content-Disposition"]).to eq("attachment; filename=\"shipments.csv\"") end it "logs download information from public interface to the TradeDataDownload model" do create(:shipment) - Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') - Trade::TradeDataDownloadLogger.stub(:city_country_from).and_return(["Cambridge", "United Kingdom"]) - Trade::TradeDataDownloadLogger.stub(:organization_from).and_return("UNEP-WCMC") - lambda do + allow_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') + allow(Trade::TradeDataDownloadLogger).to receive(:city_country_from).and_return(["Cambridge", "United Kingdom"]) + allow(Trade::TradeDataDownloadLogger).to receive(:organization_from).and_return("UNEP-WCMC") + expect do get :download, :filters => { :report_type => 'comptab', :exporters_ids => ['40'], :time_range_start => '1975', :time_range_end => '2000' } - end.should change(Trade::TradeDataDownload, :count).by(1) + end.to change(Trade::TradeDataDownload, :count).by(1) end end context 'when shipments cannot be retrieved' do before(:each) do - Trade::ShipmentsExport.any_instance.stub(:export).and_return(false) + allow_any_instance_of(Trade::ShipmentsExport).to receive(:export).and_return(false) end it "redirects to home page" do get :download, :filters => { :report_type => :comptab } diff --git a/spec/controllers/cites_trade/shipments_controller_spec.rb b/spec/controllers/cites_trade/shipments_controller_spec.rb index 6a8c17e38e..b90e7e730c 100644 --- a/spec/controllers/cites_trade/shipments_controller_spec.rb +++ b/spec/controllers/cites_trade/shipments_controller_spec.rb @@ -10,24 +10,24 @@ get :index, filters: { report_type: 'raw' }, format: :json - response.body.should have_json_path('shipment_comptab_export') + expect(response.body).to have_json_path('shipment_comptab_export') end it "should return comptab export when report_type = comptab" do get :index, filters: { report_type: 'comptab' }, format: :json - response.body.should have_json_path('shipment_comptab_export') + expect(response.body).to have_json_path('shipment_comptab_export') end it "should return gross net export when report_type = gross_exports" do get :index, filters: { report_type: 'gross_exports' }, format: :json - response.body.should have_json_path('shipment_gross_net_export') + expect(response.body).to have_json_path('shipment_gross_net_export') end end it "should return all comptab shipments" do get :index, format: :json - response.body.should have_json_size(7).at_path('shipment_comptab_export/rows') + expect(response.body).to have_json_size(7).at_path('shipment_comptab_export/rows') end it "should return all gross_exports shipments" do get :index, filters: { @@ -35,28 +35,28 @@ time_range_start: 2012, time_range_end: 2014 }, format: :json - response.body.should have_json_size(5).at_path('shipment_gross_net_export/rows') + expect(response.body).to have_json_size(5).at_path('shipment_gross_net_export/rows') end it "should return genus & species shipments when searching by genus" do get :index, filters: { taxon_concepts_ids: [@animal_genus.id], selection_taxon: 'taxonomic_cascade' }, format: :json - response.body.should have_json_size(2).at_path('shipment_comptab_export/rows') + expect(response.body).to have_json_size(2).at_path('shipment_comptab_export/rows') end it "should return family, genus & species shipments when searching by family" do get :index, filters: { taxon_concepts_ids: [@animal_family.id], selection_taxon: 'taxonomic_cascade' }, format: :json - response.body.should have_json_size(3).at_path('shipment_comptab_export/rows') + expect(response.body).to have_json_size(3).at_path('shipment_comptab_export/rows') end it "should return genus shipments when searching by taxon" do get :index, filters: { taxon_concepts_ids: [@animal_genus.id], selection_taxon: 'taxon' }, format: :json - response.body.should have_json_size(0).at_path('shipment_comptab_export/rows') + expect(response.body).to have_json_size(0).at_path('shipment_comptab_export/rows') end end diff --git a/spec/controllers/pages_controller_spec.rb b/spec/controllers/pages_controller_spec.rb index 2730f23e40..b59be98034 100644 --- a/spec/controllers/pages_controller_spec.rb +++ b/spec/controllers/pages_controller_spec.rb @@ -9,11 +9,11 @@ end it "assigns annex regulations sorted by effective_at" do get :eu_legislation - assigns(:eu_annex_regulations).should eq([@ar2, @ar1]) + expect(assigns(:eu_annex_regulations)).to eq([@ar2, @ar1]) end it "assigns suspension regulations" do get :eu_legislation - assigns(:eu_suspension_regulations).should_not be_nil + expect(assigns(:eu_suspension_regulations)).not_to be_nil end end end diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index f2231c25b2..e28bd4ab92 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -15,7 +15,7 @@ put :update, :id => @u1.id, :user => { :email => @u1.email, :name => 'ZZ' } - response.should redirect_to(admin_root_url) + expect(response).to redirect_to(admin_root_url) end it "should update password" do sign_in(@u1) @@ -24,14 +24,14 @@ :password => '22222222', :password_confirmation => '22222222', :current_password => '11111111' } - response.should redirect_to(admin_root_url) + expect(response).to redirect_to(admin_root_url) end it "should not update that account if not valid" do sign_in(@u1) put :update, :id => @u1.id, :user => { :email => @u1.email, :name => nil } - response.should render_template("edit") + expect(response).to render_template("edit") end end @@ -41,7 +41,7 @@ put :update, :id => @u2.id, :user => { :email => @u1.email, :name => 'ZZ' } - @u2.reload.name.should_not == 'ZZ' + expect(@u2.reload.name).not_to eq('ZZ') end end diff --git a/spec/controllers/species/exports_controller_spec.rb b/spec/controllers/species/exports_controller_spec.rb index edef05d280..022470e8a2 100644 --- a/spec/controllers/species/exports_controller_spec.rb +++ b/spec/controllers/species/exports_controller_spec.rb @@ -9,7 +9,7 @@ end context 'with ip address to csv separator conversion' do it 'sets separator to comma with local ip address' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("127.0.0.1") + allow_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("127.0.0.1") get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -20,8 +20,8 @@ end it 'sets separator to comma with UK ip address' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("194.59.188.126") - Sapi::GeoIP.any_instance.stub(:country_and_city).and_return({ :country => "GB", :city => "Cambridge" }) + allow_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("194.59.188.126") + allow_any_instance_of(Sapi::GeoIP).to receive(:country_and_city).and_return({ :country => "GB", :city => "Cambridge" }) get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -31,8 +31,8 @@ end it 'sets separator to semicolon with AF ip address' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("175.106.59.78") - Sapi::GeoIP.any_instance.stub(:country_and_city).and_return({ :country => "AF", :city => "Kabul" }) + allow_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("175.106.59.78") + allow_any_instance_of(Sapi::GeoIP).to receive(:country_and_city).and_return({ :country => "AF", :city => "Kabul" }) get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -42,7 +42,7 @@ end it 'sets separator back to comma when a user overrides the encoded default' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("175.106.59.78") + allow_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("175.106.59.78") get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => 'comma' } @@ -52,7 +52,7 @@ end it 'sets separator to comma when IP address is nil' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return(nil) + allow_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return(nil) get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } @@ -62,7 +62,7 @@ end it 'sets separator to comma when IP address is unknown' do - ActionDispatch::Request.any_instance.stub(:remote_ip).and_return('unknown') + allow_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return('unknown') get :download, data_type: 'EuDecisions', :filters => { 'set' => 'current', 'decision_types' => {}, :csv_separator => '' } diff --git a/spec/controllers/trade/annual_report_uploads_controller_spec.rb b/spec/controllers/trade/annual_report_uploads_controller_spec.rb index 96a69f6721..2572de7de2 100644 --- a/spec/controllers/trade/annual_report_uploads_controller_spec.rb +++ b/spec/controllers/trade/annual_report_uploads_controller_spec.rb @@ -34,18 +34,18 @@ def exporter_csv end it "should return all annual report uploads" do get :index, format: :json - response.body.should have_json_size(2).at_path('annual_report_uploads') + expect(response.body).to have_json_size(2).at_path('annual_report_uploads') end it "should return annual report uploads in progress" do get :index, is_done: 0, format: :json - response.body.should have_json_size(1).at_path('annual_report_uploads') + expect(response.body).to have_json_size(1).at_path('annual_report_uploads') end end describe "GET show" do it "should return success" do get :show, id: annual_report_upload.id, format: :json - response.body.should have_json_path('annual_report_upload') + expect(response.body).to have_json_path('annual_report_upload') end end @@ -56,7 +56,7 @@ def exporter_csv :point_of_view => 'E', :trading_country_id => france.id, :csv_source_file => exporter_csv }, :format => 'json' - parse_json(response.body, "files/0")['id'].should_not be_blank + expect(parse_json(response.body, "files/0")['id']).not_to be_blank end it "should return error in jQuery File Upload way" do xhr :post, :create, @@ -64,7 +64,7 @@ def exporter_csv :point_of_view => 'I', :trading_country_id => france.id, :csv_source_file => exporter_csv }, :format => 'json' - parse_json(response.body, "files/0")['id'].should be_blank + expect(parse_json(response.body, "files/0")['id']).to be_blank end end diff --git a/spec/controllers/trade/ember_controller_spec.rb b/spec/controllers/trade/ember_controller_spec.rb index 04ac14a661..3e5b55b4bd 100644 --- a/spec/controllers/trade/ember_controller_spec.rb +++ b/spec/controllers/trade/ember_controller_spec.rb @@ -6,7 +6,7 @@ describe "GET 'start'" do it "returns http success" do get 'start' - response.should be_success + expect(response).to be_success end end diff --git a/spec/controllers/trade/exports_controller_spec.rb b/spec/controllers/trade/exports_controller_spec.rb index 3c17a3ea42..2298c49a9c 100644 --- a/spec/controllers/trade/exports_controller_spec.rb +++ b/spec/controllers/trade/exports_controller_spec.rb @@ -8,11 +8,11 @@ it "returns count of shipments" do create(:shipment) get :download, :filters => { :report_type => 'raw' }, :format => :json - parse_json(response.body)['total'].should == 1 + expect(parse_json(response.body)['total']).to eq(1) end it "does not log download information from the admin interface" do create(:shipment) - Trade::ShipmentsExport.any_instance.stub(:public_file_name).and_return('shipments.csv') + allow_any_instance_of(Trade::ShipmentsExport).to receive(:public_file_name).and_return('shipments.csv') expect { get :download, :filters => { :report_type => :raw, @@ -25,7 +25,7 @@ end context 'when shipments cannot be retrieved' do before(:each) do - Trade::ShipmentsExport.any_instance.stub(:export).and_return(false) + allow_any_instance_of(Trade::ShipmentsExport).to receive(:export).and_return(false) end it "redirects to home page" do get :download, :filters => { :report_type => :comptab } diff --git a/spec/controllers/trade/sandbox_shipments_controller_spec.rb b/spec/controllers/trade/sandbox_shipments_controller_spec.rb index 69d9b46e46..50522a9230 100644 --- a/spec/controllers/trade/sandbox_shipments_controller_spec.rb +++ b/spec/controllers/trade/sandbox_shipments_controller_spec.rb @@ -37,14 +37,14 @@ :id => @shipment.id, :sandbox_shipment => { :taxon_name => nil, :accepted_taxon_name => nil }, :format => :json - response.body.should be_blank + expect(response.body).to be_blank end it "should return success when taxon_name does not exist" do put :update, :annual_report_upload_id => annual_report_upload.id, :id => @shipment.id, :sandbox_shipment => { :taxon_name => 'Acipenser foobarus' }, :format => :json - response.body.should be_blank + expect(response.body).to be_blank end end @@ -53,7 +53,7 @@ delete :destroy, :annual_report_upload_id => annual_report_upload.id, :id => @shipment.id, :format => :json - response.body.should be_blank + expect(response.body).to be_blank end end @@ -64,9 +64,9 @@ validation_error_id: @validation_error.id, updates: { appendix: 'II' }, format: :json - response.body.should be_blank - sandbox_klass.where(taxon_name: @species.full_name, appendix: 'I').count(true).should == 0 - sandbox_klass.where(taxon_name: @species.full_name, appendix: 'II').count(true).should == 1 + expect(response.body).to be_blank + expect(sandbox_klass.where(taxon_name: @species.full_name, appendix: 'I').count(true)).to eq(0) + expect(sandbox_klass.where(taxon_name: @species.full_name, appendix: 'II').count(true)).to eq(1) end end @@ -76,8 +76,8 @@ annual_report_upload_id: annual_report_upload.id, validation_error_id: @validation_error.id, format: :json - response.body.should be_blank - sandbox_klass.where(taxon_concept_id: @species.id).count(true).should == 0 + expect(response.body).to be_blank + expect(sandbox_klass.where(taxon_concept_id: @species.id).count(true)).to eq(0) end end diff --git a/spec/controllers/trade/shipments_controller_spec.rb b/spec/controllers/trade/shipments_controller_spec.rb index 507c41a5af..dc4ac30809 100644 --- a/spec/controllers/trade/shipments_controller_spec.rb +++ b/spec/controllers/trade/shipments_controller_spec.rb @@ -9,17 +9,17 @@ before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } it "should return all shipments" do get :index, format: :json - response.body.should have_json_size(7).at_path('shipments') + expect(response.body).to have_json_size(7).at_path('shipments') end it "should return genus & species shipments when searching by genus" do get :index, taxon_concepts_ids: [@animal_genus.id], format: :json - response.body.should have_json_size(2).at_path('shipments') + expect(response.body).to have_json_size(2).at_path('shipments') end it "should return 1 shipment when searching for reporter_type I" do get :index, time_range_start: @shipment1.year, time_range_end: @shipment2.year, reporter_type: "E", exporters_ids: [@portugal.id.to_s], format: :json - response.body.should have_json_size(1).at_path('shipments') + expect(response.body).to have_json_size(1).at_path('shipments') end end @@ -30,7 +30,7 @@ shipment: { reported_taxon_concept_id: @synonym_subspecies.id } - @shipment1.reload.taxon_concept_id.should == @plant_species.id + expect(@shipment1.reload.taxon_concept_id).to eq(@plant_species.id) end it "should not auto resolve accepted taxon when given" do put :update, id: @shipment1.id, @@ -38,14 +38,14 @@ reported_taxon_concept_id: @synonym_subspecies.id, taxon_concept_id: @animal_species.id } - @shipment1.reload.taxon_concept_id.should == @animal_species.id + expect(@shipment1.reload.taxon_concept_id).to eq(@animal_species.id) end it "should delete orphaned permits" do put :update, id: @shipment1.id, shipment: { import_permit_number: 'YYY' } - Trade::Permit.find_by_id(@import_permit.id).should be_nil + expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil end end @@ -99,8 +99,8 @@ year: 2014 } } - Trade::Shipment.where(year: 2013).count.should == 0 - Trade::Shipment.where(year: 2014).count.should > 0 + expect(Trade::Shipment.where(year: 2013).count).to eq(0) + expect(Trade::Shipment.where(year: 2014).count).to be > 0 end it "should auto resolve accepted taxon when blank" do @@ -116,7 +116,7 @@ reported_taxon_concept_id: @synonym_subspecies.id } } - @shipment1.reload.taxon_concept_id.should == @plant_species.id + expect(@shipment1.reload.taxon_concept_id).to eq(@plant_species.id) end it "should not auto resolve accepted taxon when given" do @@ -133,7 +133,7 @@ taxon_concept_id: @animal_species.id } } - @shipment1.reload.taxon_concept_id.should == @animal_species.id + expect(@shipment1.reload.taxon_concept_id).to eq(@animal_species.id) end it "should set permit number to blank and delete orphaned permits" do @@ -149,9 +149,9 @@ import_permit_number: nil } } - @shipment1.reload.import_permits_ids.should be_blank - @shipment1.import_permit_number.should be_nil - Trade::Permit.find_by_id(@import_permit.id).should be_nil + expect(@shipment1.reload.import_permits_ids).to be_blank + expect(@shipment1.import_permit_number).to be_nil + expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil end end @@ -167,7 +167,7 @@ importers_ids: [@portugal.id.to_s, @argentina.id.to_s], taxon_concepts_ids: [@animal_species.id] } - Trade::Shipment.count.should == 6 + expect(Trade::Shipment.count).to eq(6) end it "should delete 5 shipment" do post :destroy_batch, { @@ -177,49 +177,49 @@ exporters_ids: [@portugal.id.to_s, @argentina.id.to_s], importers_ids: [@portugal.id.to_s, @argentina.id.to_s] } - Trade::Shipment.count.should == 2 + expect(Trade::Shipment.count).to eq(2) end it "should delete 2 shipments" do post :destroy_batch, importers_ids: [@argentina.id.to_s] - Trade::Shipment.count.should == 5 + expect(Trade::Shipment.count).to eq(5) end it "should delete 1 shipments" do post :destroy_batch, exporters_ids: [@portugal.id.to_s] - Trade::Shipment.count.should == 5 + expect(Trade::Shipment.count).to eq(5) end it "should delete all shipments" do post :destroy_batch, purposes_ids: [@purpose.id.to_s] - Trade::Shipment.count.should == 0 + expect(Trade::Shipment.count).to eq(0) end it "shouldn't delete any shipments" do post :destroy_batch, purpose_blank: "true" - Trade::Shipment.count.should == 7 + expect(Trade::Shipment.count).to eq(7) end it "should delete 1 shipment" do post :destroy_batch, sources_ids: [@source.id.to_s] - Trade::Shipment.count.should == 5 + expect(Trade::Shipment.count).to eq(5) end it "should delete 3 shipment" do post :destroy_batch, sources_ids: [@source_wild.id.to_s] - Trade::Shipment.count.should == 4 + expect(Trade::Shipment.count).to eq(4) end it "should delete 0 shipments" do post :destroy_batch, sources_ids: [@source_wild.id.to_s], reporter_type: 'E' - Trade::Shipment.count.should == 7 + expect(Trade::Shipment.count).to eq(7) end it "should delete 4 shipments" do post :destroy_batch, sources_ids: [@source_wild.id.to_s], reporter_type: 'I', source_blank: "true" - Trade::Shipment.count.should == 3 + expect(Trade::Shipment.count).to eq(3) end it "should delete orphaned permits" do @@ -231,8 +231,8 @@ exporters_ids: [@portugal.id.to_s, @argentina.id.to_s], importers_ids: [@portugal.id.to_s, @argentina.id.to_s] } - Trade::Shipment.find_by_id(@shipment1.id).should be_nil - Trade::Permit.find_by_id(@import_permit.id).should be_nil + expect(Trade::Shipment.find_by_id(@shipment1.id)).to be_nil + expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil end end @@ -240,11 +240,11 @@ before(:each) { Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings } it "should delete 1 shipment" do delete :destroy, id: @shipment1.id - Trade::Shipment.where(id: @shipment1.id).should be_empty + expect(Trade::Shipment.where(id: @shipment1.id)).to be_empty end it "should delete orphaned permits" do delete :destroy, id: @shipment1.id - Trade::Permit.find_by_id(@import_permit.id).should be_nil + expect(Trade::Permit.find_by_id(@import_permit.id)).to be_nil end end end diff --git a/spec/controllers/trade/validation_errors_controller_spec.rb b/spec/controllers/trade/validation_errors_controller_spec.rb index c21c92b1c8..67446caeb9 100644 --- a/spec/controllers/trade/validation_errors_controller_spec.rb +++ b/spec/controllers/trade/validation_errors_controller_spec.rb @@ -44,7 +44,7 @@ describe "GET show" do it "should return success" do get :show, id: validation_error.id, format: :json - response.body.should have_json_path('validation_error') + expect(response.body).to have_json_path('validation_error') end end diff --git a/spec/controllers/trade/validation_rules_controller_spec.rb b/spec/controllers/trade/validation_rules_controller_spec.rb index c64b68de97..8e3bbb719b 100644 --- a/spec/controllers/trade/validation_rules_controller_spec.rb +++ b/spec/controllers/trade/validation_rules_controller_spec.rb @@ -6,7 +6,7 @@ describe "GET index" do it "should return success" do get :index, format: :json - response.should be_success + expect(response).to be_success end end end diff --git a/spec/helpers/admin_helper_spec.rb b/spec/helpers/admin_helper_spec.rb index e9fdbd7be1..50df2edcaf 100644 --- a/spec/helpers/admin_helper_spec.rb +++ b/spec/helpers/admin_helper_spec.rb @@ -13,20 +13,20 @@ describe AdminHelper, type: :helper do describe 'edit_icon' do it "ouputs pencil icon for edit" do - helper.edit_icon.should == '' + expect(helper.edit_icon).to eq('') end end describe 'delete_icon' do it "ouputs bin icon for delete" do - helper.delete_icon.should == '' + expect(helper.delete_icon).to eq('') end end describe 'true_false_icon' do it "outputs tick icon for true" do - helper.true_false_icon(true).should == '' + expect(helper.true_false_icon(true)).to eq('') end it "outputs blank for false" do - helper.true_false_icon(false).should be_blank + expect(helper.true_false_icon(false)).to be_blank end end diff --git a/spec/helpers/listing_changes_helper_spec.rb b/spec/helpers/listing_changes_helper_spec.rb index c2a8330a8b..81750c65f3 100644 --- a/spec/helpers/listing_changes_helper_spec.rb +++ b/spec/helpers/listing_changes_helper_spec.rb @@ -52,25 +52,27 @@ ) } it "outputs all geo entities comma separated" do - helper.geo_entities_tooltip(listing_change).should == 'Poland' + expect(helper.geo_entities_tooltip(listing_change)).to eq('Poland') end end describe 'annotation_tooltip' do it "outputs the regular annotation in both short and long English form" do - helper.annotation_tooltip(listing_change).should == + expect(helper.annotation_tooltip(listing_change)).to eq( "Only population of PL (Only population of Poland)" + ) end end describe 'hash_annotation_tooltip' do it "outputs the hash annotation in long English form" do - helper.hash_annotation_tooltip(listing_change).should == + expect(helper.hash_annotation_tooltip(listing_change)).to eq( "Only seeds and roots." + ) end end describe 'excluded_geo_entities_tooltip' do context "no exclusions" do it "should output blank exception" do - helper.excluded_geo_entities_tooltip(listing_change).should be_blank + expect(helper.excluded_geo_entities_tooltip(listing_change)).to be_blank end end @@ -90,7 +92,7 @@ ) } it "should list geographic exception" do - helper.excluded_geo_entities_tooltip(listing_change).should == 'Poland' + expect(helper.excluded_geo_entities_tooltip(listing_change)).to eq('Poland') end end end @@ -103,7 +105,7 @@ } context "no exclusions" do it "should output blank exception" do - helper.excluded_taxon_concepts_tooltip(listing_change).should be_blank + expect(helper.excluded_taxon_concepts_tooltip(listing_change)).to be_blank end end @@ -115,7 +117,7 @@ ) } it "should list taxonomic exception" do - helper.excluded_taxon_concepts_tooltip(listing_change).should == 'Foobarus cracovianus' + expect(helper.excluded_taxon_concepts_tooltip(listing_change)).to eq('Foobarus cracovianus') end end diff --git a/spec/models/annotation_spec.rb b/spec/models/annotation_spec.rb index c2d2ac1e76..2c4ec0feae 100644 --- a/spec/models/annotation_spec.rb +++ b/spec/models/annotation_spec.rb @@ -43,16 +43,16 @@ describe :destroy do let(:annotation) { create(:annotation) } context "when no dependent objects attached" do - specify { annotation.destroy.should be_truthy } + specify { expect(annotation.destroy).to be_truthy } end context "when dependent objects attached" do context "when listing changes" do let!(:listing_change) { create_cites_I_addition(:annotation_id => annotation.id) } - specify { annotation.destroy.should be_falsey } + specify { expect(annotation.destroy).to be_falsey } end context "when hashed listing changes" do let!(:listing_change) { create_cites_I_addition(:hash_annotation_id => annotation.id) } - specify { annotation.destroy.should be_falsey } + specify { expect(annotation.destroy).to be_falsey } end end end diff --git a/spec/models/change_type_spec.rb b/spec/models/change_type_spec.rb index 49ff5097ad..6a26bd0725 100644 --- a/spec/models/change_type_spec.rb +++ b/spec/models/change_type_spec.rb @@ -18,12 +18,12 @@ describe :abbreviation do context 'change type with single word name' do let(:change_type) { create(:change_type, :name => "Word") } - specify { change_type.abbreviation.should == 'Wor' } + specify { expect(change_type.abbreviation).to eq('Wor') } end context 'change type with two words name' do let(:change_type) { create(:change_type, :name => "Word_Word") } - specify { change_type.abbreviation.should == 'Wor-Wor' } + specify { expect(change_type.abbreviation).to eq('Wor-Wor') } end end end diff --git a/spec/models/checklist/annotations_spec.rb b/spec/models/checklist/annotations_spec.rb index 30150de68d..3cf373f4b5 100644 --- a/spec/models/checklist/annotations_spec.rb +++ b/spec/models/checklist/annotations_spec.rb @@ -13,11 +13,11 @@ end context 'for species Caiman latirostris' do subject { @taxon_concepts.select { |e| e.full_name == 'Caiman latirostris' }.first } - specify { subject.ann_symbol.should == '1' } + specify { expect(subject.ann_symbol).to eq('1') } end context 'for species Panax ginseng' do subject { @taxon_concepts.select { |e| e.full_name == 'Panax ginseng' }.first } - specify { subject.ann_symbol.should == '2' } + specify { expect(subject.ann_symbol).to eq('2') } end end end diff --git a/spec/models/checklist/appendix_population_and_region_spec.rb b/spec/models/checklist/appendix_population_and_region_spec.rb index 13346aca3d..480bfe10ef 100644 --- a/spec/models/checklist/appendix_population_and_region_spec.rb +++ b/spec/models/checklist/appendix_population_and_region_spec.rb @@ -12,7 +12,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when Mexico" do @@ -23,7 +23,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when Canada" do @@ -34,7 +34,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when Argentina" do @@ -45,7 +45,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when South America" do @@ -56,7 +56,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when North America" do @@ -67,7 +67,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when North America and Argentina" do @@ -79,7 +79,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end diff --git a/spec/models/checklist/appendix_population_spec.rb b/spec/models/checklist/appendix_population_spec.rb index d33e062f06..26297fbf60 100644 --- a/spec/models/checklist/appendix_population_spec.rb +++ b/spec/models/checklist/appendix_population_spec.rb @@ -13,7 +13,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when Poland" do @@ -24,7 +24,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end @@ -38,7 +38,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when App II" do @@ -49,7 +49,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when App III" do @@ -60,7 +60,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end end @@ -76,7 +76,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when App II" do @@ -88,7 +88,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end end @@ -102,7 +102,7 @@ checklist.results } specify do - subject.should_not include(@species) + expect(subject).not_to include(@species) end end context "when App II" do @@ -114,7 +114,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end @@ -128,7 +128,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when App II" do @@ -140,7 +140,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end @@ -154,7 +154,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end context "when Nepal" do @@ -166,7 +166,7 @@ checklist.results } specify do - subject.should include(@species) + expect(subject).to include(@species) end end end diff --git a/spec/models/checklist/appendix_spec.rb b/spec/models/checklist/appendix_spec.rb index 2a7329bec2..2e8321fba0 100644 --- a/spec/models/checklist/appendix_spec.rb +++ b/spec/models/checklist/appendix_spec.rb @@ -12,11 +12,11 @@ @taxon_concepts = @checklist.results end it "should return Cacatua goffiniana" do - @taxon_concepts.select { |e| e.full_name == @species1_2_1.full_name }.first.should_not be_nil + expect(@taxon_concepts.select { |e| e.full_name == @species1_2_1.full_name }.first).not_to be_nil end it "should not return Agapornis roseicollis" do - @taxon_concepts.select { |e| e.full_name == @species2_1.full_name }.first.should be_nil + expect(@taxon_concepts.select { |e| e.full_name == @species2_1.full_name }.first).to be_nil end end diff --git a/spec/models/checklist/checklist_spec.rb b/spec/models/checklist/checklist_spec.rb index 0600d26a88..b3b9ff362e 100644 --- a/spec/models/checklist/checklist_spec.rb +++ b/spec/models/checklist/checklist_spec.rb @@ -8,7 +8,7 @@ Checklist::Checklist.summarise_filters({}) } specify { - summary.should == "All results" + expect(summary).to eq("All results") } end end @@ -23,7 +23,7 @@ Checklist::Checklist.summarise_filters({ :cites_region_ids => [region.id] }) } specify { - summary.should == "Results from 1 region" + expect(summary).to eq("Results from 1 region") } end context "when > 1 region" do @@ -40,7 +40,7 @@ Checklist::Checklist.summarise_filters({ :cites_region_ids => regions }) } specify { - summary.should == "Results from 2 regions" + expect(summary).to eq("Results from 2 regions") } end end diff --git a/spec/models/checklist/common_names_spec.rb b/spec/models/checklist/common_names_spec.rb index a5f7709b07..1755f70944 100644 --- a/spec/models/checklist/common_names_spec.rb +++ b/spec/models/checklist/common_names_spec.rb @@ -17,32 +17,32 @@ end it "should return all English names for Arctocephalus australis: 'South American Fur Seal, Southern Fur Seal'" do - @australis.english_names.should == ['South American Fur Seal', 'Southern Fur Seal'] + expect(@australis.english_names).to eq(['South American Fur Seal', 'Southern Fur Seal']) end it "should return all Spanish names for Arctocephalus australis: 'Lobo fino sudamericano, Oso marino austral'" do - @australis.spanish_names.should == ['Lobo fino sudamericano', 'Oso marino austral'] + expect(@australis.spanish_names).to eq(['Lobo fino sudamericano', 'Oso marino austral']) end it "should return all French names for Arctocephalus australis: 'Otarie à fourrure australe'" do - @australis.french_names.should == ['Otarie à fourrure australe'] + expect(@australis.french_names).to eq(['Otarie à fourrure australe']) end it "should return all English names for Arctocephalus spp.: 'Fur seals, Southern fur seals'" do - @arctocephalus.english_names.should == ['Fur seals 1', 'Southern fur seals'] + expect(@arctocephalus.english_names).to eq(['Fur seals 1', 'Southern fur seals']) end it "should return all Spanish names for Arctocephalus spp.: 'Osos marinos'" do - @arctocephalus.spanish_names.should == ['Osos marinos'] + expect(@arctocephalus.spanish_names).to eq(['Osos marinos']) end it "should return all French names for Arctocephalus spp.: 'Arctocéphales du sud, Otaries à fourrure, Otaries à fourrure du sud'" do - @arctocephalus.french_names.should == ['Arctocéphales du sud', 'Otaries à fourrure', 'Otaries à fourrure du sud'] + expect(@arctocephalus.french_names).to eq(['Arctocéphales du sud', 'Otaries à fourrure', 'Otaries à fourrure du sud']) end it "should include a species without any common names defined" do @pusillus = @taxon_concepts.select { |e| e.full_name == @species3.full_name }.first - @pusillus.should_not be_nil + expect(@pusillus).not_to be_nil end end diff --git a/spec/models/checklist/higher_taxa_injector_spec.rb b/spec/models/checklist/higher_taxa_injector_spec.rb index 7de45271f7..22c277a4ee 100644 --- a/spec/models/checklist/higher_taxa_injector_spec.rb +++ b/spec/models/checklist/higher_taxa_injector_spec.rb @@ -124,7 +124,7 @@ @species1_1_1, @species2_1_1_1_1 ) - headers.map(&:full_name).should == ['Memaridae'] + expect(headers.map(&:full_name)).to eq(['Memaridae']) } end context "when two species from different classes and expand_headers set" do @@ -141,7 +141,7 @@ @species1_1_1, @species2_1_1_1_1 ) - headers.map(&:full_name).should == ['Memaria', 'Memariformes', 'Memaridae'] + expect(headers.map(&:full_name)).to eq(['Memaria', 'Memariformes', 'Memaridae']) } end end @@ -156,7 +156,7 @@ ) } specify { - hti_different_family.run.size.should == 4 + expect(hti_different_family.run.size).to eq(4) } end context "when two species from different families and skip family set" do @@ -169,7 +169,7 @@ ) } specify { - hti_different_family.run.size.should == 3 + expect(hti_different_family.run.size).to eq(3) } end end @@ -187,7 +187,7 @@ } specify { headers = hti_one_species.higher_taxa_headers(nil, @species1_1_1) - headers.map(&:full_name).should == ['Lolcatidae'] + expect(headers.map(&:full_name)).to eq(['Lolcatidae']) } end context "when one species and skip family set" do @@ -199,7 +199,7 @@ ) } specify { - hti_one_species_skip_family.higher_taxa_headers(nil, @species1_1_1).should be_empty + expect(hti_one_species_skip_family.higher_taxa_headers(nil, @species1_1_1)).to be_empty } end context "when one species and expand headers set" do @@ -212,8 +212,9 @@ } specify { headers = hti_one_species_expand_headers.higher_taxa_headers(nil, @species1_1_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ["Rotflata", "Forfiteria", "Lolcatiformes", "Lolcatidae"] + ) } end context "when two species" do @@ -226,7 +227,7 @@ ) } specify { - hti_same_genus.higher_taxa_headers(@species1_1_1, @species1_1_2).should be_empty + expect(hti_same_genus.higher_taxa_headers(@species1_1_1, @species1_1_2)).to be_empty } end context "when species and subspecies" do @@ -239,7 +240,7 @@ ) } specify { - hti_species_subspecies.higher_taxa_headers(@species1_1_2, @subspecies1_1_1_1).should be_empty + expect(hti_species_subspecies.higher_taxa_headers(@species1_1_2, @subspecies1_1_1_1)).to be_empty } end end @@ -254,7 +255,7 @@ ) } specify { - hti_same_family.higher_taxa_headers(@species1_1_1, @species1_2_1).should be_empty + expect(hti_same_family.higher_taxa_headers(@species1_1_1, @species1_2_1)).to be_empty } end end @@ -270,8 +271,9 @@ } specify { headers = hti_different_family.higher_taxa_headers(@species1_1_1, @species2_1_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end context "when two species from different families and expand headers set" do @@ -285,8 +287,9 @@ } specify { headers = hti_different_family.higher_taxa_headers(@species1_1_1, @species2_1_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end context "when genus and different family" do @@ -300,8 +303,9 @@ } specify { headers = hti_genus_family.higher_taxa_headers(@genus1_1, @family2) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end context "when family and genus in different family" do @@ -315,8 +319,9 @@ } specify { headers = hti_family_genus.higher_taxa_headers(@family1, @genus2_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end end @@ -332,8 +337,9 @@ } specify { headers = hti_different_orders.higher_taxa_headers(@order2, @genus2_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Foobaridae'] + ) } end context "when order and genus from different order and expand headers set" do @@ -347,8 +353,9 @@ } specify { headers = hti_different_orders_expand.higher_taxa_headers(@order2, @genus2_1) - headers.map(&:full_name).should == + expect(headers.map(&:full_name)).to eq( ['Lolcatiformes', 'Foobaridae'] + ) } end end diff --git a/spec/models/checklist/higher_taxa_item_spec.rb b/spec/models/checklist/higher_taxa_item_spec.rb index e9a434f426..e7abf7cab0 100644 --- a/spec/models/checklist/higher_taxa_item_spec.rb +++ b/spec/models/checklist/higher_taxa_item_spec.rb @@ -15,7 +15,7 @@ ) } subject { Checklist::HigherTaxaItem.new(taxon_concept) } - specify { subject.ancestors_path.should == 'Chordata,Reptilia,Crocodylia,Alligatoridae' } + specify { expect(subject.ancestors_path).to eq('Chordata,Reptilia,Crocodylia,Alligatoridae') } end context "when plant" do let(:taxon_concept) { @@ -29,7 +29,7 @@ ) } subject { Checklist::HigherTaxaItem.new(taxon_concept) } - specify { subject.ancestors_path.should == 'Agavaceae' } + specify { expect(subject.ancestors_path).to eq('Agavaceae') } end end diff --git a/spec/models/checklist/order_spec.rb b/spec/models/checklist/order_spec.rb index 7af3af8b27..1603962b78 100644 --- a/spec/models/checklist/order_spec.rb +++ b/spec/models/checklist/order_spec.rb @@ -15,7 +15,7 @@ @taxon_concepts = @checklist.plantae end it "should include Agave (Agavaceae) before Panax (Araliaceae)" do - @taxon_concepts.index { |tc| tc.full_name == 'Agave parviflora' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Agave parviflora' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Panax ginseng' } end end @@ -26,30 +26,31 @@ @taxon_concepts = @checklist.animalia end it "should include birds after last mammal" do - @taxon_concepts.index { |tc| tc.full_name == 'Tapirus terrestris' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Tapirus terrestris' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Gymnogyps californianus' } end it "should include Falconiformes (Aves) before Psittaciformes (Aves)" do - @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Psittaciformes' } end it "should include Cathartidae within Falconiformes" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should > + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be > @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' } - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Psittaciformes' } end it "should include Cathartidae (Falconiformes) before Falconidae (Falconiformes)" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Falconidae' } end it "should include Cathartidae (Falconiformes) before Cacatuidae (Psittaciformes)" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Cacatuidae' } end it "should include Hirudo medicinalis at the very end (after all Chordata)" do - @taxon_concepts.index { |tc| tc.full_name == 'Hirudo medicinalis' }.should == + expect(@taxon_concepts.index { |tc| tc.full_name == 'Hirudo medicinalis' }).to eq( @taxon_concepts.length - 1 + ) end end end @@ -59,19 +60,19 @@ @taxon_concepts = @checklist.results end it "should include Falconiformes (Aves) before Psittaciformes (Aves)" do - @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Psittaciformes' } end it "should include Cathartidae before Falconiformes" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Falconiformes' } end it "should include Cathartidae (Falconiformes) before Falconidae (Falconiformes)" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should < + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be < @taxon_concepts.index { |tc| tc.full_name == 'Falconidae' } end it "should include Cathartidae (Falconiformes) after Cacatuidae (Psittaciformes)" do - @taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }.should > + expect(@taxon_concepts.index { |tc| tc.full_name == 'Cathartidae' }).to be > @taxon_concepts.index { |tc| tc.full_name == 'Cacatuidae' } end end diff --git a/spec/models/checklist/pdf/history_annotations_key_spec.rb b/spec/models/checklist/pdf/history_annotations_key_spec.rb index c7e017c25e..15d0d94d51 100644 --- a/spec/models/checklist/pdf/history_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/history_annotations_key_spec.rb @@ -6,9 +6,9 @@ describe :annotations_key do subject { Checklist::Pdf::HistoryAnnotationsKey.new } specify { - subject.stub(:non_hash_annotations_key).and_return('x') - subject.stub(:hash_annotations_key).and_return('x') - subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in" + allow(subject).to receive(:non_hash_annotations_key).and_return('x') + allow(subject).to receive(:hash_annotations_key).and_return('x') + expect(subject.annotations_key).to eq("\\newpage\n\\parindent 0in\\cpart{\\historicalSummaryOfAnnotations}\nx\\parindent -0.1in") } end @@ -57,7 +57,7 @@ end subject { Checklist::Pdf::HistoryAnnotationsKey.new } specify { - subject.hash_annotations_key.should == "\\hashAnnotationsHistoryInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP1 & \\validFrom \\hspace{2 pt} 01/07/2012\\\\\n\\#1 & Only trunks \\\\\n\n}\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n" + expect(subject.hash_annotations_key).to eq("\\hashAnnotationsHistoryInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP1 & \\validFrom \\hspace{2 pt} 01/07/2012\\\\\n\\#1 & Only trunks \\\\\n\n}\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n") } end diff --git a/spec/models/checklist/pdf/history_spec.rb b/spec/models/checklist/pdf/history_spec.rb index 722dbc4f56..f01709fc80 100644 --- a/spec/models/checklist/pdf/history_spec.rb +++ b/spec/models/checklist/pdf/history_spec.rb @@ -36,7 +36,7 @@ } subject { Checklist::Pdf::History.new(:scientific_name => tc.full_name, :show_english => true) } specify { - subject.higher_taxon_name(tc.reload).should == "\\subsection*{FOOBARIDAE (E) Foobars }\n" + expect(subject.higher_taxon_name(tc.reload)).to eq("\\subsection*{FOOBARIDAE (E) Foobars }\n") } end end @@ -54,7 +54,7 @@ } subject { Checklist::Pdf::History.new(:scientific_name => tc.full_name) } specify { - subject.listed_taxon_name(tc).should == 'FOOBARIDAE spp.' + expect(subject.listed_taxon_name(tc)).to eq('FOOBARIDAE spp.') } end context "when genus" do @@ -69,7 +69,7 @@ } subject { Checklist::Pdf::History.new(:scientific_name => tc.full_name) } specify { - subject.listed_taxon_name(tc).should == '\emph{Foobarus} spp.' + expect(subject.listed_taxon_name(tc)).to eq('\emph{Foobarus} spp.') } end end @@ -97,7 +97,7 @@ } subject { Checklist::Pdf::History.new({}) } specify { - subject.annotation_for_language(lc, 'en').should == "Except \\textit{Foobarus cracoviensis}\n\nPreviously listed as \\textit{Foobarus polonicus}.\\footnote{...}" + expect(subject.annotation_for_language(lc, 'en')).to eq("Except \\textit{Foobarus cracoviensis}\n\nPreviously listed as \\textit{Foobarus polonicus}.\\footnote{...}") } end end diff --git a/spec/models/checklist/pdf/index_annotations_key_spec.rb b/spec/models/checklist/pdf/index_annotations_key_spec.rb index 1b944817db..c91a65e21e 100644 --- a/spec/models/checklist/pdf/index_annotations_key_spec.rb +++ b/spec/models/checklist/pdf/index_annotations_key_spec.rb @@ -6,9 +6,9 @@ describe :annotations_key do subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - subject.stub(:non_hash_annotations_key).and_return('x') - subject.stub(:hash_annotations_key).and_return('x') - subject.annotations_key.should == "\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in" + allow(subject).to receive(:non_hash_annotations_key).and_return('x') + allow(subject).to receive(:hash_annotations_key).and_return('x') + expect(subject.annotations_key).to eq("\\newpage\n\\parindent 0in\\cpart{\\annotationsKey}\nxx\\parindent -0.1in") } end @@ -44,7 +44,7 @@ end subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - subject.hash_annotations_key.should == "\\newpage\n\\section*{\\hashAnnotations}\n\\hashAnnotationsIndexInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n" + expect(subject.hash_annotations_key).to eq("\\newpage\n\\section*{\\hashAnnotations}\n\\hashAnnotationsIndexInfo\n\n\\hashannotationstable{\n\\rowcolor{pale_aqua}\nCoP2 & \\validFrom \\hspace{2 pt} 01/07/2013\\\\\n\\#1 & Only bark \\\\\n\n}\n") } end @@ -100,8 +100,8 @@ end subject { Checklist::Pdf::IndexAnnotationsKey.new } specify { - LatexToPdf.stub(:html2latex).and_return('x') - subject.non_hash_annotations_key.should == "\\section*{\\nonHashAnnotations}\n\\cfbox{orange}{\\superscript{1} \\textbf{\\textit{Foobarus bizarrus}}}\n\nx\n\n\\cfbox{green}{\\superscript{2} \\textbf{\\textit{Foobaria curiosa}}}\n\nx\n\n" + allow(LatexToPdf).to receive(:html2latex).and_return('x') + expect(subject.non_hash_annotations_key).to eq("\\section*{\\nonHashAnnotations}\n\\cfbox{orange}{\\superscript{1} \\textbf{\\textit{Foobarus bizarrus}}}\n\nx\n\n\\cfbox{green}{\\superscript{2} \\textbf{\\textit{Foobaria curiosa}}}\n\nx\n\n") } end diff --git a/spec/models/checklist/pdf/index_fetcher_spec.rb b/spec/models/checklist/pdf/index_fetcher_spec.rb index df4833250c..d6258bf718 100644 --- a/spec/models/checklist/pdf/index_fetcher_spec.rb +++ b/spec/models/checklist/pdf/index_fetcher_spec.rb @@ -46,7 +46,7 @@ ) } subject { Checklist::Pdf::IndexFetcher.new(query) } - specify { subject.next.first.sort_name.should == 'lolcat, Domestic' } + specify { expect(subject.next.first.sort_name).to eq('lolcat, Domestic') } end context "with synonyms and authors" do let!(:synonym) { @@ -74,6 +74,6 @@ ) } subject { Checklist::Pdf::IndexFetcher.new(query) } - specify { subject.next.first.sort_name.should == 'Catus fluffianus' } + specify { expect(subject.next.first.sort_name).to eq('Catus fluffianus') } end end diff --git a/spec/models/checklist/scientific_name_spec.rb b/spec/models/checklist/scientific_name_spec.rb index 74f9fdb851..bfa453bbe9 100644 --- a/spec/models/checklist/scientific_name_spec.rb +++ b/spec/models/checklist/scientific_name_spec.rb @@ -13,8 +13,8 @@ checklist.results } specify { - subject.first.full_name.should == @species2.full_name - subject.size.should == 1 + expect(subject.first.full_name).to eq(@species2.full_name) + expect(subject.size).to eq(1) } end context "by common name" do @@ -26,8 +26,8 @@ checklist.results } specify { - subject.first.full_name.should == @species2.full_name - subject.size.should == 1 + expect(subject.first.full_name).to eq(@species2.full_name) + expect(subject.size).to eq(1) } end end diff --git a/spec/models/checklist/synonyms_spec.rb b/spec/models/checklist/synonyms_spec.rb index ab166566db..efb2eb3642 100644 --- a/spec/models/checklist/synonyms_spec.rb +++ b/spec/models/checklist/synonyms_spec.rb @@ -14,7 +14,7 @@ it "should return Alligator cynocephalus as synonym for Caiman latirostris" do @caiman_latirostris = @taxon_concepts.select { |e| e.full_name == @species.full_name }.first - @caiman_latirostris.synonyms.should == ['Alligator cynocephalus'] + expect(@caiman_latirostris.synonyms).to eq(['Alligator cynocephalus']) end end diff --git a/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb b/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb index 5c0a26aa08..21bb9ee482 100644 --- a/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb +++ b/spec/models/checklist/taxon_concept_prefix_matcher_spec.rb @@ -10,7 +10,7 @@ :ranks => [] }) } - specify { subject.results.size.should == 3 } + specify { expect(subject.results.size).to eq(3) } end context "when match on accepted name" do subject { @@ -19,7 +19,7 @@ :ranks => [] }) } - specify { subject.results.size.should == 3 } + specify { expect(subject.results.size).to eq(3) } end context "when match on synonym" do subject { @@ -28,7 +28,7 @@ :ranks => [] }) } - specify { subject.results.size.should == 2 } + specify { expect(subject.results.size).to eq(2) } end context "when match on common name" do subject { @@ -37,7 +37,7 @@ :ranks => [] }) } - specify { subject.results.size.should == 1 } + specify { expect(subject.results.size).to eq(1) } end end end diff --git a/spec/models/checklist/timeline_spec.rb b/spec/models/checklist/timeline_spec.rb index 8e2d1e1af0..29fce8fd95 100644 --- a/spec/models/checklist/timeline_spec.rb +++ b/spec/models/checklist/timeline_spec.rb @@ -20,9 +20,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.first } - specify { subject.timeline_intervals.count.should == 1 } - specify { subject.timeline_intervals.last.end_pos.should < 1 } - specify { subject.timeline_events.count.should == 2 } + specify { expect(subject.timeline_intervals.count).to eq(1) } + specify { expect(subject.timeline_intervals.last.end_pos).to be < 1 } + specify { expect(subject.timeline_events.count).to eq(2) } end context "when deleted from III multiple times" do @@ -80,9 +80,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.last } - specify { subject.timeline_intervals.count.should == 3 } - specify { subject.timeline_intervals.last.end_pos.should < 1 } - specify { subject.timeline_events.count.should == 4 } + specify { expect(subject.timeline_intervals.count).to eq(3) } + specify { expect(subject.timeline_intervals.last.end_pos).to be < 1 } + specify { expect(subject.timeline_events.count).to eq(4) } end context "when deleted and then readded" do @@ -109,9 +109,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.first } - specify { subject.timeline_intervals.count.should == 2 } - specify { subject.timeline_events.count.should == 3 } - specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_intervals[1].start_pos } + specify { expect(subject.timeline_intervals.count).to eq(2) } + specify { expect(subject.timeline_events.count).to eq(3) } + specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_intervals[1].start_pos) } end context "when reservation withdrawn" do @@ -151,9 +151,9 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.first.timelines.first } - specify { subject.timeline_intervals.count.should == 1 } - specify { subject.timeline_events.count.should == 2 } - specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_events[1].pos } + specify { expect(subject.timeline_intervals.count).to eq(1) } + specify { expect(subject.timeline_events.count).to eq(2) } + specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_events[1].pos) } end context "when reservation withdrawn and then readded" do @@ -199,10 +199,10 @@ let(:ttc) { Checklist::TimelinesForTaxonConcept.new(tc) } let(:subject) { ttc.timelines.last.timelines.first } - specify { subject.timeline_intervals.count.should == 2 } - specify { subject.timeline_events.count.should == 3 } - specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_events[1].pos } - specify { subject.timeline_intervals[1].end_pos.should == 1 } + specify { expect(subject.timeline_intervals.count).to eq(2) } + specify { expect(subject.timeline_events.count).to eq(3) } + specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_events[1].pos) } + specify { expect(subject.timeline_intervals[1].end_pos).to eq(1) } end context "when added multiple times" do @@ -225,11 +225,12 @@ let(:subject) { ttc.timelines.first } specify { - subject.timeline_events.map(&:change_type_name).should == + expect(subject.timeline_events.map(&:change_type_name)).to eq( ['ADDITION', 'AMENDMENT'] + ) } - specify { subject.timeline_intervals.count.should == 2 } - specify { subject.timeline_intervals[1].end_pos.should == 1 } + specify { expect(subject.timeline_intervals.count).to eq(2) } + specify { expect(subject.timeline_intervals[1].end_pos).to eq(1) } end context "when automatic deletion from ancestor listing" do @@ -254,11 +255,12 @@ let(:subject) { ttc.timelines.first } specify { - subject.timeline_events.map(&:change_type_name).should == + expect(subject.timeline_events.map(&:change_type_name)).to eq( ['ADDITION', 'DELETION'] + ) } - specify { subject.timeline_intervals.count.should == 1 } - specify { subject.timeline_intervals[0].end_pos.should == subject.timeline_events[1].pos } + specify { expect(subject.timeline_intervals.count).to eq(1) } + specify { expect(subject.timeline_intervals[0].end_pos).to eq(subject.timeline_events[1].pos) } end end diff --git a/spec/models/checklist/timelines_for_taxon_concept_spec.rb b/spec/models/checklist/timelines_for_taxon_concept_spec.rb index dee5ddb570..1234af3c6e 100644 --- a/spec/models/checklist/timelines_for_taxon_concept_spec.rb +++ b/spec/models/checklist/timelines_for_taxon_concept_spec.rb @@ -22,8 +22,8 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc) } - specify { subject.raw_timelines['I'].timeline_events.should_not be_empty } - specify { subject.raw_timelines['II'].timeline_events.should be_empty } + specify { expect(subject.raw_timelines['I'].timeline_events).not_to be_empty } + specify { expect(subject.raw_timelines['II'].timeline_events).to be_empty } end context "when Appendix III" do let(:tc) { @@ -43,8 +43,8 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc) } - specify { subject.raw_timelines['III'].timeline_events.should_not be_empty } - specify { subject.raw_timelines['I'].timeline_events.should be_empty } + specify { expect(subject.raw_timelines['III'].timeline_events).not_to be_empty } + specify { expect(subject.raw_timelines['I'].timeline_events).to be_empty } end context "when Appendix III reservation" do let(:tc) { @@ -64,9 +64,9 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc) } - specify { subject.raw_timelines['III'].timeline_events.should be_empty } - specify { subject.raw_timelines['III'].timelines.first.timeline_events.should_not be_empty } - specify { subject.raw_timelines['I'].timeline_events.should be_empty } + specify { expect(subject.raw_timelines['III'].timeline_events).to be_empty } + specify { expect(subject.raw_timelines['III'].timelines.first.timeline_events).not_to be_empty } + specify { expect(subject.raw_timelines['I'].timeline_events).to be_empty } end end @@ -78,9 +78,9 @@ MTaxonConcept.find(tc.id) } subject { Checklist::TimelinesForTaxonConcept.new(tc).timeline_years } - specify { subject.size.should == 5 } - specify { subject.first.year.should == 1975 } - specify { subject.last.year.should == 1995 } + specify { expect(subject.size).to eq(5) } + specify { expect(subject.first.year).to eq(1975) } + specify { expect(subject.last.year).to eq(1995) } end end diff --git a/spec/models/cites_cop_spec.rb b/spec/models/cites_cop_spec.rb index f0c10f5a36..268330a4ec 100644 --- a/spec/models/cites_cop_spec.rb +++ b/spec/models/cites_cop_spec.rb @@ -34,8 +34,8 @@ :designation => eu ) } - specify { cites_cop.should be_invalid } - specify { cites_cop.should have(1).error_on(:designation_id) } + specify { expect(cites_cop).to be_invalid } + specify { expect(cites_cop).to have(1).error_on(:designation_id) } end context "when effective_at is blank" do let(:cites_cop) { @@ -44,20 +44,20 @@ :effective_at => nil ) } - specify { cites_cop.should be_invalid } - specify { cites_cop.should have(1).error_on(:effective_at) } + specify { expect(cites_cop).to be_invalid } + specify { expect(cites_cop).to have(1).error_on(:effective_at) } end end describe :destroy do let(:cites_cop) { create_cites_cop } context "when no dependent objects attached" do - specify { cites_cop.destroy.should be_truthy } + specify { expect(cites_cop.destroy).to be_truthy } end context "when dependent objects attached" do context "when listing changes" do let!(:listing_change) { create_cites_I_addition(:event => cites_cop) } - specify { cites_cop.destroy.should be_falsey } + specify { expect(cites_cop.destroy).to be_falsey } end end end diff --git a/spec/models/cites_suspension_notification_spec.rb b/spec/models/cites_suspension_notification_spec.rb index 6b39650c88..ad0720ead7 100644 --- a/spec/models/cites_suspension_notification_spec.rb +++ b/spec/models/cites_suspension_notification_spec.rb @@ -34,8 +34,8 @@ :designation => eu ) } - specify { cites_suspension_notification.should be_invalid } - specify { cites_suspension_notification.should have(1).error_on(:designation_id) } + specify { expect(cites_suspension_notification).to be_invalid } + specify { expect(cites_suspension_notification).to have(1).error_on(:designation_id) } end context "when effective_at is blank" do let(:cites_suspension_notification) { @@ -44,15 +44,15 @@ :effective_at => nil ) } - specify { cites_suspension_notification.should be_invalid } - specify { cites_suspension_notification.should have(1).error_on(:effective_at) } + specify { expect(cites_suspension_notification).to be_invalid } + specify { expect(cites_suspension_notification).to have(1).error_on(:effective_at) } end end describe :destroy do let(:cites_suspension_notification) { create_cites_suspension_notification } context "when no dependent objects attached" do - specify { cites_suspension_notification.destroy.should be_truthy } + specify { expect(cites_suspension_notification.destroy).to be_truthy } end context "when dependent objects attached" do context "when start notification" do @@ -61,7 +61,7 @@ :cites_suspension, :start_notification => cites_suspension_notification ) } - specify { cites_suspension_notification.destroy.should be_falsey } + specify { expect(cites_suspension_notification.destroy).to be_falsey } end context "when end notification" do let!(:cites_suspension) { @@ -71,7 +71,7 @@ :end_notification => cites_suspension_notification ) } - specify { cites_suspension_notification.destroy.should be_falsey } + specify { expect(cites_suspension_notification.destroy).to be_falsey } end context "when confirmation notification, make sure it gets destroyed" do let!(:cites_suspension) { @@ -95,7 +95,7 @@ subject { cites_suspension_notification.cites_suspension_confirmations } specify { cites_suspension_notification.destroy - subject.reload.should be_empty + expect(subject.reload).to be_empty } end end @@ -103,7 +103,7 @@ describe :end_date_formatted do let(:cites_suspension_notification) { create_cites_suspension_notification(:end_date => '2012-05-10') } - specify { cites_suspension_notification.end_date_formatted.should == '10/05/2012' } + specify { expect(cites_suspension_notification.end_date_formatted).to eq('10/05/2012') } end describe :bases_for_suspension do diff --git a/spec/models/cites_suspension_spec.rb b/spec/models/cites_suspension_spec.rb index 1708bef946..15c877da2c 100644 --- a/spec/models/cites_suspension_spec.rb +++ b/spec/models/cites_suspension_spec.rb @@ -207,8 +207,8 @@ ) } - specify { cites_suspension.should be_invalid } - specify { cites_suspension.should have(1).error_on(:start_notification_id) } + specify { expect(cites_suspension).to be_invalid } + specify { expect(cites_suspension.error_on(:start_notification_id).size).to eq(1) } end context "when start date greater than end date" do @@ -221,8 +221,8 @@ ) } - specify { cites_suspension.should be_invalid } - specify { cites_suspension.should have(1).error_on(:start_date) } + specify { expect(cites_suspension).to be_invalid } + specify { expect(cites_suspension.error_on(:start_date).size).to eq(1) } end context "when valid" do @@ -234,7 +234,7 @@ ) } - specify { cites_suspension.should be_valid } + specify { expect(cites_suspension).to be_valid } end end end @@ -252,7 +252,7 @@ CitesSuspension.export('set' => 'current') end subject { Dir["#{DownloadsCache.cites_suspensions_path}/*"] } - specify { subject.should_not be_empty } + specify { expect(subject).not_to be_empty } end end @@ -271,7 +271,7 @@ CitesSuspension.export('set' => 'current') end subject { Dir["#{DownloadsCache.cites_suspensions_path}/*"] } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end end diff --git a/spec/models/common_name_spec.rb b/spec/models/common_name_spec.rb index 90d06c118d..ad5e3d6835 100644 --- a/spec/models/common_name_spec.rb +++ b/spec/models/common_name_spec.rb @@ -17,13 +17,13 @@ context "Generating PDF" do describe :english_to_pdf do it "should print last word before the first word, separated by comma" do - CommonName.english_to_pdf("Grey Wolf").should == "Wolf, Grey" + expect(CommonName.english_to_pdf("Grey Wolf")).to eq("Wolf, Grey") end it "should print the last word before the other words, separated by comma" do - CommonName.english_to_pdf("Northern Rock Mountain Wolf").should == "Wolf, Northern Rock Mountain" + expect(CommonName.english_to_pdf("Northern Rock Mountain Wolf")).to eq("Wolf, Northern Rock Mountain") end it "should print the single word, if the common name is composed of only one word" do - CommonName.english_to_pdf("Wolf").should == "Wolf" + expect(CommonName.english_to_pdf("Wolf")).to eq("Wolf") end end end diff --git a/spec/models/dashboard_stats_species_spec.rb b/spec/models/dashboard_stats_species_spec.rb index a9f839d3dd..d6f3efea87 100644 --- a/spec/models/dashboard_stats_species_spec.rb +++ b/spec/models/dashboard_stats_species_spec.rb @@ -26,17 +26,17 @@ describe "#new" do it "takes three parameters and returns a DashboardStats object" do - ds_ar.should be_an_instance_of DashboardStats + expect(ds_ar).to be_an_instance_of DashboardStats end end describe "#species" do include_context "Caiman latirostris" it "has one results for argentina" do - ds_ar.species[:cites_eu][0][:count].should eq 1 + expect(ds_ar.species[:cites_eu][0][:count]).to eq 1 end it "has no results for ghana" do - ds_gh.species[:cites_eu][0][:count].should eq 0 + expect(ds_gh.species[:cites_eu][0][:count]).to eq 0 end end diff --git a/spec/models/dashboard_stats_trade_spec.rb b/spec/models/dashboard_stats_trade_spec.rb index 7deec6b0a4..71e25e1eff 100644 --- a/spec/models/dashboard_stats_trade_spec.rb +++ b/spec/models/dashboard_stats_trade_spec.rb @@ -44,9 +44,9 @@ }).trade } it "argentina should have 40 exported animals and no imports" do - subject[:exports][:top_traded].length.should == 1 - subject[:exports][:top_traded][0][:count].should eq 40 - subject[:imports][:top_traded].length.should eq 0 + expect(subject[:exports][:top_traded].length).to eq(1) + expect(subject[:exports][:top_traded][0][:count]).to eq 40 + expect(subject[:imports][:top_traded].length).to eq 0 end end context "when time range specified" do @@ -58,7 +58,7 @@ }).trade } it "argentina should have no exports in 2012-2012" do - subject[:exports][:top_traded].length.should == 0 + expect(subject[:exports][:top_traded].length).to eq(0) end end end diff --git a/spec/models/designation_spec.rb b/spec/models/designation_spec.rb index c487750f2e..2c881229e7 100644 --- a/spec/models/designation_spec.rb +++ b/spec/models/designation_spec.rb @@ -15,60 +15,60 @@ describe :create do context "when valid" do let(:designation) { build(:designation, :name => 'GALACTIC REGULATIONS') } - specify { designation.should be_valid } + specify { expect(designation).to be_valid } end context "when name missing" do let(:designation) { build(:designation, :name => nil) } - specify { designation.should be_invalid } - specify { designation.should have(1).error_on(:name) } + specify { expect(designation).to be_invalid } + specify { expect(designation).to have(1).error_on(:name) } end context "when name duplicated" do let!(:designation1) { create(:designation) } let(:designation2) { build(:designation, :name => designation1.name) } - specify { designation2.should be_invalid } - specify { designation2.should have(1).error_on(:name) } + specify { expect(designation2).to be_invalid } + specify { expect(designation2).to have(1).error_on(:name) } end end describe :update do context "when updating a non-protected name" do let(:designation) { create(:designation) } specify { - designation.update_attributes( + expect(designation.update_attributes( { :name => 'RULES OF INTERGALACTIC TRADE' } - ).should be_truthy + )).to be_truthy } end context "when updating a protected name" do specify { - cites.update_attributes( + expect(cites.update_attributes( { :name => 'RULES OF INTERGALACTIC TRADE' } - ).should be_falsey + )).to be_falsey } end context "when updating taxonomy with no dependent objects attached" do let(:designation) { create(:designation) } let(:taxonomy) { create(:taxonomy) } - specify { designation.update_attributes(:taxonomy_id => taxonomy.id).should be_truthy } + specify { expect(designation.update_attributes(:taxonomy_id => taxonomy.id)).to be_truthy } end context "when updating taxonomy with dependent objects attached" do let(:designation) { create(:designation) } let!(:change_type) { create(:change_type, :designation => designation) } let(:taxonomy) { create(:taxonomy) } - specify { designation.update_attributes(:taxonomy_id => taxonomy.id).should be_falsey } + specify { expect(designation.update_attributes(:taxonomy_id => taxonomy.id)).to be_falsey } end end describe :destroy do context "when no dependent objects attached" do let(:designation) { create(:designation, :name => 'GALACTIC REGULATIONS') } - specify { designation.destroy.should be_truthy } + specify { expect(designation.destroy).to be_truthy } end context "when dependent objects attached" do let(:designation) { create(:designation, :name => 'GALACTIC REGULATIONS') } let!(:change_type) { create(:change_type, :designation => designation) } - specify { designation.destroy.should be_falsey } + specify { expect(designation.destroy).to be_falsey } end context "when protected name" do - specify { cites.destroy.should be_falsey } + specify { expect(cites.destroy).to be_falsey } end end end diff --git a/spec/models/eu_decision_spec.rb b/spec/models/eu_decision_spec.rb index 3d8e7f4f0a..c4e642d55b 100644 --- a/spec/models/eu_decision_spec.rb +++ b/spec/models/eu_decision_spec.rb @@ -65,7 +65,7 @@ Species::EuDecisionsExport.new(set: 'current', decision_types: {}).export end subject { Dir["#{DownloadsCache.eu_decisions_path}/*"] } - specify { subject.should_not be_empty } + specify { expect(subject).not_to be_empty } end end @@ -74,7 +74,7 @@ let(:eu_decision) { build(:eu_decision, srg_history_id: nil, eu_decision_type_id: nil) } subject { eu_decision.save } - specify { subject.should be_falsey } + specify { expect(subject).to be_falsey } it 'should have an error message' do subject @@ -85,19 +85,19 @@ context 'Eu decision creates correctly if only Eu decision type is populated' do let(:eu_decision) { build(:eu_decision) } - specify { subject.should be_truthy } + specify { expect(subject).to be_truthy } end context 'Eu decision creates correctly if only SRG history is populated' do let(:eu_decision) { build(:eu_decision, eu_decision_type: nil, srg_history: create(:srg_history)) } - specify { subject.should be_truthy } + specify { expect(subject).to be_truthy } end context 'Eu decision creates correctly if both Eu decision type and SRG history are populated' do let(:eu_decision) { build(:eu_decision, srg_history: create(:srg_history)) } - specify { subject.should be_truthy } + specify { expect(subject).to be_truthy } end end @@ -111,7 +111,7 @@ Species::EuDecisionsExport.new(set: 'current', decision_types: {}).export end subject { Dir["#{DownloadsCache.eu_decisions_path}/*"] } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end end diff --git a/spec/models/eu_opinion_spec.rb b/spec/models/eu_opinion_spec.rb index 0252f1cbbb..52d277bf76 100644 --- a/spec/models/eu_opinion_spec.rb +++ b/spec/models/eu_opinion_spec.rb @@ -38,8 +38,8 @@ ) } - specify { eu_opinion.should be_invalid } - specify { eu_opinion.should have(1).error_on(:taxon_concept) } + specify { expect(eu_opinion).to be_invalid } + specify { expect(eu_opinion).to have(1).error_on(:taxon_concept) } end context "when geo_entity missing" do @@ -49,8 +49,8 @@ ) } - specify { eu_opinion.should be_invalid } - specify { eu_opinion.should have(1).error_on(:geo_entity) } + specify { expect(eu_opinion).to be_invalid } + specify { expect(eu_opinion.error_on(:geo_entity).size).to eq(1) } end context "when start_date missing" do @@ -58,8 +58,8 @@ build(:eu_opinion, start_date: nil) } - specify { eu_opinion.should be_invalid } - specify { eu_opinion.should have(1).error_on(:start_date) } + specify { expect(eu_opinion).to be_invalid } + specify { expect(eu_opinion.error_on(:start_date).size).to eq(1) } end context "when valid" do @@ -68,7 +68,7 @@ end let(:eu_opinion) { build(:eu_opinion, start_event: @eu_regulation) } - specify { eu_opinion.should be_valid } + specify { expect(eu_opinion).to be_valid } end end diff --git a/spec/models/eu_regulation_spec.rb b/spec/models/eu_regulation_spec.rb index 2089a212b8..c2333a351a 100644 --- a/spec/models/eu_regulation_spec.rb +++ b/spec/models/eu_regulation_spec.rb @@ -33,7 +33,7 @@ EventListingChangesCopyWorker.jobs.clear create_eu_regulation(:listing_changes_event_id => eu_regulation1.id) end - specify { EventListingChangesCopyWorker.jobs.size.should == 1 } + specify { expect(EventListingChangesCopyWorker.jobs.size).to eq(1) } end context "when designation invalid" do let(:eu_regulation) { @@ -42,8 +42,8 @@ :designation => cites ) } - specify { eu_regulation.should be_invalid } - specify { eu_regulation.should have(1).error_on(:designation_id) } + specify { expect(eu_regulation).to be_invalid } + specify { expect(eu_regulation).to have(1).error_on(:designation_id) } end context "when effective_at is blank" do let(:eu_regulation) { @@ -52,8 +52,8 @@ :effective_at => nil ) } - specify { eu_regulation.should be_invalid } - specify { eu_regulation.should have(1).error_on(:effective_at) } + specify { expect(eu_regulation).to be_invalid } + specify { expect(eu_regulation).to have(1).error_on(:effective_at) } end end describe :activate do @@ -62,8 +62,8 @@ EuRegulationActivationWorker.jobs.clear eu_regulation.activate! end - specify { eu_regulation.is_current.should be_truthy } - specify { EuRegulationActivationWorker.jobs.size.should == 1 } + specify { expect(eu_regulation.is_current).to be_truthy } + specify { expect(EuRegulationActivationWorker.jobs.size).to eq(1) } end describe :deactivate do @@ -72,19 +72,19 @@ EuRegulationActivationWorker.jobs.clear eu_regulation.deactivate! end - specify { eu_regulation.is_current.should be_falsey } - specify { EuRegulationActivationWorker.jobs.size.should == 1 } + specify { expect(eu_regulation.is_current).to be_falsey } + specify { expect(EuRegulationActivationWorker.jobs.size).to eq(1) } end describe :destroy do let(:eu_regulation) { create_eu_regulation } context "when no dependent objects attached" do - specify { eu_regulation.destroy.should be_truthy } + specify { expect(eu_regulation.destroy).to be_truthy } end context "when dependent objects attached" do context "when listing changes" do let!(:listing_change) { create_eu_A_addition(:event => eu_regulation) } - specify { eu_regulation.destroy.should be_truthy } + specify { expect(eu_regulation.destroy).to be_truthy } end end end diff --git a/spec/models/eu_suspension_spec.rb b/spec/models/eu_suspension_spec.rb index 16efb64833..cf276679cc 100644 --- a/spec/models/eu_suspension_spec.rb +++ b/spec/models/eu_suspension_spec.rb @@ -38,8 +38,8 @@ ) } - specify { eu_suspension.should be_invalid } - specify { eu_suspension.should have(1).error_on(:taxon_concept) } + specify { expect(eu_suspension).to be_invalid } + specify { expect(eu_suspension).to have(1).error_on(:taxon_concept) } end context "when geo_entity missing" do @@ -50,14 +50,14 @@ ) } - specify { eu_suspension.should be_invalid } - specify { eu_suspension.should have(1).error_on(:geo_entity) } + specify { expect(eu_suspension).to be_invalid } + specify { expect(eu_suspension.error_on(:geo_entity).size).to eq(1) } end context "when valid" do let(:eu_suspension) { build(:eu_suspension) } - specify { eu_suspension.should be_valid } + specify { expect(eu_suspension).to be_valid } end end @@ -67,7 +67,7 @@ create(:eu_suspension, start_event: nil, end_event: nil) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when start_event is set but date is in the future" do @@ -78,7 +78,7 @@ create(:eu_suspension, start_event: start_event, end_event: nil) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when start_event is set but is not current" do @@ -89,7 +89,7 @@ create(:eu_suspension, start_event: start_event, end_event: nil) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when start_event is set but date is in past or present" do @@ -107,8 +107,8 @@ create(:eu_suspension, start_event: start_event2, end_event: nil) } - specify { eu_suspension.is_current.should be_truthy } - specify { eu_suspension2.is_current.should be_truthy } + specify { expect(eu_suspension.is_current).to be_truthy } + specify { expect(eu_suspension2.is_current).to be_truthy } end context "when end_event is set, but no start_event is set" do @@ -119,7 +119,7 @@ create(:eu_suspension, start_event: nil, end_event: end_event) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when end_event is set, and start_event is set with date in future" do @@ -133,7 +133,7 @@ create(:eu_suspension, start_event: start_event, end_event: end_event) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end context "when start_event is set, and end_event is set with date in the future" do @@ -147,7 +147,7 @@ create(:eu_suspension, start_event: start_event, end_event: end_event) } - specify { eu_suspension.is_current.should be_truthy } + specify { expect(eu_suspension.is_current).to be_truthy } end context "when start_event is set, and end_event is set with date in the past" do @@ -161,7 +161,7 @@ create(:eu_suspension, start_event: start_event, end_event: end_event) } - specify { eu_suspension.is_current.should be_falsey } + specify { expect(eu_suspension.is_current).to be_falsey } end end @@ -170,7 +170,7 @@ let(:eu_suspension) { create(:eu_suspension, start_event: nil) } - specify { eu_suspension.start_date_formatted.should be_empty } + specify { expect(eu_suspension.start_date_formatted).to be_empty } end context "when there's start_event" do @@ -180,7 +180,7 @@ let(:start_event) { create(:event, effective_at: 2.day.ago) } - specify { eu_suspension.start_date_formatted.should == 2.day.ago.strftime("%d/%m/%Y") } + specify { expect(eu_suspension.start_date_formatted).to eq(2.day.ago.strftime("%d/%m/%Y")) } end end @@ -189,7 +189,7 @@ let(:eu_suspension) { create(:eu_suspension, end_event: nil) } - specify { eu_suspension.end_date_formatted.should be_empty } + specify { expect(eu_suspension.end_date_formatted).to be_empty } end context "when there's end_event" do @@ -199,7 +199,7 @@ let(:end_event) { create(:event, effective_at: 2.day.ago) } - specify { eu_suspension.end_date_formatted.should == 2.day.ago.strftime("%d/%m/%Y") } + specify { expect(eu_suspension.end_date_formatted).to eq(2.day.ago.strftime("%d/%m/%Y")) } end end end diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 38cb35a8a8..56b51ee31d 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -29,28 +29,28 @@ describe :create do context "when valid" do let(:event) { build(:event, :name => 'CoPX') } - specify { event.should be_valid } + specify { expect(event).to be_valid } end context "when name missing" do let(:event) { build(:event, :name => nil) } - specify { event.should be_invalid } - specify { event.should have(1).error_on(:name) } + specify { expect(event).to be_invalid } + specify { expect(event).to have(1).error_on(:name) } end context "when name duplicated" do let!(:event1) { create(:event) } let(:event2) { build(:event, :name => event1.name) } - specify { event2.should be_invalid } - specify { event2.should have(1).error_on(:name) } + specify { expect(event2).to be_invalid } + specify { expect(event2).to have(1).error_on(:name) } end context "when url invalid" do let(:event) { build(:event, :url => 'www.google.com') } - specify { event.should be_invalid } - specify { event.should have(1).error_on(:url) } + specify { expect(event).to be_invalid } + specify { expect(event).to have(1).error_on(:url) } end end describe :effective_at_formatted do let(:event) { create(:event, :effective_at => '2012-05-10') } - specify { event.effective_at_formatted.should == '10/05/2012' } + specify { expect(event.effective_at_formatted).to eq('10/05/2012') } end end diff --git a/spec/models/geo_entity_spec.rb b/spec/models/geo_entity_spec.rb index c46d596d9a..2b7621b964 100644 --- a/spec/models/geo_entity_spec.rb +++ b/spec/models/geo_entity_spec.rb @@ -61,31 +61,31 @@ ) } subject { GeoEntity.nodes_and_descendants([europe.id]) } - specify { subject.map(&:id).should include(europe.id, poland.id, wolin.id) } - specify { subject.size.should == 3 } + specify { expect(subject.map(&:id)).to include(europe.id, poland.id, wolin.id) } + specify { expect(subject.size).to eq(3) } end end describe :destroy do let(:geo_entity) { create(:geo_entity) } context "when no dependent objects attached" do - specify { geo_entity.destroy.should be_truthy } + specify { expect(geo_entity.destroy).to be_truthy } end context "when dependent objects attached" do context "when distributions" do before(:each) { create(:distribution, :geo_entity => geo_entity) } - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end context "when exported shipments" do before(:each) { create(:shipment, :exporter => geo_entity) } - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end context "when imported shipments" do before(:each) { create(:shipment, :importer => geo_entity) } - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end context "when originated shipments" do before(:each) { create(:shipment, :country_of_origin => geo_entity) } - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end context "when connected geo entities" do let(:child_geo_entity) { create(:geo_entity) } @@ -97,7 +97,7 @@ :related_geo_entity => child_geo_entity ) end - specify { geo_entity.destroy.should be_falsey } + specify { expect(geo_entity.destroy).to be_falsey } end end end diff --git a/spec/models/html_to_latex_spec.rb b/spec/models/html_to_latex_spec.rb index 0ac8da7bd9..5595d79099 100644 --- a/spec/models/html_to_latex_spec.rb +++ b/spec/models/html_to_latex_spec.rb @@ -7,13 +7,13 @@ context "when tag closed" do let(:input_str) { "Text about Foobarus lolus and friends" } specify { - subject.should == "Text about \\textit{Foobarus lolus} and friends" + expect(subject).to eq("Text about \\textit{Foobarus lolus} and friends") } end context "when tag not closed" do let(:input_str) { "Text about Foobarus lolus and friends" } specify { - subject.should == "Text about \\textit{Foobarus lolus and friends}" + expect(subject).to eq("Text about \\textit{Foobarus lolus and friends}") } end end @@ -21,24 +21,24 @@ context "when tag closed" do let(:input_str) { "Text,

paragraph

and some more text" } specify { - subject.should == "Text, \\newline paragraph\\newline and some more text" + expect(subject).to eq("Text, \\newline paragraph\\newline and some more text") } end context "when tag not closed" do let(:input_str) { "Text,

paragraph and some more text" } specify { - subject.should == "Text, \\newline paragraph and some more text" + expect(subject).to eq("Text, \\newline paragraph and some more text") } end end context "when latex special characters" do context "within tags" do let(:input_str) { "Lolus & friends" } - specify { subject.should == "\\textbf{Lolus \\& friends}" } + specify { expect(subject).to eq("\\textbf{Lolus \\& friends}") } end context "outside of tags" do let(:input_str) { "Lolus & friends" } - specify { subject.should == "\\textbf{Lolus} \\& friends" } + specify { expect(subject).to eq("\\textbf{Lolus} \\& friends") } end end end diff --git a/spec/models/hybrid_relationship_spec.rb b/spec/models/hybrid_relationship_spec.rb index 34177dd663..9bf648bb22 100644 --- a/spec/models/hybrid_relationship_spec.rb +++ b/spec/models/hybrid_relationship_spec.rb @@ -52,15 +52,15 @@ } specify { hybrid_rel.save - tc.hybrids.map(&:full_name).should include('Lolcatus lolatus x lolcatus') + expect(tc.hybrids.map(&:full_name)).to include('Lolcatus lolatus x lolcatus') } specify { hybrid_rel.save another_hybrid_rel.save hybrid_rel.other_taxon_concept = another_hybrid hybrid_rel.save - tc.hybrids.map(&:full_name).should include('Lolcatus lolcatus x ?') - another_tc.hybrids.map(&:full_name).should include('Lolcatus lolatus x lolcatus') + expect(tc.hybrids.map(&:full_name)).to include('Lolcatus lolcatus x ?') + expect(another_tc.hybrids.map(&:full_name)).to include('Lolcatus lolatus x lolcatus') } end end diff --git a/spec/models/listing_change_spec.rb b/spec/models/listing_change_spec.rb index 475b741032..3c9b394bee 100644 --- a/spec/models/listing_change_spec.rb +++ b/spec/models/listing_change_spec.rb @@ -44,7 +44,7 @@ excluded_taxon_concepts_ids: "#{excluded_taxon_concept.id}" ) } - specify { listing_change.should be_valid } + specify { expect(listing_change).to be_valid } end context "inclusion taxon concept is lower rank" do let(:inclusion) { create_cites_eu_subspecies } @@ -56,7 +56,7 @@ inclusion_taxon_concept_id: inclusion.id ) } - specify { listing_change.should have(1).error_on(:inclusion_taxon_concept_id) } + specify { expect(listing_change.error_on(:inclusion_taxon_concept_id).size).to eq(1) } end context "species listing designation mismatch" do let(:designation1) { create(:designation) } @@ -68,7 +68,7 @@ :change_type => create(:change_type, :designation => designation2) ) } - specify { listing_change.should have(1).error_on(:species_listing_id) } + specify { expect(listing_change.error_on(:species_listing_id).size).to eq(1) } end context "event designation mismatch" do let(:designation1) { create(:designation) } @@ -80,13 +80,13 @@ :change_type => create(:change_type, :designation => designation2) ) } - specify { listing_change.should have(1).error_on(:event_id) } + specify { expect(listing_change.error_on(:event_id).size).to eq(1) } end end end describe :effective_at_formatted do let(:listing_change) { create_cites_I_addition(:effective_at => '2012-05-10') } - specify { listing_change.effective_at_formatted.should == '10/05/2012' } + specify { expect(listing_change.effective_at_formatted).to eq('10/05/2012') } end describe :duplicates do diff --git a/spec/models/nomenclature_change/lump_spec.rb b/spec/models/nomenclature_change/lump_spec.rb index 7f15942a8e..c256a9f92f 100644 --- a/spec/models/nomenclature_change/lump_spec.rb +++ b/spec/models/nomenclature_change/lump_spec.rb @@ -58,7 +58,7 @@ :inputs_attributes => { 0 => { :taxon_concept_id => create_cites_eu_subspecies.id } } ) } - specify { expect(lump).to have(1).errors_on(:inputs) } + specify { expect(lump.errors_on(:inputs).size).to eq(1) } end end end diff --git a/spec/models/nomenclature_change/output_spec.rb b/spec/models/nomenclature_change/output_spec.rb index 5a218ecc85..ebb6de305f 100644 --- a/spec/models/nomenclature_change/output_spec.rb +++ b/spec/models/nomenclature_change/output_spec.rb @@ -66,7 +66,7 @@ :new_name_status => 'A' ) } - specify { expect(output).to have(1).error_on(:new_parent_id) } + specify { expect(output.error_on(:new_parent_id).size).to eq(1) } end context "when taxon concept specified" do let(:tc) { create_cites_eu_species } diff --git a/spec/models/nomenclature_change/split_spec.rb b/spec/models/nomenclature_change/split_spec.rb index 81249a0cab..cc26a8908c 100644 --- a/spec/models/nomenclature_change/split_spec.rb +++ b/spec/models/nomenclature_change/split_spec.rb @@ -69,7 +69,7 @@ } ) } - specify { expect(split).to have(1).errors_on(:outputs) } + specify { expect(split.errors_on(:outputs).size).to eq(1) } end end end diff --git a/spec/models/nomenclature_change/status_to_accepted_spec.rb b/spec/models/nomenclature_change/status_to_accepted_spec.rb index 5f6c0c28de..f54b493877 100644 --- a/spec/models/nomenclature_change/status_to_accepted_spec.rb +++ b/spec/models/nomenclature_change/status_to_accepted_spec.rb @@ -47,7 +47,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change).to have(1).error_on(:primary_output) } + specify { expect(status_change.error_on(:primary_output).size).to eq(1) } end end context "when primary output has valid name status" do @@ -61,7 +61,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change).to have(0).errors_on(:primary_output) } + specify { expect(status_change.errors_on(:primary_output).size).to eq(0) } end end end diff --git a/spec/models/nomenclature_change/status_to_synonym_spec.rb b/spec/models/nomenclature_change/status_to_synonym_spec.rb index 560a317859..6166675cf4 100644 --- a/spec/models/nomenclature_change/status_to_synonym_spec.rb +++ b/spec/models/nomenclature_change/status_to_synonym_spec.rb @@ -47,7 +47,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change).to have(1).error_on(:primary_output) } + specify { expect(status_change.error_on(:primary_output).size).to eq(1) } end end context "when primary output has valid name status" do @@ -61,7 +61,7 @@ status: NomenclatureChange::StatusToAccepted::PRIMARY_OUTPUT ) } - specify { expect(status_change).to have(0).errors_on(:primary_output) } + specify { expect(status_change.errors_on(:primary_output).size).to eq(0) } end end context "when required secondary output missing" do @@ -73,7 +73,7 @@ status: NomenclatureChange::StatusToSynonym::RELAY ) } - specify { expect(status_change).to have(1).error_on(:secondary_output) } + specify { expect(status_change.error_on(:secondary_output).size).to eq(1) } end context "when submitting" do let(:status_change) { @@ -83,7 +83,7 @@ status: NomenclatureChange::StatusToSynonym::SUBMITTED ) } - specify { expect(status_change).to have(1).error_on(:secondary_output) } + specify { expect(status_change.error_on(:secondary_output).size).to eq(1) } end end end diff --git a/spec/models/preset_tag_spec.rb b/spec/models/preset_tag_spec.rb index 15f521fba9..85dc246eef 100644 --- a/spec/models/preset_tag_spec.rb +++ b/spec/models/preset_tag_spec.rb @@ -15,17 +15,17 @@ describe :create do context "when valid" do let(:preset_tag) { build(:preset_tag, :name => 'Test Tag', :model => 'TaxonConcept') } - specify { preset_tag.should be_valid } + specify { expect(preset_tag).to be_valid } end context "when name missing" do let(:preset_tag) { build(:preset_tag, :name => nil, :model => 'TaxonConcept') } - specify { preset_tag.should be_invalid } - specify { preset_tag.should have(1).error_on(:name) } + specify { expect(preset_tag).to be_invalid } + specify { expect(preset_tag).to have(1).error_on(:name) } end context "when model (type) incorrect" do let(:preset_tag) { build(:preset_tag, :name => 'Test Tag', :model => 'Nope') } - specify { preset_tag.should be_invalid } - specify { preset_tag.should have(1).error_on(:model) } + specify { expect(preset_tag).to be_invalid } + specify { expect(preset_tag).to have(1).error_on(:model) } end end end diff --git a/spec/models/purpose_spec.rb b/spec/models/purpose_spec.rb index 21007403c5..2ffb2487e1 100644 --- a/spec/models/purpose_spec.rb +++ b/spec/models/purpose_spec.rb @@ -18,7 +18,7 @@ describe :destroy do context "when no dependent objects attached" do let(:purpose) { create(:purpose) } - specify { purpose.destroy.should be_truthy } + specify { expect(purpose.destroy).to be_truthy } end context "when dependent objects attached" do let(:purpose) { create(:purpose) } @@ -30,11 +30,11 @@ :start_notification_id => create_cites_suspension_notification.id ) } - specify { purpose.destroy.should be_falsey } + specify { expect(purpose.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :purpose => purpose) } - specify { purpose.destroy.should be_falsey } + specify { expect(purpose.destroy).to be_falsey } end end end diff --git a/spec/models/quota_spec.rb b/spec/models/quota_spec.rb index 3a9a42592a..25092b5a92 100644 --- a/spec/models/quota_spec.rb +++ b/spec/models/quota_spec.rb @@ -45,7 +45,7 @@ Quota.export('set' => 'current') end subject { Dir["#{DownloadsCache.quotas_path}/*"] } - specify { subject.should_not be_empty } + specify { expect(subject).not_to be_empty } end end @@ -59,7 +59,7 @@ Quota.export('set' => 'current') end subject { Dir["#{DownloadsCache.quotas_path}/*"] } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end end @@ -79,7 +79,7 @@ ) } - specify { quota.should be_valid } + specify { expect(quota).to be_valid } end context "when quota missing" do @@ -92,8 +92,8 @@ ) } - specify { quota1.should be_invalid } - specify { quota1.should have(2).error_on(:quota) } + specify { expect(quota1).to be_invalid } + specify { expect(quota1.error_on(:quota).size).to eq(2) } end context "when publication date missing" do @@ -106,8 +106,8 @@ ) } - specify { quota.should be_invalid } - specify { quota.should have(1).error_on(:publication_date) } + specify { expect(quota).to be_invalid } + specify { expect(quota.error_on(:publication_date).size).to eq(1) } end context "when start date greater than end date" do @@ -121,8 +121,8 @@ ) } - specify { quota.should be_invalid } - specify { quota.should have(1).error_on(:start_date) } + specify { expect(quota).to be_invalid } + specify { expect(quota.error_on(:start_date).size).to eq(1) } end pending "doesn't save a quota without a unit" do diff --git a/spec/models/rank_spec.rb b/spec/models/rank_spec.rb index 96a626d1d9..aaae38fe10 100644 --- a/spec/models/rank_spec.rb +++ b/spec/models/rank_spec.rb @@ -19,17 +19,17 @@ describe :parent_rank_lower_bound do context "obligatory rank" do let(:rank) { create(:rank, name: Rank::KINGDOM) } - specify { rank.parent_rank_lower_bound.should == '0' } + specify { expect(rank.parent_rank_lower_bound).to eq('0') } end context "optional rank" do let(:rank) { create(:rank, name: Rank::SUBFAMILY) } - specify { rank.parent_rank_lower_bound.should == '5' } + specify { expect(rank.parent_rank_lower_bound).to eq('5') } end end describe :create do context "when taxonomic position malformed" do let(:rank) { build(:rank, name: Rank::PHYLUM, taxonomic_position: '1.a.b') } - specify { rank.should have(1).error_on(:taxonomic_position) } + specify { expect(rank).to have(1).error_on(:taxonomic_position) } end end describe :destroy do @@ -39,30 +39,30 @@ r.update_attribute(:name, 'SUPER PHYLUM') r } - specify { rank.destroy.should be_truthy } + specify { expect(rank.destroy).to be_truthy } end context "when dependent objects attached" do let(:rank) { create(:rank, name: Rank::PHYLUM, taxonomic_position: '1.1') } let!(:taxon_concept) { create(:taxon_concept, :rank => rank) } - specify { rank.destroy.should be_falsey } + specify { expect(rank.destroy).to be_falsey } end context "when protected name" do let(:rank) { create(:rank, name: Rank::PHYLUM, taxonomic_position: '1.1') } - specify { rank.destroy.should be_falsey } + specify { expect(rank.destroy).to be_falsey } end end describe :in_range do context "when no bounds specified" do subject { Rank.in_range(nil, nil) } - specify { subject.should == Rank.dict } + specify { expect(subject).to eq(Rank.dict) } end context "when lower bound specified" do subject { Rank.in_range(Rank::CLASS, nil) } - specify { subject.should == [Rank::KINGDOM, Rank::PHYLUM, Rank::CLASS] } + specify { expect(subject).to eq([Rank::KINGDOM, Rank::PHYLUM, Rank::CLASS]) } end context "when lower and upper bound specified" do subject { Rank.in_range(Rank::GENUS, Rank::FAMILY) } - specify { subject.should == [Rank::FAMILY, Rank::SUBFAMILY, Rank::GENUS] } + specify { expect(subject).to eq([Rank::FAMILY, Rank::SUBFAMILY, Rank::GENUS]) } end end end diff --git a/spec/models/sapi/geoip_spec.rb b/spec/models/sapi/geoip_spec.rb index 2ac1e05243..ff9c1a7c44 100644 --- a/spec/models/sapi/geoip_spec.rb +++ b/spec/models/sapi/geoip_spec.rb @@ -5,13 +5,13 @@ subject { Sapi::GeoIP.instance } before(:each) do bogota_latin1 = "Bogotá".encode('ISO-8859-1', 'UTF-8') - subject.stub(:country_and_city).and_return( + allow(subject).to receive(:country_and_city).and_return( { country: 'Colombia', city: bogota_latin1 } ) end - specify { subject.resolve('1.1.1.1')[:city].should == 'Bogotá' } + specify { expect(subject.resolve('1.1.1.1')[:city]).to eq('Bogotá') } end end diff --git a/spec/models/source_spec.rb b/spec/models/source_spec.rb index d8c2fa9fb8..d61341f3b8 100644 --- a/spec/models/source_spec.rb +++ b/spec/models/source_spec.rb @@ -18,7 +18,7 @@ describe :destroy do context "when no dependent objects attached" do let(:source) { create(:source) } - specify { source.destroy.should be_truthy } + specify { expect(source.destroy).to be_truthy } end context "when dependent objects attached" do let(:source) { create(:source) } @@ -30,16 +30,16 @@ :start_notification_id => create_cites_suspension_notification.id ) } - specify { source.destroy.should be_falsey } + specify { expect(source.destroy).to be_falsey } end context "when CITES quota" do let(:geo_entity) { create(:geo_entity) } let!(:quota) { create(:quota, :sources => [source], :geo_entity_id => geo_entity.id) } - specify { source.destroy.should be_falsey } + specify { expect(source.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :source => source) } - specify { source.destroy.should be_falsey } + specify { expect(source.destroy).to be_falsey } end end end diff --git a/spec/models/species/common_names_export_spec.rb b/spec/models/species/common_names_export_spec.rb index a6e54076d4..0f41254de7 100644 --- a/spec/models/species/common_names_export_spec.rb +++ b/spec/models/species/common_names_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::CommonNamesExport.new({}) } - specify { subject.path.should == "public/downloads/common_names/" } + specify { expect(subject.path).to eq("public/downloads/common_names/") } end describe :export do context "when no results" do subject { Species::CommonNamesExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -19,7 +19,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/common_names") ) - Species::CommonNamesExport.any_instance.stub(:path). + allow_any_instance_of(Species::CommonNamesExport).to receive(:path). and_return("spec/public/downloads/common_names/") } after(:each) { @@ -31,13 +31,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/documents_export_spec.rb b/spec/models/species/documents_export_spec.rb index 83b62d67a4..0edeb5612f 100644 --- a/spec/models/species/documents_export_spec.rb +++ b/spec/models/species/documents_export_spec.rb @@ -4,7 +4,7 @@ subject { Species::DocumentsExport.new({}) } - specify { subject.path.should == "public/downloads/documents/" } + specify { expect(subject.path).to eq("public/downloads/documents/") } end SPEC_DOCUMENTS_DOWNLOAD_PATH = "spec/public/downloads/documents" describe :export do @@ -12,7 +12,7 @@ FileUtils.mkpath( File.expand_path("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}") ) - Species::DocumentsExport.any_instance.stub(:path). + allow_any_instance_of(Species::DocumentsExport).to receive(:path). and_return("#{SPEC_DOCUMENTS_DOWNLOAD_PATH}/") end after(:each) do @@ -26,7 +26,7 @@ Species::DocumentsExport.new({}) } specify "when file not cached it should not be generated" do - subject.export.should be_falsey + expect(subject.export).to be_falsey end end context "when results" do @@ -40,12 +40,12 @@ #} pending "when file not cached it should be generated" do subject.export - File.file?(subject.file_name).should be_truthy - File.size(subject.file_name).should be > 0 + expect(File.file?(subject.file_name)).to be_truthy + expect(File.size(subject.file_name)).to be > 0 end pending "when file cached it should not be generated" do FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export end end diff --git a/spec/models/species/hybrid_prefix_matcher_spec.rb b/spec/models/species/hybrid_prefix_matcher_spec.rb index bef84c75ca..d10de6e9bf 100644 --- a/spec/models/species/hybrid_prefix_matcher_spec.rb +++ b/spec/models/species/hybrid_prefix_matcher_spec.rb @@ -11,7 +11,7 @@ :visibility => :trade }) } - specify { subject.results.should include(@hybrid_ac) } + specify { expect(subject.results).to include(@hybrid_ac) } end context "when trade internal visibility" do subject { @@ -21,7 +21,7 @@ :visibility => :trade_internal }) } - specify { subject.results.should include(@hybrid_ac) } + specify { expect(subject.results).to include(@hybrid_ac) } end context "when speciesplus visibility" do subject { @@ -30,7 +30,7 @@ :ranks => [] }) } - specify { subject.results.should be_empty } + specify { expect(subject.results).to be_empty } end end end diff --git a/spec/models/species/invisible_subspecies_search_spec.rb b/spec/models/species/invisible_subspecies_search_spec.rb index 514d4dbcc0..a50144c26c 100644 --- a/spec/models/species/invisible_subspecies_search_spec.rb +++ b/spec/models/species/invisible_subspecies_search_spec.rb @@ -5,8 +5,8 @@ context "when searching by scientific name" do context "when subspecies never listed" do subject { Species::Search.new({ :taxon_concept_query => 'amazona festiva festiva' }).results } - specify { subject.should_not include(@subspecies2_2_2_1) } - specify { subject.should include(@species2_2_2) } + specify { expect(subject).not_to include(@subspecies2_2_2_1) } + specify { expect(subject).to include(@species2_2_2) } end end end diff --git a/spec/models/species/listings_export_spec.rb b/spec/models/species/listings_export_spec.rb index d3ddcb42dc..4f59087550 100644 --- a/spec/models/species/listings_export_spec.rb +++ b/spec/models/species/listings_export_spec.rb @@ -7,7 +7,7 @@ :designation_id => cites.id }) } - specify { subject.path.should == "public/downloads/cites_listings/" } + specify { expect(subject.path).to eq("public/downloads/cites_listings/") } end describe :export do context "when no results" do @@ -18,14 +18,14 @@ :geo_entities_ids => [poland.id] }) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { FileUtils.mkpath( File.expand_path("spec/public/downloads/cites_listings") ) - Species::ListingsExport.any_instance.stub(:path). + allow_any_instance_of(Species::ListingsExport).to receive(:path). and_return("spec/public/downloads/cites_listings/") } after(:each) { @@ -41,13 +41,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end @@ -62,7 +62,7 @@ :species_listings_ids => [cites_I.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } context "when Poland" do subject { @@ -72,7 +72,7 @@ :geo_entities_ids => [poland.id] }) } - specify { subject.query.to_a.size.should == 0 } + specify { expect(subject.query.to_a.size).to eq(0) } end context "when Nepal" do @@ -83,7 +83,7 @@ :geo_entities_ids => [nepal.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end end context "when higher taxon ids" do @@ -93,7 +93,7 @@ :taxon_concepts_ids => [@family.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end context "when implicitly listed subspecies present" do before(:each) do @@ -108,7 +108,7 @@ :taxon_concepts_ids => [@family.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end end context "when EU" do @@ -119,7 +119,7 @@ :species_listings_ids => [eu_A.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } context "when Spain" do subject { @@ -129,7 +129,7 @@ :geo_entities_ids => [spain.id] }) } - specify { subject.query.to_a.size.should == 0 } + specify { expect(subject.query.to_a.size).to eq(0) } end context "when Nepal" do @@ -140,7 +140,7 @@ :geo_entities_ids => [nepal.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end end context "when higher taxon ids" do @@ -150,7 +150,7 @@ :taxon_concepts_ids => [@family.id] }) } - specify { subject.query.to_a.size.should == 1 } + specify { expect(subject.query.to_a.size).to eq(1) } end end end diff --git a/spec/models/species/orphaned_taxon_concepts_export_spec.rb b/spec/models/species/orphaned_taxon_concepts_export_spec.rb index 1856f791f8..62a15e3811 100644 --- a/spec/models/species/orphaned_taxon_concepts_export_spec.rb +++ b/spec/models/species/orphaned_taxon_concepts_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::OrphanedTaxonConceptsExport.new({}) } - specify { subject.path.should == "public/downloads/orphaned_taxon_concepts/" } + specify { expect(subject.path).to eq("public/downloads/orphaned_taxon_concepts/") } end describe :export do context "when no results" do subject { Species::OrphanedTaxonConceptsExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -20,7 +20,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/orphaned_taxon_concepts") ) - Species::OrphanedTaxonConceptsExport.any_instance.stub(:path). + allow_any_instance_of(Species::OrphanedTaxonConceptsExport).to receive(:path). and_return("spec/public/downloads/orphaned_taxon_concepts/") } after(:each) { @@ -32,13 +32,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/search_spec.rb b/spec/models/species/search_spec.rb index df452c0921..4151626563 100644 --- a/spec/models/species/search_spec.rb +++ b/spec/models/species/search_spec.rb @@ -5,19 +5,19 @@ context "when searching by scientific name" do context "when regular query" do subject { Species::Search.new({ :taxon_concept_query => 'canis' }).results } - specify { subject.should include(@species) } + specify { expect(subject).to include(@species) } end context "when malicious query" do subject { Species::Search.new({ :taxon_concept_query => 'canis\'' }).results } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end context "when leading whitespace" do subject { Species::Search.new({ :taxon_concept_query => ' canis' }).results } - specify { subject.should include(@species) } + specify { expect(subject).to include(@species) } end context "when trailing whitespace" do subject { Species::Search.new({ :taxon_concept_query => 'canis ' }).results } - specify { subject.should include(@species) } + specify { expect(subject).to include(@species) } end end end diff --git a/spec/models/species/species_reference_output_spec.rb b/spec/models/species/species_reference_output_spec.rb index 848e6ccc54..63e3f016be 100644 --- a/spec/models/species/species_reference_output_spec.rb +++ b/spec/models/species/species_reference_output_spec.rb @@ -4,14 +4,14 @@ subject { Species::SpeciesReferenceOutputExport.new({}) } - specify { subject.path.should == "public/downloads/species_reference_output/" } + specify { expect(subject.path).to eq("public/downloads/species_reference_output/") } end describe :export do context "when no results" do subject { Species::SpeciesReferenceOutputExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -19,7 +19,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/species_reference_output") ) - Species::SpeciesReferenceOutputExport.any_instance.stub(:path). + allow_any_instance_of(Species::SpeciesReferenceOutputExport).to receive(:path). and_return("spec/public/downloads/species_reference_output/") } after(:each) { @@ -31,13 +31,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/standard_reference_output_spec.rb b/spec/models/species/standard_reference_output_spec.rb index 66c60c26a4..6490033743 100644 --- a/spec/models/species/standard_reference_output_spec.rb +++ b/spec/models/species/standard_reference_output_spec.rb @@ -4,14 +4,14 @@ subject { Species::StandardReferenceOutputExport.new({}) } - specify { subject.path.should == "public/downloads/standard_reference_output/" } + specify { expect(subject.path).to eq("public/downloads/standard_reference_output/") } end describe :export do context "when no results" do subject { Species::StandardReferenceOutputExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -19,7 +19,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/standard_reference_output") ) - Species::StandardReferenceOutputExport.any_instance.stub(:path). + allow_any_instance_of(Species::StandardReferenceOutputExport).to receive(:path). and_return("spec/public/downloads/standard_reference_output/") } after(:each) { @@ -31,13 +31,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/synonyms_and_trade_names_export_spec.rb b/spec/models/species/synonyms_and_trade_names_export_spec.rb index b3af773884..fd94202693 100644 --- a/spec/models/species/synonyms_and_trade_names_export_spec.rb +++ b/spec/models/species/synonyms_and_trade_names_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::SynonymsAndTradeNamesExport.new({}) } - specify { subject.path.should == "public/downloads/synonyms_and_trade_names/" } + specify { expect(subject.path).to eq("public/downloads/synonyms_and_trade_names/") } end describe :export do context "when no results" do subject { Species::SynonymsAndTradeNamesExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -25,7 +25,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/synonyms_and_trade_names") ) - Species::SynonymsAndTradeNamesExport.any_instance.stub(:path). + allow_any_instance_of(Species::SynonymsAndTradeNamesExport).to receive(:path). and_return("spec/public/downloads/synonyms_and_trade_names/") } after(:each) { @@ -37,13 +37,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/taxon_concept_prefix_matcher_spec.rb b/spec/models/species/taxon_concept_prefix_matcher_spec.rb index 77070fb1ac..c7cc511398 100644 --- a/spec/models/species/taxon_concept_prefix_matcher_spec.rb +++ b/spec/models/species/taxon_concept_prefix_matcher_spec.rb @@ -11,7 +11,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when searching by hyphenated common name without hyphens" do subject { @@ -20,7 +20,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when searching by part of hyphenated common name" do subject { @@ -29,7 +29,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end end context "when searching by scientific name" do @@ -40,7 +40,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when malicious query" do subject { @@ -49,7 +49,7 @@ :ranks => [] }) } - specify { subject.results.should be_empty } + specify { expect(subject.results).to be_empty } end context "when leading whitespace" do subject { @@ -58,7 +58,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when trailing whitespace" do subject { @@ -67,7 +67,7 @@ :ranks => [] }) } - specify { subject.results.should include(@species_ac) } + specify { expect(subject.results).to include(@species_ac) } end context "when implicitly listed subspecies" do subject { @@ -76,7 +76,7 @@ :ranks => [] }) } - specify { subject.results.should_not include(@subspecies2_ac) } + specify { expect(subject.results).not_to include(@subspecies2_ac) } end context "when explicitly listed subspecies" do subject { @@ -85,7 +85,7 @@ :ranks => [] }) } - specify { subject.results.should include(@subspecies1_ac) } + specify { expect(subject.results).to include(@subspecies1_ac) } end context "when implicitly listed higher taxon (without an explicitly listed ancestor)" do subject { @@ -94,7 +94,7 @@ :ranks => [] }) } - specify { subject.results.should include(@order_ac) } + specify { expect(subject.results).to include(@order_ac) } end context "when explicitly listed higher taxon" do subject { @@ -103,7 +103,7 @@ :ranks => [] }) } - specify { subject.results.should include(@family_ac) } + specify { expect(subject.results).to include(@family_ac) } end # check ranks filtering context "when explicitly listed higher taxon but ranks expected FAMILY" do @@ -114,7 +114,7 @@ :visibility => :trade }) } - specify { subject.results.should include(@family_ac) } + specify { expect(subject.results).to include(@family_ac) } end context "when explicitly listed higher taxon but ranks expected SPECIES" do subject { @@ -124,7 +124,7 @@ :visibility => :trade }) } - specify { subject.results.should be_empty } + specify { expect(subject.results).to be_empty } end context "when searching for name that matches Species and Subspecies but ranks expected SUBSPECIES" do subject { @@ -135,8 +135,8 @@ }) } specify { - subject.results.should_not include(@species_ac) - subject.results.should include(@subspecies1_ac) + expect(subject.results).not_to include(@species_ac) + expect(subject.results).to include(@subspecies1_ac) } end end diff --git a/spec/models/species/taxon_concepts_export_spec.rb b/spec/models/species/taxon_concepts_export_spec.rb index 1020210648..57629277fb 100644 --- a/spec/models/species/taxon_concepts_export_spec.rb +++ b/spec/models/species/taxon_concepts_export_spec.rb @@ -4,14 +4,14 @@ subject { Species::TaxonConceptsNamesExport.new({}) } - specify { subject.path.should == "public/downloads/taxon_concepts_names/" } + specify { expect(subject.path).to eq("public/downloads/taxon_concepts_names/") } end describe :export do context "when no results" do subject { Species::TaxonConceptsNamesExport.new({}) } - specify { subject.export.should be_falsey } + specify { expect(subject.export).to be_falsey } end context "when results" do before(:each) { @@ -19,7 +19,7 @@ FileUtils.mkpath( File.expand_path("spec/public/downloads/taxon_concepts_names") ) - Species::TaxonConceptsNamesExport.any_instance.stub(:path). + allow_any_instance_of(Species::TaxonConceptsNamesExport).to receive(:path). and_return("spec/public/downloads/taxon_concepts_names/") } after(:each) { @@ -31,13 +31,13 @@ context "when file not cached" do specify { subject.export - File.file?(subject.file_name).should be_truthy + expect(File.file?(subject.file_name)).to be_truthy } end context "when file cached" do specify { FileUtils.touch(subject.file_name) - subject.should_not_receive(:to_csv) + expect(subject).not_to receive(:to_csv) subject.export } end diff --git a/spec/models/species/trade_name_prefix_matcher_spec.rb b/spec/models/species/trade_name_prefix_matcher_spec.rb index d3b6e8b598..509f0896da 100644 --- a/spec/models/species/trade_name_prefix_matcher_spec.rb +++ b/spec/models/species/trade_name_prefix_matcher_spec.rb @@ -36,7 +36,7 @@ :visibility => :trade }) } - specify { subject.results.should include(@status_N_species_ac) } + specify { expect(subject.results).to include(@status_N_species_ac) } end context "when trade internal visibility" do subject { @@ -46,7 +46,7 @@ :visibility => :trade_internal }) } - specify { subject.results.should include(@status_N_species_ac) } + specify { expect(subject.results).to include(@status_N_species_ac) } end context "when speciesplus visibility" do subject { @@ -55,7 +55,7 @@ :ranks => [] }) } - specify { subject.results.should_not include(@status_N_species_ac) } + specify { expect(subject.results).not_to include(@status_N_species_ac) } end end context "when searching for trade name" do @@ -67,8 +67,8 @@ :visibility => :trade }) } - specify { subject.results.should_not include(@trade_name_ac) } - specify { subject.results.should include(@accepted_name_ac) } + specify { expect(subject.results).not_to include(@trade_name_ac) } + specify { expect(subject.results).to include(@accepted_name_ac) } end context "when trade internal visibility" do subject { @@ -78,8 +78,8 @@ :visibility => :trade_internal }) } - specify { subject.results.should include(@trade_name_ac) } - specify { subject.results.should include(@accepted_name_ac) } + specify { expect(subject.results).to include(@trade_name_ac) } + specify { expect(subject.results).to include(@accepted_name_ac) } end context "when speciesplus visibility" do subject { @@ -88,8 +88,8 @@ :ranks => [] }) } - specify { subject.results.should_not include(@trade_name_ac) } - specify { subject.results.should include(@accepted_name_ac) } + specify { expect(subject.results).not_to include(@trade_name_ac) } + specify { expect(subject.results).to include(@accepted_name_ac) } end end end diff --git a/spec/models/species/visible_subspecies_search_spec.rb b/spec/models/species/visible_subspecies_search_spec.rb index 9e50bf9e3a..794f65a4c8 100644 --- a/spec/models/species/visible_subspecies_search_spec.rb +++ b/spec/models/species/visible_subspecies_search_spec.rb @@ -5,7 +5,7 @@ context "when searching by scientific name" do context "when subspecies previously listed " do subject { Species::Search.new({ :taxon_concept_query => 'canis lupus' }).results } - specify { subject.should include(@subspecies) } + specify { expect(subject).to include(@subspecies) } end end end diff --git a/spec/models/synonym_relationship_spec.rb b/spec/models/synonym_relationship_spec.rb index 8d4a5e8fff..82d4d1258b 100644 --- a/spec/models/synonym_relationship_spec.rb +++ b/spec/models/synonym_relationship_spec.rb @@ -51,15 +51,15 @@ } specify { synonymy_rel.save - tc.synonyms.map(&:full_name).should include('Lolcatus lolus') + expect(tc.synonyms.map(&:full_name)).to include('Lolcatus lolus') } specify { synonymy_rel.save another_synonymy_rel.save synonymy_rel.other_taxon_concept = another_synonym synonymy_rel.save - tc.synonyms.map(&:full_name).should include('Lolcatus lolatus') - another_tc.synonyms.map(&:full_name).should include('Lolcatus lolus') + expect(tc.synonyms.map(&:full_name)).to include('Lolcatus lolatus') + expect(another_tc.synonyms.map(&:full_name)).to include('Lolcatus lolus') } end end diff --git a/spec/models/taxon_common_spec.rb b/spec/models/taxon_common_spec.rb index 8ad96fce02..d4c42137cc 100644 --- a/spec/models/taxon_common_spec.rb +++ b/spec/models/taxon_common_spec.rb @@ -57,7 +57,7 @@ another_tc_common.save tc_common.name = "Black lolcat" tc_common.save - another_tc.common_names.map(&:name).should include('Lolcat') + expect(another_tc.common_names.map(&:name)).to include('Lolcat') } end end diff --git a/spec/models/taxon_concept/agalychnis_spec.rb b/spec/models/taxon_concept/agalychnis_spec.rb index 3c2919d2c8..b7fcd7731c 100644 --- a/spec/models/taxon_concept/agalychnis_spec.rb +++ b/spec/models/taxon_concept/agalychnis_spec.rb @@ -7,55 +7,55 @@ context "REFERENCES" do describe :cites_accepted do context "for class Amphibia" do - specify { @klass.cites_accepted.should be_truthy } + specify { expect(@klass.cites_accepted).to be_truthy } end context "for family Hylidae" do - specify { @family.cites_accepted.should be_truthy } + specify { expect(@family.cites_accepted).to be_truthy } end context "for genus Agalychnis" do - specify { @genus.cites_accepted.should == false } + specify { expect(@genus.cites_accepted).to eq(false) } end end describe :standard_taxon_concept_references do context "for class Amphibia" do - specify { @klass.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } + specify { expect(@klass.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } end context "for family Hylidae" do - specify { @family.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } + specify { expect(@family.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } end context "for genus Agalychnis" do - specify { @genus.taxon_concept.standard_taxon_concept_references.should be_empty } + specify { expect(@genus.taxon_concept.standard_taxon_concept_references).to be_empty } end end end context "LISTING" do describe :cites_listing do context "for genus Agalychnis" do - specify { @genus.cites_listing.should == 'II' } + specify { expect(@genus.cites_listing).to eq('II') } end end describe :eu_listing do context "for genus Agalychnis" do - specify { @genus.eu_listing.should == 'B' } + specify { expect(@genus.eu_listing).to eq('B') } end end describe :cites_listed do context "for family Hylidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Agalychnis" do - specify { @genus.cites_listed.should be_truthy } + specify { expect(@genus.cites_listed).to be_truthy } end end describe :eu_listed do context "for family Hylidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Agalychnis" do - specify { @genus.eu_listed.should be_truthy } + specify { expect(@genus.eu_listed).to be_truthy } end end diff --git a/spec/models/taxon_concept/agave_spec.rb b/spec/models/taxon_concept/agave_spec.rb index a9e918847c..0c062f103a 100644 --- a/spec/models/taxon_concept/agave_spec.rb +++ b/spec/models/taxon_concept/agave_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context 'for species Agave parviflora' do - specify { @species2.cites_listing.should == 'I' } + specify { expect(@species2.cites_listing).to eq('I') } end context 'for species Agave arizonica' do - specify { @species1.cites_listing.should == 'NC' } + specify { expect(@species1.cites_listing).to eq('NC') } end end describe :cites_listed do context "for species Agave parviflora" do - specify { @species2.cites_listed.should be_truthy } + specify { expect(@species2.cites_listed).to be_truthy } end context "for species Agave arizonica" do - specify { @species1.cites_listed.should be_nil } + specify { expect(@species1.cites_listed).to be_nil } end end describe :cites_show do context "for species Agave parviflora" do - specify { @species2.cites_show.should be_truthy } + specify { expect(@species2.cites_show).to be_truthy } end context "for species Agave arizonica" do - specify { @species1.cites_show.should be_falsey } + specify { expect(@species1.cites_show).to be_falsey } end end describe :eu_listing do context 'for species Agave parviflora' do - specify { @species2.eu_listing.should == 'A' } + specify { expect(@species2.eu_listing).to eq('A') } end context 'for species Agave arizonica' do - specify { @species1.eu_listing.should == 'NC' } + specify { expect(@species1.eu_listing).to eq('NC') } end end describe :eu_listed do context "for species Agave parviflora" do - specify { @species2.eu_listed.should be_truthy } + specify { expect(@species2.eu_listed).to be_truthy } end context "for species Agave arizonica" do - specify { @species1.eu_listed.should be_nil } + specify { expect(@species1.eu_listed).to be_nil } end end describe :eu_show do context "for species Agave parviflora" do - specify { @species2.eu_show.should be_truthy } + specify { expect(@species2.eu_show).to be_truthy } end context "for species Agave arizonica" do - specify { @species1.eu_show.should be_falsey } + specify { expect(@species1.eu_show).to be_falsey } end end diff --git a/spec/models/taxon_concept/ailuropoda_spec.rb b/spec/models/taxon_concept/ailuropoda_spec.rb index 29fba6f47d..61a1b5bc01 100644 --- a/spec/models/taxon_concept/ailuropoda_spec.rb +++ b/spec/models/taxon_concept/ailuropoda_spec.rb @@ -7,37 +7,37 @@ context "LISTING" do describe :cites_listing do context "for species Ailuropoda melanoleuca" do - specify { @species.cites_listing.should == 'I' } + specify { expect(@species.cites_listing).to eq('I') } end context "for genus level Ailuropoda" do - specify { @genus.cites_listing.should == 'I' } + specify { expect(@genus.cites_listing).to eq('I') } end end describe :eu_listing do context "for species Ailuropoda melanoleuca" do - specify { @species.eu_listing.should == 'A' } + specify { expect(@species.eu_listing).to eq('A') } end context "for genus level Ailuropoda" do - specify { @genus.eu_listing.should == 'A' } + specify { expect(@genus.eu_listing).to eq('A') } end end describe :cites_listed do context "for genus Ailuropoda" do - specify { @genus.cites_listed.should be_falsey } + specify { expect(@genus.cites_listed).to be_falsey } end context "for species Ailuropoda melanoleuca" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end end describe :eu_listed do context "for genus Ailuropoda" do - specify { @genus.eu_listed.should be_falsey } + specify { expect(@genus.eu_listed).to be_falsey } end context "for species Ailuropoda melanoleuca" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end diff --git a/spec/models/taxon_concept/arctocephalus_spec.rb b/spec/models/taxon_concept/arctocephalus_spec.rb index a807914721..332050df5d 100644 --- a/spec/models/taxon_concept/arctocephalus_spec.rb +++ b/spec/models/taxon_concept/arctocephalus_spec.rb @@ -7,37 +7,37 @@ context "LISTING" do describe :cites_listing do it "should be II at species level Arctocephalus australis" do - @species1.cites_listing.should == 'II' + expect(@species1.cites_listing).to eq('II') end it "should be I at species level Arctocephalus townsendi" do - @species2.cites_listing.should == 'I' + expect(@species2.cites_listing).to eq('I') end it "should be I/II at genus level Arctocephalus" do - @genus.cites_listing.should == 'I/II' + expect(@genus.cites_listing).to eq('I/II') end end describe :cites_listed do it "should be true for genus Arctocephalus" do - @genus.cites_listed.should be_truthy + expect(@genus.cites_listed).to be_truthy end it "should be true for species Arctocephalus townsendi" do - @species2.cites_listed.should be_truthy + expect(@species2.cites_listed).to be_truthy end it "should be false for species Arctocephalus australis (inclusion in higher taxa listing)" do - @species1.cites_listed.should == false + expect(@species1.cites_listed).to eq(false) end end describe :eu_listed do it "should be true for genus Arctocephalus" do - @genus.eu_listed.should be_truthy + expect(@genus.eu_listed).to be_truthy end it "should be true for species Arctocephalus townsendi" do - @species2.eu_listed.should be_truthy + expect(@species2.eu_listed).to be_truthy end it "should be false for species Arctocephalus australis (inclusion in higher taxa listing)" do - @species1.eu_listed.should == false + expect(@species1.eu_listed).to eq(false) end end diff --git a/spec/models/taxon_concept/boa_constrictor_spec.rb b/spec/models/taxon_concept/boa_constrictor_spec.rb index 8d1ba024e4..217c8d50b1 100644 --- a/spec/models/taxon_concept/boa_constrictor_spec.rb +++ b/spec/models/taxon_concept/boa_constrictor_spec.rb @@ -6,25 +6,25 @@ context "TAXONOMY" do describe :full_name do context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.full_name.should == 'Boa constrictor occidentalis' } + specify { expect(@subspecies1.full_name).to eq('Boa constrictor occidentalis') } end context "for species Boa constrictor" do - specify { @species.full_name.should == 'Boa constrictor' } + specify { expect(@species.full_name).to eq('Boa constrictor') } end context "for genus Boa" do - specify { @genus.full_name.should == 'Boa' } + specify { expect(@genus.full_name).to eq('Boa') } end end describe :ancestors do context "family" do - specify { @species.family_name.should == 'Boidae' } + specify { expect(@species.family_name).to eq('Boidae') } end context "order" do - specify { @species.order_name.should == 'Serpentes' } + specify { expect(@species.order_name).to eq('Serpentes') } end context "class" do - specify { @species.class_name.should == 'Reptilia' } + specify { expect(@species.class_name).to eq('Reptilia') } end end end @@ -32,127 +32,127 @@ context "LISTING" do describe :cites_listing do context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.cites_listing.should == 'I' } + specify { expect(@subspecies1.cites_listing).to eq('I') } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2.cites_listing.should == 'II' } + specify { expect(@subspecies2.cites_listing).to eq('II') } end context "for species Boa constrictor" do - specify { @species.cites_listing.should == 'I/II' } + specify { expect(@species.cites_listing).to eq('I/II') } end end describe :eu_listing do context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.eu_listing.should == 'A' } + specify { expect(@subspecies1.eu_listing).to eq('A') } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2.eu_listing.should == 'B' } + specify { expect(@subspecies2.eu_listing).to eq('B') } end context "for species Boa constrictor" do - specify { @species.eu_listing.should == 'A/B' } + specify { expect(@species.eu_listing).to eq('A/B') } end end describe :cites_listed do context "for family Boidae" do - specify { @family.cites_listed.should be_truthy } + specify { expect(@family.cites_listed).to be_truthy } end context "for genus Boa" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.cites_listed.should be_truthy } + specify { expect(@subspecies1.cites_listed).to be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2.cites_listed.should be_falsey } + specify { expect(@subspecies2.cites_listed).to be_falsey } end end describe :cites_show do context "for family Boidae" do - specify { @family.cites_show.should be_truthy } + specify { expect(@family.cites_show).to be_truthy } end context "for genus Boa" do - specify { @genus.cites_show.should be_truthy } + specify { expect(@genus.cites_show).to be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.cites_show.should be_truthy } + specify { expect(@subspecies1.cites_show).to be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2.cites_show.should be_falsey } + specify { expect(@subspecies2.cites_show).to be_falsey } end end describe :cites_listed_descendants do context "for family Boidae" do - specify { @family.cites_listed_descendants.should be_truthy } + specify { expect(@family.cites_listed_descendants).to be_truthy } end context "for genus Boa" do - specify { @genus.cites_listed_descendants.should be_truthy } + specify { expect(@genus.cites_listed_descendants).to be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species.cites_listed_descendants.should be_truthy } + specify { expect(@species.cites_listed_descendants).to be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.cites_listed_descendants.should be_falsey } + specify { expect(@subspecies1.cites_listed_descendants).to be_falsey } end end describe :eu_listed do context "for family Boidae" do - specify { @family.eu_listed.should be_truthy } + specify { expect(@family.eu_listed).to be_truthy } end context "for genus Boa" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1.eu_listed.should be_truthy } + specify { expect(@subspecies1.eu_listed).to be_truthy } end end describe :show_in_species_plus_ac do context "for family Boidae" do - specify { @family_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@family_ac.show_in_species_plus_ac).to be_truthy } end context "for genus Boa" do - specify { @genus_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@genus_ac.show_in_species_plus_ac).to be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@species_ac.show_in_species_plus_ac).to be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies1_ac.show_in_species_plus_ac).to be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2_ac.show_in_species_plus_ac.should be_falsey } + specify { expect(@subspecies2_ac.show_in_species_plus_ac).to be_falsey } end end describe :show_in_checklist_ac do context "for family Boidae" do - specify { @family_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@family_ac.show_in_checklist_ac).to be_truthy } end context "for genus Boa" do - specify { @genus_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@genus_ac.show_in_checklist_ac).to be_truthy } end context "for species Boa constrictor (inclusion in higher taxa listing)" do - specify { @species_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@species_ac.show_in_checklist_ac).to be_truthy } end context "for subspecies Boa constrictor occidentalis" do - specify { @subspecies1_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@subspecies1_ac.show_in_checklist_ac).to be_truthy } end context "for subspecies Boa constrictor constrictor" do - specify { @subspecies2_ac.show_in_checklist_ac.should be_falsey } + specify { expect(@subspecies2_ac.show_in_checklist_ac).to be_falsey } end end diff --git a/spec/models/taxon_concept/caiman_latirostris_spec.rb b/spec/models/taxon_concept/caiman_latirostris_spec.rb index 08a15c1bed..330611fc76 100644 --- a/spec/models/taxon_concept/caiman_latirostris_spec.rb +++ b/spec/models/taxon_concept/caiman_latirostris_spec.rb @@ -7,12 +7,12 @@ context "TAXONOMY" do describe :full_name do context "for species synonym Alligator cynocephalus" do - specify { @species1.full_name.should == 'Alligator cynocephalus' } + specify { expect(@species1.full_name).to eq('Alligator cynocephalus') } end end describe :rank_name do context "for species synonym Alligator cynocephalus" do - specify { @species1.rank_name.should == Rank::SPECIES } + specify { expect(@species1.rank_name).to eq(Rank::SPECIES) } end end end @@ -20,88 +20,88 @@ context "REFERENCES" do describe :cites_accepted do context 'for species Caiman latirostris' do - specify { @species.cites_accepted.should be_truthy } + specify { expect(@species.cites_accepted).to be_truthy } end context "for synonym species Alligator cynocephalus" do - specify { @species1.cites_accepted.should == false } + specify { expect(@species1.cites_accepted).to eq(false) } end end describe :standard_taxon_concept_references do context 'for species Caiman latirostris' do - specify { @species.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } + specify { expect(@species.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } end end end context "LISTING" do describe :cites_listing do context 'for species Caiman latirostris' do - specify { @species.cites_listing.should == 'I/II' } + specify { expect(@species.cites_listing).to eq('I/II') } end end describe :eu_listing do context 'for species Caiman latirostris' do - specify { @species.eu_listing.should == 'A/B' } + specify { expect(@species.eu_listing).to eq('A/B') } end end describe :cites_listed do context 'for order Crocodylia' do - specify { @order.cites_listed.should be_truthy } + specify { expect(@order.cites_listed).to be_truthy } end context "for family Alligatoridae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Caiman" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Caiman latoristris" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end end describe :eu_listed do context 'for order Crocodylia' do - specify { @order.eu_listed.should be_truthy } + specify { expect(@order.eu_listed).to be_truthy } end context "for family Alligatoridae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Caiman" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Caiman latoristris" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end describe :cites_show do context "for order Crocodylia" do - specify { @order.cites_show.should be_truthy } + specify { expect(@order.cites_show).to be_truthy } end context "for family Alligatoridae" do - specify { @family.cites_show.should be_truthy } + specify { expect(@family.cites_show).to be_truthy } end context "for genus Caiman" do - specify { @genus.cites_show.should be_truthy } + specify { expect(@genus.cites_show).to be_truthy } end context "for species Caiman latoristris" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end context "for synonym species Alligator cynocephalus" do - specify { @species1.cites_show.should be_falsey } + specify { expect(@species1.cites_show).to be_falsey } end end describe :ann_symbol do context "for species Caiman latirostris" do - specify { @species.ann_symbol.should_not be_blank } + specify { expect(@species.ann_symbol).not_to be_blank } end end describe :hash_ann_symbol do context "for species Caiman latirostris" do - specify { @species.hash_ann_symbol.should be_blank } + specify { expect(@species.hash_ann_symbol).to be_blank } end end diff --git a/spec/models/taxon_concept/canis_lupus_spec.rb b/spec/models/taxon_concept/canis_lupus_spec.rb index 42ca0e59c8..1a40c03b8c 100644 --- a/spec/models/taxon_concept/canis_lupus_spec.rb +++ b/spec/models/taxon_concept/canis_lupus_spec.rb @@ -6,55 +6,55 @@ context "LISTING" do describe :cites_listing do context "for species Canis lupus (population split listing)" do - specify { @species.cites_listing.should == 'I/II' } + specify { expect(@species.cites_listing).to eq('I/II') } end end describe :eu_listing do context "for species Canis lupus (population split listing)" do - specify { @species.eu_listing.should == 'A/B' } + specify { expect(@species.eu_listing).to eq('A/B') } end end describe :cites_listed do context "for species Canis lupus" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { @subspecies.cites_listed.should be_blank } + specify { expect(@subspecies.cites_listed).to be_blank } end end describe :eu_listed do context "for species Canis lupus" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end describe :show_in_species_plus_ac do context "for species Canis lupus" do - specify { @species_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@species_ac.show_in_species_plus_ac).to be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { @subspecies_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies_ac.show_in_species_plus_ac).to be_truthy } end end describe :show_in_checklist_ac do context "for species Canis lupus" do - specify { @species_ac.show_in_checklist_ac.should be_truthy } + specify { expect(@species_ac.show_in_checklist_ac).to be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { @subspecies_ac.show_in_checklist_ac.should be_falsey } + specify { expect(@subspecies_ac.show_in_checklist_ac).to be_falsey } end end describe :show_in_species_plus do context "for species Canis lupus" do - specify { @species.show_in_species_plus.should be_truthy } + specify { expect(@species.show_in_species_plus).to be_truthy } end context "for subspecies Canis lupus crassodon" do - specify { @subspecies.show_in_species_plus.should be_truthy } + specify { expect(@subspecies.show_in_species_plus).to be_truthy } end end diff --git a/spec/models/taxon_concept/caretta_caretta_cms_spec.rb b/spec/models/taxon_concept/caretta_caretta_cms_spec.rb index 08a742787d..2e81a42e86 100644 --- a/spec/models/taxon_concept/caretta_caretta_cms_spec.rb +++ b/spec/models/taxon_concept/caretta_caretta_cms_spec.rb @@ -7,19 +7,19 @@ context "LISTING" do describe :cms_listing do context "for family Cheloniidae" do - specify { @family.cms_listing.should == 'I/II' } + specify { expect(@family.cms_listing).to eq('I/II') } end context "for species Caretta caretta" do - specify { @species.cms_listing.should == 'I/II' } + specify { expect(@species.cms_listing).to eq('I/II') } end end describe :cms_listed do context "for family Cheloniidae" do - specify { @family.cms_listed.should be_truthy } + specify { expect(@family.cms_listed).to be_truthy } end context "for species Caretta caretta" do - specify { @species.cms_listed.should be_truthy } + specify { expect(@species.cms_listed).to be_truthy } end end end @@ -28,12 +28,12 @@ describe :current_cms_additions do context "for family Cheloniidae" do specify { - @family.current_cms_additions.size.should == 1 + expect(@family.current_cms_additions.size).to eq(1) } end context "for species Caretta caretta" do specify { - @species.current_cms_additions.size.should == 2 + expect(@species.current_cms_additions.size).to eq(2) } end end diff --git a/spec/models/taxon_concept/cedrela_montana_spec.rb b/spec/models/taxon_concept/cedrela_montana_spec.rb index 97454159f6..9a51e135ca 100644 --- a/spec/models/taxon_concept/cedrela_montana_spec.rb +++ b/spec/models/taxon_concept/cedrela_montana_spec.rb @@ -7,37 +7,37 @@ context "LISTING" do describe :cites_listing do context 'for species Cedrela montana' do - specify { @species.cites_listing.should be_blank } + specify { expect(@species.cites_listing).to be_blank } end end describe :cites_listed do context "for species Cedrela montana" do - specify { @species.cites_listed.should be_nil } + specify { expect(@species.cites_listed).to be_nil } end end describe :cites_show do context "for species Cedrela montana" do - specify { @species.cites_show.should be_falsey } + specify { expect(@species.cites_show).to be_falsey } end end describe :eu_listing do context 'for species Cedrela montana' do - specify { @species.eu_listing.should == 'D' } + specify { expect(@species.eu_listing).to eq('D') } end end describe :eu_listed do context "for species Cedrela montana" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end describe :eu_show do context "for species Cedrela montana" do - specify { @species.eu_show.should be_truthy } + specify { expect(@species.eu_show).to be_truthy } end end diff --git a/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb b/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb index 1a80fcec4b..2812829f94 100644 --- a/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb +++ b/spec/models/taxon_concept/cervus_elaphus_cms_spec.rb @@ -7,31 +7,31 @@ context "LISTING" do describe :cms_listing do context "for species Cervus elaphus" do - specify { @species.cms_listing.should == 'I/II' } + specify { expect(@species.cms_listing).to eq('I/II') } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.cms_listing.should == 'I/II' } + specify { expect(@subspecies1.cms_listing).to eq('I/II') } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.cms_listing.should == 'I/II' } + specify { expect(@subspecies2.cms_listing).to eq('I/II') } end end describe :show_in_species_plus_ac do context "for subspecies Cervus elaphus bactrianus (instrument)" do - specify { @subspecies1_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies1_ac.show_in_species_plus_ac).to be_truthy } end context "for subspecies Cervus elaphus barbarus (listing)" do - specify { @subspecies2_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies2_ac.show_in_species_plus_ac).to be_truthy } end end describe :show_in_species_plus do context "for subspecies Cervus elaphus bactrianus (instrument)" do - specify { @subspecies1.show_in_species_plus.should be_truthy } + specify { expect(@subspecies1.show_in_species_plus).to be_truthy } end context "for subspecies Cervus elaphus barbarus (listing)" do - specify { @subspecies2.show_in_species_plus.should be_truthy } + specify { expect(@subspecies2.show_in_species_plus).to be_truthy } end end diff --git a/spec/models/taxon_concept/cervus_elaphus_spec.rb b/spec/models/taxon_concept/cervus_elaphus_spec.rb index 88692a0672..4dca68a802 100644 --- a/spec/models/taxon_concept/cervus_elaphus_spec.rb +++ b/spec/models/taxon_concept/cervus_elaphus_spec.rb @@ -7,13 +7,13 @@ context "TAXONOMY" do describe :full_name do context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.full_name.should == 'Cervus elaphus bactrianus' } + specify { expect(@subspecies1.full_name).to eq('Cervus elaphus bactrianus') } end context "for species Cervus elaphus" do - specify { @species.full_name.should == 'Cervus elaphus' } + specify { expect(@species.full_name).to eq('Cervus elaphus') } end context "for genus Cervus" do - specify { @genus.full_name.should == 'Cervus' } + specify { expect(@genus.full_name).to eq('Cervus') } end end end @@ -21,100 +21,100 @@ context "LISTING" do describe :cites_listing do context "for species Cervus elaphus" do - specify { @species.cites_listing.should == 'I/II/III/NC' } + specify { expect(@species.cites_listing).to eq('I/II/III/NC') } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.cites_listing.should == 'II' } + specify { expect(@subspecies1.cites_listing).to eq('II') } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.cites_listing.should == 'III' } + specify { expect(@subspecies2.cites_listing).to eq('III') } end context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.cites_listing.should == 'I' } + specify { expect(@subspecies3.cites_listing).to eq('I') } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.cites_listing.should == 'NC' } + specify { expect(@subspecies4.cites_listing).to eq('NC') } end end describe :eu_listing do context "for species Cervus elaphus" do - specify { @species.eu_listing.should == 'A/B/C/NC' } + specify { expect(@species.eu_listing).to eq('A/B/C/NC') } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.eu_listing.should == 'B' } + specify { expect(@subspecies1.eu_listing).to eq('B') } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.eu_listing.should == 'C' } + specify { expect(@subspecies2.eu_listing).to eq('C') } end context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.eu_listing.should == 'A' } + specify { expect(@subspecies3.eu_listing).to eq('A') } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.eu_listing.should == 'NC' } + specify { expect(@subspecies4.eu_listing).to eq('NC') } end end describe :cites_listed do context "for order Artiodactyla" do - specify { @order.cites_listed.should == false } + specify { expect(@order.cites_listed).to eq(false) } end context "for family Cervidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Cervus" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Cervus elaphus" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.cites_listed.should be_truthy } + specify { expect(@subspecies1.cites_listed).to be_truthy } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.cites_listed.should be_truthy } + specify { expect(@subspecies2.cites_listed).to be_truthy } end context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.cites_listed.should be_truthy } + specify { expect(@subspecies3.cites_listed).to be_truthy } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.cites_listed.should be_blank } + specify { expect(@subspecies4.cites_listed).to be_blank } end end describe :eu_listed do context "for order Artiodactyla" do - specify { @order.eu_listed.should == false } + specify { expect(@order.eu_listed).to eq(false) } end context "for family Cervidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Cervus" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Cervus elaphus" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end context "for subspecies Cervus elaphus bactrianus" do - specify { @subspecies1.eu_listed.should be_truthy } + specify { expect(@subspecies1.eu_listed).to be_truthy } end context "for subspecies Cervus elaphus barbarus" do - specify { @subspecies2.eu_listed.should be_truthy } + specify { expect(@subspecies2.eu_listed).to be_truthy } end context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.eu_listed.should be_truthy } + specify { expect(@subspecies3.eu_listed).to be_truthy } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.eu_listed.should be_blank } + specify { expect(@subspecies4.eu_listed).to be_blank } end end describe :cites_show do context "for subspecies Cervus elaphus hanglu" do - specify { @subspecies3.cites_show.should be_truthy } + specify { expect(@subspecies3.cites_show).to be_truthy } end context "for subspecies Cervus elaphus canadensis" do - specify { @subspecies4.cites_show.should be_falsey } + specify { expect(@subspecies4.cites_show).to be_falsey } end end diff --git a/spec/models/taxon_concept/colophon_spec.rb b/spec/models/taxon_concept/colophon_spec.rb index 8d11ce398d..b77571f19d 100644 --- a/spec/models/taxon_concept/colophon_spec.rb +++ b/spec/models/taxon_concept/colophon_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context "for genus Colophon" do - specify { @genus.cites_listing.should == 'III' } + specify { expect(@genus.cites_listing).to eq('III') } end context "for species Colophon barnardi" do - specify { @species.cites_listing.should == 'III' } + specify { expect(@species.cites_listing).to eq('III') } end end describe :eu_listing do context "for genus Colophon" do - specify { @genus.eu_listing.should == 'C' } + specify { expect(@genus.eu_listing).to eq('C') } end context "for species Colophon barnardi" do - specify { @species.eu_listing.should == 'C' } + specify { expect(@species.eu_listing).to eq('C') } end end describe :cites_listed do context "for genus Colophon" do - specify { @genus.cites_listed.should == true } + specify { expect(@genus.cites_listed).to eq(true) } end context "for species Colophon barnardi" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end end describe :eu_listed do context "for genus Colophon" do - specify { @genus.eu_listed.should == true } + specify { expect(@genus.eu_listed).to eq(true) } end context "for species Colophon barnardi" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end end describe :cites_show do context "for order Coleoptera" do - specify { @order.cites_show.should be_falsey } + specify { expect(@order.cites_show).to be_falsey } end context "for family Lucanidae" do - specify { @family.cites_show.should be_falsey } + specify { expect(@family.cites_show).to be_falsey } end end describe :current_party_ids do context "for genus Colophon" do - specify { @genus.current_parties_ids.should == [GeoEntity.find_by_iso_code2('ZA').id] } + specify { expect(@genus.current_parties_ids).to eq([GeoEntity.find_by_iso_code2('ZA').id]) } end context "for species Colophon barnardi" do - specify { @species.current_parties_ids.should == [GeoEntity.find_by_iso_code2('ZA').id] } + specify { expect(@species.current_parties_ids).to eq([GeoEntity.find_by_iso_code2('ZA').id]) } end end diff --git a/spec/models/taxon_concept/dalbergia_spec.rb b/spec/models/taxon_concept/dalbergia_spec.rb index 74927a9c2d..8640fc958b 100644 --- a/spec/models/taxon_concept/dalbergia_spec.rb +++ b/spec/models/taxon_concept/dalbergia_spec.rb @@ -7,28 +7,28 @@ context "LISTING" do describe :cites_listing do context 'for species Dalbergia abbreviata' do - specify { @species1.cites_listing.should == 'NC' } + specify { expect(@species1.cites_listing).to eq('NC') } end context 'for species Dalbergia abrahamii' do - specify { @species2.cites_listing.should == 'II' } + specify { expect(@species2.cites_listing).to eq('II') } end end describe :cites_listed do context "for species Dalbergia abbreviata" do - specify { @species1.cites_listed.should be_nil } + specify { expect(@species1.cites_listed).to be_nil } end context "for species Dalbergia abrahamii" do - specify { @species2.cites_listed.should == false } + specify { expect(@species2.cites_listed).to eq(false) } end end describe :cites_show do context "for species Dalbergia abbreviata" do - specify { @species1.cites_show.should be_falsey } + specify { expect(@species1.cites_show).to be_falsey } end context "for species Dalbergia abrahamii" do - specify { @species2.cites_show.should be_truthy } + specify { expect(@species2.cites_show).to be_truthy } end end end diff --git a/spec/models/taxon_concept/destroy_spec.rb b/spec/models/taxon_concept/destroy_spec.rb index 87c9103adf..215de976f2 100644 --- a/spec/models/taxon_concept/destroy_spec.rb +++ b/spec/models/taxon_concept/destroy_spec.rb @@ -5,63 +5,63 @@ context "general" do before(:each) { @taxon_concept = create_cms_species } context "when no dependent objects attached" do - specify { @taxon_concept.destroy.should be_truthy } + specify { expect(@taxon_concept.destroy).to be_truthy } end context "when distributions" do before(:each) { create(:distribution, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_truthy } + specify { expect(@taxon_concept.destroy).to be_truthy } end context "when common names" do before(:each) { create(:taxon_common, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_truthy } + specify { expect(@taxon_concept.destroy).to be_truthy } end context "when references" do before(:each) { create(:taxon_concept_reference, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_truthy } + specify { expect(@taxon_concept.destroy).to be_truthy } end context "when document citations" do before(:each) do create(:document_citation_taxon_concept, taxon_concept: @taxon_concept) end - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end end context "CMS" do before(:each) { @taxon_concept = create_cms_species } context "when taxon instruments" do before(:each) { create(:taxon_instrument, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end end context "CITES / EU" do before(:each) { @taxon_concept = create_cites_eu_species } context "when listing changes" do before(:each) { create_cites_I_addition(:taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when CITES quotas" do before(:each) { create(:quota, :taxon_concept => @taxon_concept, :geo_entity => create(:geo_entity)) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when CITES suspensions" do before(:each) { create(:cites_suspension, :taxon_concept => @taxon_concept, :start_notification => create(:cites_suspension_notification, :designation => cites)) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when EU opinions" do before(:each) { create(:eu_opinion, :taxon_concept => @taxon_concept, start_event: create(:ec_srg)) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when EU suspensions" do before(:each) { create(:eu_suspension, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end context "when reported shipments" do before(:each) { create(:shipment, :reported_taxon_concept => @taxon_concept) } - specify { @taxon_concept.destroy.should be_falsey } + specify { expect(@taxon_concept.destroy).to be_falsey } end end end diff --git a/spec/models/taxon_concept/diospyros_spec.rb b/spec/models/taxon_concept/diospyros_spec.rb index d85c1ed0fc..1585b3acbf 100644 --- a/spec/models/taxon_concept/diospyros_spec.rb +++ b/spec/models/taxon_concept/diospyros_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context 'for species Diospyros aculeata' do - specify { @species1.cites_listing.should == 'II' } + specify { expect(@species1.cites_listing).to eq('II') } end context 'for species Diospyros acuta' do - specify { @species2.cites_listing.should == 'NC' } + specify { expect(@species2.cites_listing).to eq('NC') } end end describe :cites_listed do context "for species Diospyros aculeata" do - specify { @species1.cites_listed.should == false } + specify { expect(@species1.cites_listed).to eq(false) } end context "for species Diospyros acuta" do - specify { @species2.cites_listed.should be_nil } + specify { expect(@species2.cites_listed).to be_nil } end end describe :cites_show do context "for species Diospyros aculeata" do - specify { @species1.cites_show.should be_truthy } + specify { expect(@species1.cites_show).to be_truthy } end context "for species Diospyros acuta" do - specify { @species2.cites_show.should be_falsey } + specify { expect(@species2.cites_show).to be_falsey } end end describe :eu_listing do context 'for species Diospyros aculeata' do - specify { @species1.eu_listing.should == 'B' } + specify { expect(@species1.eu_listing).to eq('B') } end context 'for species Diospyros acuta' do - specify { @species2.eu_listing.should == 'NC' } + specify { expect(@species2.eu_listing).to eq('NC') } end end describe :eu_listed do context "for species Diospyros aculeata" do - specify { @species1.eu_listed.should == false } + specify { expect(@species1.eu_listed).to eq(false) } end context "for species Diospyros acuta" do - specify { @species2.eu_listed.should be_nil } + specify { expect(@species2.eu_listed).to be_nil } end end describe :eu_show do context "for species Diospyros aculeata" do - specify { @species1.eu_show.should be_truthy } + specify { expect(@species1.eu_show).to be_truthy } end context "for species Diospyros acuta" do - specify { @species2.eu_show.should be_falsey } + specify { expect(@species2.eu_show).to be_falsey } end end diff --git a/spec/models/taxon_concept/falconiformes_spec.rb b/spec/models/taxon_concept/falconiformes_spec.rb index ff958a5859..75cebe94a6 100644 --- a/spec/models/taxon_concept/falconiformes_spec.rb +++ b/spec/models/taxon_concept/falconiformes_spec.rb @@ -7,7 +7,7 @@ context "TAXONOMY" do describe :rank_name do context "for Falco hybrid" do - specify { @hybrid.rank_name.should == Rank::GENUS } + specify { expect(@hybrid.rank_name).to eq(Rank::GENUS) } end end end @@ -15,124 +15,124 @@ context "LISTING" do describe :cites_listing do context "for order Falconiformes" do - specify { @order.cites_listing.should == 'I/II/III/NC' } + specify { expect(@order.cites_listing).to eq('I/II/III/NC') } end context "for species Falco araea" do - specify { @species2_1.cites_listing.should == 'I' } + specify { expect(@species2_1.cites_listing).to eq('I') } end context "for species Falco alopex (H)" do - specify { @species2_2.cites_listing.should == 'II' } + specify { expect(@species2_2.cites_listing).to eq('II') } end context "for species Gymnogyps californianus" do - specify { @species1_1.cites_listing.should == 'I' } + specify { expect(@species1_1.cites_listing).to eq('I') } end context "for species Sarcoramphus papa" do - specify { @species1_2.cites_listing.should == 'III' } + specify { expect(@species1_2.cites_listing).to eq('III') } end context "for species Vultur atratus" do - specify { @species1_3.cites_listing.should == 'NC' } + specify { expect(@species1_3.cites_listing).to eq('NC') } end end describe :eu_listing do context "for order Falconiformes" do - specify { @order.eu_listing.should == 'A/B/C/NC' } + specify { expect(@order.eu_listing).to eq('A/B/C/NC') } end context "for species Falco araea" do - specify { @species2_1.eu_listing.should == 'A' } + specify { expect(@species2_1.eu_listing).to eq('A') } end context "for species Falco alopex (H)" do - specify { @species2_2.eu_listing.should == 'B' } + specify { expect(@species2_2.eu_listing).to eq('B') } end context "for species Gymnogyps californianus" do - specify { @species1_1.eu_listing.should == 'A' } + specify { expect(@species1_1.eu_listing).to eq('A') } end context "for species Sarcoramphus papa" do - specify { @species1_2.eu_listing.should == 'C' } + specify { expect(@species1_2.eu_listing).to eq('C') } end context "for species Vultur atratus" do - specify { @species1_3.eu_listing.should == 'NC' } + specify { expect(@species1_3.eu_listing).to eq('NC') } end end describe :cites_status do context "for genus Vultur" do - specify { @genus1_3.cites_status.should == 'EXCLUDED' } + specify { expect(@genus1_3.cites_status).to eq('EXCLUDED') } end context "for species Vultur atratus" do - specify { @species1_3.cites_status.should == 'EXCLUDED' } + specify { expect(@species1_3.cites_status).to eq('EXCLUDED') } end end describe :cites_listed do context "for order Falconiformes" do - specify { @order.cites_listed.should be_truthy } + specify { expect(@order.cites_listed).to be_truthy } end context "for family Falconidae (inclusion in higher taxa listing)" do - specify { @family2.cites_listed.should == false } + specify { expect(@family2.cites_listed).to eq(false) } end context "for genus Falco" do - specify { @genus2_1.cites_listed.should == false } + specify { expect(@genus2_1.cites_listed).to eq(false) } end context "for species Falco araea" do - specify { @species2_1.cites_listed.should be_truthy } + specify { expect(@species2_1.cites_listed).to be_truthy } end context "for species Falco alopex" do - specify { @species2_2.cites_listed.should == false } + specify { expect(@species2_2.cites_listed).to eq(false) } end context "for species Vultur atratus" do - specify { @species1_3.cites_listed.should be_blank } + specify { expect(@species1_3.cites_listed).to be_blank } end context "for subspecies Falco peregrinus peregrinus" do - specify { @subspecies2_3_1.cites_listed.should == false } + specify { expect(@subspecies2_3_1.cites_listed).to eq(false) } end end describe :eu_listed do context "for order Falconiformes" do - specify { @order.eu_listed.should be_truthy } + specify { expect(@order.eu_listed).to be_truthy } end context "for family Falconidae (inclusion in higher taxa listing)" do - specify { @family2.eu_listed.should == false } + specify { expect(@family2.eu_listed).to eq(false) } end context "for genus Falco" do - specify { @genus2_1.eu_listed.should == false } + specify { expect(@genus2_1.eu_listed).to eq(false) } end context "for species Falco araea" do - specify { @species2_1.eu_listed.should be_truthy } + specify { expect(@species2_1.eu_listed).to be_truthy } end context "for species Falco alopex" do - specify { @species2_2.eu_listed.should == false } + specify { expect(@species2_2.eu_listed).to eq(false) } end context "for species Vultur atratus" do - specify { @species1_3.eu_listed.should be_blank } + specify { expect(@species1_3.eu_listed).to be_blank } end context "for subspecies Falco peregrinus peregrinus" do - specify { @subspecies2_3_1.eu_listed.should == false } + specify { expect(@subspecies2_3_1.eu_listed).to eq(false) } end end describe :cites_show do context "for order Falconiformes" do - specify { @order.cites_show.should be_truthy } + specify { expect(@order.cites_show).to be_truthy } end context "for family Falconidae" do - specify { @family2.cites_show.should be_truthy } + specify { expect(@family2.cites_show).to be_truthy } end context "for Falco hybrid" do - specify { @hybrid.cites_show.should be_falsey } + specify { expect(@hybrid.cites_show).to be_falsey } end end describe :show_in_checklist_ac do context "for subspecies Falco peregrinus peregrinus" do - specify { @subspecies2_3_1_ac.show_in_checklist_ac.should be_falsey } + specify { expect(@subspecies2_3_1_ac.show_in_checklist_ac).to be_falsey } end end describe :show_in_species_plus_ac do context "for subspecies Falco peregrinus peregrinus" do - specify { @subspecies2_3_1_ac.show_in_species_plus_ac.should be_truthy } + specify { expect(@subspecies2_3_1_ac.show_in_species_plus_ac).to be_truthy } end end diff --git a/spec/models/taxon_concept/hybrids_spec.rb b/spec/models/taxon_concept/hybrids_spec.rb index 493ecb9f6f..30e5c0b644 100644 --- a/spec/models/taxon_concept/hybrids_spec.rb +++ b/spec/models/taxon_concept/hybrids_spec.rb @@ -30,16 +30,16 @@ } context "when new" do specify { - tc.has_hybrids?.should be_truthy + expect(tc.has_hybrids?).to be_truthy } specify { - hybrid.is_hybrid?.should be_truthy + expect(hybrid.is_hybrid?).to be_truthy } specify { - hybrid.has_hybrid_parents?.should be_truthy + expect(hybrid.has_hybrid_parents?).to be_truthy } specify { - hybrid.full_name.should == 'Lolcatus lolcatus x lolatus' + expect(hybrid.full_name).to eq('Lolcatus lolcatus x lolatus') } end context "when duplicate" do @@ -47,9 +47,9 @@ hybrid.dup } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(0) + end.to change(TaxonConcept, :count).by(0) } end context "when duplicate but author name different" do @@ -59,9 +59,9 @@ res } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(1) + end.to change(TaxonConcept, :count).by(1) } end end diff --git a/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb b/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb index aaae65628d..2c76ff4fd3 100644 --- a/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb +++ b/spec/models/taxon_concept/loxodonta_africana_cms_spec.rb @@ -6,26 +6,26 @@ context "TAXONOMY" do describe :full_name do context "for species Loxodonta africana" do - specify { @species.full_name.should == 'Loxodonta africana' } + specify { expect(@species.full_name).to eq('Loxodonta africana') } end context "for genus Loxodonta" do - specify { @genus.full_name.should == 'Loxodonta' } + specify { expect(@genus.full_name).to eq('Loxodonta') } end end describe :rank do context "for species Loxodonta africana" do - specify { @species.rank_name.should == 'SPECIES' } + specify { expect(@species.rank_name).to eq('SPECIES') } end end describe :ancestors do context "family" do - specify { @species.family_name.should == 'Elephantidae' } + specify { expect(@species.family_name).to eq('Elephantidae') } end context "order" do - specify { @species.order_name.should == 'Proboscidea' } + specify { expect(@species.order_name).to eq('Proboscidea') } end context "class" do - specify { @species.class_name.should == 'Mammalia' } + specify { expect(@species.class_name).to eq('Mammalia') } end end end @@ -33,13 +33,13 @@ context "LISTING" do describe :cms_listing do context "for species Loxodonta africana" do - specify { @species.cms_listing.should == 'II' } + specify { expect(@species.cms_listing).to eq('II') } end end describe :cms_listed do context "for species Loxodonta africana" do - specify { @species.cms_listed.should be_truthy } + specify { expect(@species.cms_listed).to be_truthy } end end end diff --git a/spec/models/taxon_concept/loxodonta_africana_spec.rb b/spec/models/taxon_concept/loxodonta_africana_spec.rb index 8c6a70efa7..e41b70e88e 100644 --- a/spec/models/taxon_concept/loxodonta_africana_spec.rb +++ b/spec/models/taxon_concept/loxodonta_africana_spec.rb @@ -6,15 +6,15 @@ context "TAXONOMY" do describe :full_name do context "for species Loxodonta africana" do - specify { @species.full_name.should == 'Loxodonta africana' } + specify { expect(@species.full_name).to eq('Loxodonta africana') } end context "for genus Loxodonta" do - specify { @genus.full_name.should == 'Loxodonta' } + specify { expect(@genus.full_name).to eq('Loxodonta') } end end describe :rank do context "for species Loxodonta africana" do - specify { @species.rank_name.should == 'SPECIES' } + specify { expect(@species.rank_name).to eq('SPECIES') } end end describe :ancestors do @@ -33,31 +33,31 @@ context "LISTING" do describe :cites_listing do context "for species Loxodonta africana (population split listing)" do - specify { @species.cites_listing.should == 'I/II' } + specify { expect(@species.cites_listing).to eq('I/II') } end end describe :eu_listing do context "for species Loxodonta africana (population split listing)" do - specify { @species.eu_listing.should == 'A/B' } + specify { expect(@species.eu_listing).to eq('A/B') } end end describe :cites_listed do context "for species Loxodonta africana" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end context "for family Elephantidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end end describe :eu_listed do context "for species Loxodonta africana" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end context "for family Elephantidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end end diff --git a/spec/models/taxon_concept/mellivora_capensis_spec.rb b/spec/models/taxon_concept/mellivora_capensis_spec.rb index 6bfb4e2b75..73bf14a5cf 100644 --- a/spec/models/taxon_concept/mellivora_capensis_spec.rb +++ b/spec/models/taxon_concept/mellivora_capensis_spec.rb @@ -6,43 +6,43 @@ context "LISTING" do describe :cites_listing do context "for species Mellivora capensis" do - specify { @species.cites_listing.should == 'III' } + specify { expect(@species.cites_listing).to eq('III') } end end describe :eu_listing do context "for species Mellivora capensis" do - specify { @species.eu_listing.should == 'C' } + specify { expect(@species.eu_listing).to eq('C') } end end describe :cites_listed do context "for family Mustelinae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Mellivora" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Mellivora capensis" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end end describe :eu_listed do context "for family Mustelinae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Mellivora" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Mellivora capensis" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end describe :current_party_ids do context "for species Mellivora capensis" do - specify { @species.current_parties_ids.should == [GeoEntity.find_by_iso_code2('BW').id] } + specify { expect(@species.current_parties_ids).to eq([GeoEntity.find_by_iso_code2('BW').id]) } end end diff --git a/spec/models/taxon_concept/moschus_spec.rb b/spec/models/taxon_concept/moschus_spec.rb index 96a8f1ea76..a3d8375ae8 100644 --- a/spec/models/taxon_concept/moschus_spec.rb +++ b/spec/models/taxon_concept/moschus_spec.rb @@ -7,31 +7,31 @@ context "LISTING" do describe :cites_listing do context "for genus Moschus" do - specify { @genus.cites_listing.should == 'I/II' } + specify { expect(@genus.cites_listing).to eq('I/II') } end context "for species Moschus leucogaster" do - specify { @species1.cites_listing.should == 'I' } + specify { expect(@species1.cites_listing).to eq('I') } end context "for species Moschus moschiferus" do - specify { @species2.cites_listing.should == 'II' } + specify { expect(@species2.cites_listing).to eq('II') } end context "for subspecies Moschus moschiferus moschiferus" do - specify { @subspecies.cites_listing.should == 'II' } + specify { expect(@subspecies.cites_listing).to eq('II') } end end describe :cites_listed do context "for genus Moschus" do - specify { @genus.cites_listed.should be_truthy } + specify { expect(@genus.cites_listed).to be_truthy } end context "for species Moschus leucogaster" do - specify { @species1.cites_listed.should == false } + specify { expect(@species1.cites_listed).to eq(false) } end context "for species Moschus moschiferus" do - specify { @species2.cites_listed.should == false } + specify { expect(@species2.cites_listed).to eq(false) } end context "for subspecies Moschus moschiferus moschiferus" do - specify { @subspecies.cites_listed.should == false } + specify { expect(@subspecies.cites_listed).to eq(false) } end end end @@ -40,29 +40,29 @@ describe :current_cites_additions do context "for species Moschus leucogaster" do specify { - @species1.current_cites_additions.size.should == 1 + expect(@species1.current_cites_additions.size).to eq(1) addition = @species1.current_cites_additions.first - addition.original_taxon_concept_id.should == @genus.id + expect(addition.original_taxon_concept_id).to eq(@genus.id) # should inherit just the I listing from split listed genus - addition.species_listing_name.should == 'I' + expect(addition.species_listing_name).to eq('I') } end context "for species Moschus moschiferus" do specify { - @species2.current_cites_additions.size.should == 1 + expect(@species2.current_cites_additions.size).to eq(1) addition = @species2.current_cites_additions.first - addition.original_taxon_concept_id.should == @genus.id + expect(addition.original_taxon_concept_id).to eq(@genus.id) # should inherit just the II listing from split listed genus - addition.species_listing_name.should == 'II' + expect(addition.species_listing_name).to eq('II') } end context "for subspecies Moschus moschiferus moschiferus" do specify { - @subspecies.current_cites_additions.size.should == 1 + expect(@subspecies.current_cites_additions.size).to eq(1) addition = @subspecies.current_cites_additions.first - addition.original_taxon_concept_id.should == @genus.id + expect(addition.original_taxon_concept_id).to eq(@genus.id) # should inherit just the II listing from split listed genus - addition.species_listing_name.should == 'II' + expect(addition.species_listing_name).to eq('II') } end end diff --git a/spec/models/taxon_concept/natator_depressus_spec.rb b/spec/models/taxon_concept/natator_depressus_spec.rb index 498c9a0e92..09a24dc656 100644 --- a/spec/models/taxon_concept/natator_depressus_spec.rb +++ b/spec/models/taxon_concept/natator_depressus_spec.rb @@ -7,10 +7,10 @@ context "LISTING" do describe :cites_listing do context "for family Cheloniidae" do - specify { @family.cites_listing.should == 'I' } + specify { expect(@family.cites_listing).to eq('I') } end context "for species Natator depressus" do - specify { @species.cites_listing.should == 'I' } + specify { expect(@species.cites_listing).to eq('I') } end end diff --git a/spec/models/taxon_concept/notomys_aquilo_spec.rb b/spec/models/taxon_concept/notomys_aquilo_spec.rb index a17cfcb41e..b3e27c07d9 100644 --- a/spec/models/taxon_concept/notomys_aquilo_spec.rb +++ b/spec/models/taxon_concept/notomys_aquilo_spec.rb @@ -7,19 +7,19 @@ context "LISTING" do describe :cites_listing do context "for genus Notomys" do - specify { @genus.cites_listing.should == 'NC' } + specify { expect(@genus.cites_listing).to eq('NC') } end context "for species Notomys aquilo" do - specify { @species.cites_listing.should == 'NC' } + specify { expect(@species.cites_listing).to eq('NC') } end end describe :cites_show do context "for genus Notomys" do - specify { @genus.cites_show.should be_falsey } + specify { expect(@genus.cites_show).to be_falsey } end context "for species Notomys aquilo" do - specify { @species.cites_show.should be_falsey } + specify { expect(@species.cites_show).to be_falsey } end end diff --git a/spec/models/taxon_concept/panax_ginseng_spec.rb b/spec/models/taxon_concept/panax_ginseng_spec.rb index fa7ce59242..c583c453d2 100644 --- a/spec/models/taxon_concept/panax_ginseng_spec.rb +++ b/spec/models/taxon_concept/panax_ginseng_spec.rb @@ -8,43 +8,43 @@ describe :cites_listed do context "for species Panax ginseng" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end context "for genus Panax" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end end describe :eu_listed do context "for species Panax ginseng" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end context "for genus Panax" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end end describe :cites_listing do context "for species Panax ginseng" do - specify { @species.cites_listing.should == 'II/NC' } + specify { expect(@species.cites_listing).to eq('II/NC') } end end describe :eu_listing do context "for species Panax ginseng" do - specify { @species.eu_listing.should == 'B/NC' } + specify { expect(@species.eu_listing).to eq('B/NC') } end end describe :ann_symbol do context "for species Panax ginseng" do - specify { @species.ann_symbol.should_not be_blank } + specify { expect(@species.ann_symbol).not_to be_blank } end end describe :hash_ann_symbol do context "for species Panax ginseng" do - specify { @species.hash_ann_symbol.should == '#3' } + specify { expect(@species.hash_ann_symbol).to eq('#3') } end end end diff --git a/spec/models/taxon_concept/pereskia_spec.rb b/spec/models/taxon_concept/pereskia_spec.rb index 44220e6039..8784c72374 100644 --- a/spec/models/taxon_concept/pereskia_spec.rb +++ b/spec/models/taxon_concept/pereskia_spec.rb @@ -7,55 +7,55 @@ context "LISTING" do describe :cites_listing do context "for genus Pereskia (not listed, shown)" do - specify { @genus1.cites_listing.should == 'NC' } + specify { expect(@genus1.cites_listing).to eq('NC') } end context "for genus Ariocarpus" do - specify { @genus2.cites_listing.should == 'I' } + specify { expect(@genus2.cites_listing).to eq('I') } end context "for family Cactaceae" do - specify { @family.cites_listing.should == 'I/II/NC' } + specify { expect(@family.cites_listing).to eq('I/II/NC') } end end describe :eu_listing do context "for genus Pereskia (not listed, shown)" do - specify { @genus1.eu_listing.should == 'NC' } + specify { expect(@genus1.eu_listing).to eq('NC') } end context "for genus Ariocarpus" do - specify { @genus2.eu_listing.should == 'A' } + specify { expect(@genus2.eu_listing).to eq('A') } end context "for family Cactaceae" do - specify { @family.eu_listing.should == 'A/B/NC' } + specify { expect(@family.eu_listing).to eq('A/B/NC') } end end describe :cites_listed do context "for family Cactaceae" do - specify { @family.cites_listed.should be_truthy } + specify { expect(@family.cites_listed).to be_truthy } end context "for genus Pereskia" do - specify { @genus1.cites_listed.should be_nil } + specify { expect(@genus1.cites_listed).to be_nil } end end describe :eu_listed do context "for family Cactaceae" do - specify { @family.eu_listed.should be_truthy } + specify { expect(@family.eu_listed).to be_truthy } end context "for genus Pereskia" do - specify { @genus1.eu_listed.should be_nil } + specify { expect(@genus1.eu_listed).to be_nil } end end describe :cites_status do context "for genus Pereskia" do - specify { @genus1.cites_status.should == 'EXCLUDED' } + specify { expect(@genus1.cites_status).to eq('EXCLUDED') } end end describe :cites_show do context "for genus Pereskia" do - specify { @genus1.cites_show.should == true } + specify { expect(@genus1.cites_show).to eq(true) } end end diff --git a/spec/models/taxon_concept/platysternon_megacephalum_spec.rb b/spec/models/taxon_concept/platysternon_megacephalum_spec.rb index fb86c24c1d..63316c582f 100644 --- a/spec/models/taxon_concept/platysternon_megacephalum_spec.rb +++ b/spec/models/taxon_concept/platysternon_megacephalum_spec.rb @@ -7,43 +7,43 @@ context "LISTING" do describe :cites_listing do context 'for family Platysternidae' do - specify { @family.cites_listing.should == 'I' } + specify { expect(@family.cites_listing).to eq('I') } end context 'for species Platysternon megacephalum' do - specify { @species.cites_listing.should == 'I' } + specify { expect(@species.cites_listing).to eq('I') } end end describe :cites_listed do context "for species Platysternon megacephalum" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end end describe :cites_show do context "for species Platysternon megacephalum" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end end describe :eu_listing do context 'for family Platysternidae' do - specify { @family.eu_listing.should == 'A' } + specify { expect(@family.eu_listing).to eq('A') } end context 'for species Platysternon megacephalum' do - specify { @species.eu_listing.should == 'A' } + specify { expect(@species.eu_listing).to eq('A') } end end describe :eu_listed do context "for species Platysternon megacephalum" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end end describe :eu_show do context "for species Platysternon megacephalum" do - specify { @species.eu_show.should be_truthy } + specify { expect(@species.eu_show).to be_truthy } end end diff --git a/spec/models/taxon_concept/pristis_microdon_spec.rb b/spec/models/taxon_concept/pristis_microdon_spec.rb index 2de1a66f31..bbef9fb494 100644 --- a/spec/models/taxon_concept/pristis_microdon_spec.rb +++ b/spec/models/taxon_concept/pristis_microdon_spec.rb @@ -7,43 +7,43 @@ context "LISTING" do describe :cites_listing do context 'for family Pristidae' do - specify { @family.cites_listing.should == 'I' } + specify { expect(@family.cites_listing).to eq('I') } end context 'for species Pristis microdon' do - specify { @species.cites_listing.should == 'I' } + specify { expect(@species.cites_listing).to eq('I') } end end describe :cites_listed do context "for species Pristis microdon" do - specify { @species.cites_listed.should == false } + specify { expect(@species.cites_listed).to eq(false) } end end describe :cites_show do context "for species Pristis microdon" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end end describe :eu_listing do context 'for family Pristidae' do - specify { @family.eu_listing.should == 'A' } + specify { expect(@family.eu_listing).to eq('A') } end context 'for species Pristis microdon' do - specify { @species.eu_listing.should == 'A' } + specify { expect(@species.eu_listing).to eq('A') } end end describe :eu_listed do context "for species Pristis microdon" do - specify { @species.eu_listed.should == false } + specify { expect(@species.eu_listed).to eq(false) } end end describe :eu_show do context "for species Pristis microdon" do - specify { @species.eu_show.should be_truthy } + specify { expect(@species.eu_show).to be_truthy } end end diff --git a/spec/models/taxon_concept/pseudomys_fieldi_spec.rb b/spec/models/taxon_concept/pseudomys_fieldi_spec.rb index f32afd4544..5eef23dee9 100644 --- a/spec/models/taxon_concept/pseudomys_fieldi_spec.rb +++ b/spec/models/taxon_concept/pseudomys_fieldi_spec.rb @@ -7,28 +7,28 @@ context "LISTING" do describe :cites_listing do context "for subspecies Pseudomys fieldi preaconis" do - specify { @subspecies.cites_listing.should == 'I' } + specify { expect(@subspecies.cites_listing).to eq('I') } end context "for species Pseudomys fieldi" do - specify { @species.cites_listing.should == 'I/NC' } + specify { expect(@species.cites_listing).to eq('I/NC') } end end describe :eu_listing do context "for subspecies Pseudomys fieldi preaconis" do - specify { @subspecies.eu_listing.should == 'A' } + specify { expect(@subspecies.eu_listing).to eq('A') } end context "for species Pseudomys fieldi" do - specify { @species.eu_listing.should == 'A/NC' } + specify { expect(@species.eu_listing).to eq('A/NC') } end end describe :cites_show do context "for subspecies Pseudomys fieldi preaconis" do - specify { @subspecies.cites_show.should be_truthy } + specify { expect(@subspecies.cites_show).to be_truthy } end context "for species Pseudomys fieldi" do - specify { @species.cites_show.should be_truthy } + specify { expect(@species.cites_show).to be_truthy } end end diff --git a/spec/models/taxon_concept/psittaciformes_spec.rb b/spec/models/taxon_concept/psittaciformes_spec.rb index 2eb2fb82d6..a5a6216861 100644 --- a/spec/models/taxon_concept/psittaciformes_spec.rb +++ b/spec/models/taxon_concept/psittaciformes_spec.rb @@ -7,136 +7,136 @@ context "LISTING" do describe :cites_listing do context "for order Psittaciformes" do - specify { @order.cites_listing.should == 'I/II/NC' } + specify { expect(@order.cites_listing).to eq('I/II/NC') } end context "for species Cacatua goffiniana" do - specify { @species1_2_1.cites_listing.should == 'I' } + specify { expect(@species1_2_1.cites_listing).to eq('I') } end context "for species Cacatua ducorpsi (H)" do - specify { @species1_2_2.cites_listing.should == 'II' } + specify { expect(@species1_2_2.cites_listing).to eq('II') } end context "for species Probosciger aterrimus" do - specify { @species1_1.cites_listing.should == 'I' } + specify { expect(@species1_1.cites_listing).to eq('I') } end context "for species Amazona aestiva" do - specify { @species2_2_1.cites_listing.should == 'II' } + specify { expect(@species2_2_1.cites_listing).to eq('II') } end context "for species Agapornis roseicollis (DEL II, not listed, not shown)" do - specify { @species2_1.cites_listing.should == 'NC' } + specify { expect(@species2_1.cites_listing).to eq('NC') } end context "for species Psittacula krameri (DEL III, not listed, not shown)" do - specify { @species2_3.cites_listing.should == 'NC' } + specify { expect(@species2_3.cites_listing).to eq('NC') } end context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.cites_listing.should == 'II' } + specify { expect(@subspecies2_2_2_1.cites_listing).to eq('II') } end end describe :eu_listing do context "for order Psittaciformes" do - specify { @order.eu_listing.should == 'A/B/NC' } + specify { expect(@order.eu_listing).to eq('A/B/NC') } end context "for species Cacatua goffiniana" do - specify { @species1_2_1.eu_listing.should == 'A' } + specify { expect(@species1_2_1.eu_listing).to eq('A') } end context "for species Cacatua ducorpsi (H)" do - specify { @species1_2_2.eu_listing.should == 'B' } + specify { expect(@species1_2_2.eu_listing).to eq('B') } end context "for species Probosciger aterrimus" do - specify { @species1_1.eu_listing.should == 'A' } + specify { expect(@species1_1.eu_listing).to eq('A') } end context "for species Amazona aestiva" do - specify { @species2_2_1.eu_listing.should == 'B' } + specify { expect(@species2_2_1.eu_listing).to eq('B') } end context "for species Agapornis roseicollis (DEL II, not listed, not shown)" do - specify { @species2_1.eu_listing.should == 'NC' } + specify { expect(@species2_1.eu_listing).to eq('NC') } end context "for species Psittacula krameri (DEL III, not listed, not shown)" do - specify { @species2_3.eu_listing.should == 'NC' } + specify { expect(@species2_3.eu_listing).to eq('NC') } end context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.eu_listing.should == 'B' } + specify { expect(@subspecies2_2_2_1.eu_listing).to eq('B') } end end describe :cites_listed do context "for order Psittaciformes" do - specify { @order.cites_listed.should be_truthy } + specify { expect(@order.cites_listed).to be_truthy } end context "for family Cacatuidae" do - specify { @family1.cites_listed.should == false } + specify { expect(@family1.cites_listed).to eq(false) } end context "for genus Cacatua" do - specify { @genus1_2.cites_listed.should == false } + specify { expect(@genus1_2.cites_listed).to eq(false) } end context "for species Cacatua goffiniana" do - specify { @species1_2_1.cites_listed.should be_truthy } + specify { expect(@species1_2_1.cites_listed).to be_truthy } end context "for species Cacatua ducorpsi" do - specify { @species1_2_2.cites_listed.should == false } + specify { expect(@species1_2_2.cites_listed).to eq(false) } end context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.cites_listed.should == false } + specify { expect(@subspecies2_2_2_1.cites_listed).to eq(false) } end end describe :eu_listed do context "for order Psittaciformes" do - specify { @order.eu_listed.should be_truthy } + specify { expect(@order.eu_listed).to be_truthy } end context "for family Cacatuidae" do - specify { @family1.eu_listed.should == false } + specify { expect(@family1.eu_listed).to eq(false) } end context "for genus Cacatua" do - specify { @genus1_2.eu_listed.should == false } + specify { expect(@genus1_2.eu_listed).to eq(false) } end context "for species Cacatua goffiniana" do - specify { @species1_2_1.eu_listed.should be_truthy } + specify { expect(@species1_2_1.eu_listed).to be_truthy } end context "for species Cacatua ducorpsi" do - specify { @species1_2_2.eu_listed.should == false } + specify { expect(@species1_2_2.eu_listed).to eq(false) } end context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.eu_listed.should == false } + specify { expect(@subspecies2_2_2_1.eu_listed).to eq(false) } end end describe :cites_show do context "for species Agapornis roseicollis (DEL II)" do - specify { @species2_1.cites_show.should be_truthy } + specify { expect(@species2_1.cites_show).to be_truthy } end context "for species Amazona aestiva" do - specify { @species2_2_1.cites_show.should be_truthy } + specify { expect(@species2_2_1.cites_show).to be_truthy } end context "for species Psittacula krameri (DEL III)" do - specify { @species2_3.cites_show.should be_truthy } + specify { expect(@species2_3.cites_show).to be_truthy } end end describe :cites_status do context "for species Agapornis roseicollis (DEL II)" do - specify { @species2_1.cites_status.should == 'EXCLUDED' } + specify { expect(@species2_1.cites_status).to eq('EXCLUDED') } end context "for species Psittacula krameri (DEL III)" do - specify { @species2_3.cites_status.should == 'EXCLUDED' } + specify { expect(@species2_3.cites_status).to eq('EXCLUDED') } end end describe :show_in_checklist_ac do context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1_ac.show_in_checklist_ac.should be_falsey } + specify { expect(@subspecies2_2_2_1_ac.show_in_checklist_ac).to be_falsey } end end describe :show_in_species_plus_ac do context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1_ac.show_in_species_plus_ac.should be_falsey } + specify { expect(@subspecies2_2_2_1_ac.show_in_species_plus_ac).to be_falsey } end end describe :show_in_species_plus do context "for subspecies Amazona festiva festiva" do - specify { @subspecies2_2_2_1.show_in_species_plus.should be_falsey } + specify { expect(@subspecies2_2_2_1.show_in_species_plus).to be_falsey } end end diff --git a/spec/models/taxon_concept/synonyms_spec.rb b/spec/models/taxon_concept/synonyms_spec.rb index 8097264efe..8b696ec7c2 100644 --- a/spec/models/taxon_concept/synonyms_spec.rb +++ b/spec/models/taxon_concept/synonyms_spec.rb @@ -30,16 +30,16 @@ } context "when new" do specify { - tc.has_synonyms?.should be_truthy + expect(tc.has_synonyms?).to be_truthy } specify { - synonym.is_synonym?.should be_truthy + expect(synonym.is_synonym?).to be_truthy } specify { - synonym.has_accepted_names?.should be_truthy + expect(synonym.has_accepted_names?).to be_truthy } specify { - synonym.full_name.should == 'Lolcatus lolus' + expect(synonym.full_name).to eq('Lolcatus lolus') } end context "when duplicate" do @@ -47,9 +47,9 @@ synonym.dup } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(0) + end.to change(TaxonConcept, :count).by(0) } end context "when duplicate but author name different" do @@ -59,9 +59,9 @@ res } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(1) + end.to change(TaxonConcept, :count).by(1) } end context "when has accepted parent" do @@ -84,13 +84,13 @@ ) end # should not modify a synonym's full name when saving - specify { @synonym.full_name.should == 'Lolcatus lolus furiatus' } + specify { expect(@synonym.full_name).to eq('Lolcatus lolus furiatus') } context "overnight calculations" do before(:each) do Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings end # should not modify a synonym's full name overnight - specify { @synonym.reload.full_name.should == 'Lolcatus lolus furiatus' } + specify { expect(@synonym.reload.full_name).to eq('Lolcatus lolus furiatus') } end end end diff --git a/spec/models/taxon_concept/tapiridae_spec.rb b/spec/models/taxon_concept/tapiridae_spec.rb index 39d3110960..e4dd41a5a9 100644 --- a/spec/models/taxon_concept/tapiridae_spec.rb +++ b/spec/models/taxon_concept/tapiridae_spec.rb @@ -6,12 +6,12 @@ context "TAXONOMY" do describe :full_name do context "for family Tapiridae" do - specify { @family.full_name.should == 'Tapiridae' } + specify { expect(@family.full_name).to eq('Tapiridae') } end end describe :rank do context "for family Tapiridae" do - specify { @family.rank_name.should == 'FAMILY' } + specify { expect(@family.rank_name).to eq('FAMILY') } end end describe :ancestors do @@ -27,43 +27,43 @@ context "LISTING" do describe :cites_listing do context "for family Tapiridae" do - specify { @family.cites_listing.should == 'I/II' } + specify { expect(@family.cites_listing).to eq('I/II') } end context "for species Tapirus terrestris" do - specify { @species.cites_listing.should == 'II' } + specify { expect(@species.cites_listing).to eq('II') } end end describe :eu_listing do context "for family Tapiridae" do - specify { @family.eu_listing.should == 'A/B' } + specify { expect(@family.eu_listing).to eq('A/B') } end context "for species Tapirus terrestris" do - specify { @species.eu_listing.should == 'B' } + specify { expect(@species.eu_listing).to eq('B') } end end describe :cites_listed do context "for family Tapiridae" do - specify { @family.cites_listed.should be_truthy } + specify { expect(@family.cites_listed).to be_truthy } end context "for genus Tapirus" do - specify { @genus.cites_listed.should == false } + specify { expect(@genus.cites_listed).to eq(false) } end context "for species Tapirus terrestris" do - specify { @species.cites_listed.should be_truthy } + specify { expect(@species.cites_listed).to be_truthy } end end describe :eu_listed do context "for family Tapiridae" do - specify { @family.eu_listed.should be_truthy } + specify { expect(@family.eu_listed).to be_truthy } end context "for genus Tapirus" do - specify { @genus.eu_listed.should == false } + specify { expect(@genus.eu_listed).to eq(false) } end context "for species Tapirus terrestris" do - specify { @species.eu_listed.should be_truthy } + specify { expect(@species.eu_listed).to be_truthy } end end end diff --git a/spec/models/taxon_concept/trade_names_spec.rb b/spec/models/taxon_concept/trade_names_spec.rb index 57e3d7babb..73fddb12fc 100644 --- a/spec/models/taxon_concept/trade_names_spec.rb +++ b/spec/models/taxon_concept/trade_names_spec.rb @@ -30,16 +30,16 @@ } context "when new" do specify { - tc.has_trade_names?.should be_truthy + expect(tc.has_trade_names?).to be_truthy } specify { - trade_name.is_trade_name?.should be_truthy + expect(trade_name.is_trade_name?).to be_truthy } specify { - trade_name.has_accepted_names_for_trade_name?.should be_truthy + expect(trade_name.has_accepted_names_for_trade_name?).to be_truthy } specify { - trade_name.full_name.should == 'Lolcatus lolus' + expect(trade_name.full_name).to eq('Lolcatus lolus') } end context "when duplicate" do @@ -47,9 +47,9 @@ trade_name.dup } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(0) + end.to change(TaxonConcept, :count).by(0) } end context "when duplicate but author name different" do @@ -59,9 +59,9 @@ res } specify { - lambda do + expect do duplicate.save - end.should change(TaxonConcept, :count).by(1) + end.to change(TaxonConcept, :count).by(1) } end context "when has accepted parent" do @@ -84,13 +84,13 @@ ) end # should not modify a trade_name's full name when saving - specify { @trade_name.full_name.should == 'Lolcatus lolus furiatus' } + specify { expect(@trade_name.full_name).to eq('Lolcatus lolus furiatus') } context "overnight calculations" do before(:each) do Sapi::StoredProcedures.rebuild_cites_taxonomy_and_listings end # should not modify a trade_name's full name overnight - specify { @trade_name.reload.full_name.should == 'Lolcatus lolus furiatus' } + specify { expect(@trade_name.reload.full_name).to eq('Lolcatus lolus furiatus') } end end end diff --git a/spec/models/taxon_concept/uroplatus_spec.rb b/spec/models/taxon_concept/uroplatus_spec.rb index 319db64f14..ea9ff61ef0 100644 --- a/spec/models/taxon_concept/uroplatus_spec.rb +++ b/spec/models/taxon_concept/uroplatus_spec.rb @@ -7,70 +7,70 @@ context "REFERENCES" do describe :cites_accepted do context "for genus Uroplatus" do - specify { @genus.cites_accepted.should == false } + specify { expect(@genus.cites_accepted).to eq(false) } end context "for species Uroplatus alluaudi" do - specify { @species1.cites_accepted.should == false } + specify { expect(@species1.cites_accepted).to eq(false) } end context "for species Uroplatus giganteus" do - specify { @species2.cites_accepted.should be_truthy } + specify { expect(@species2.cites_accepted).to be_truthy } end end describe :standard_taxon_concept_references do context "for family Gekkonidae" do - specify { @family.taxon_concept.standard_taxon_concept_references.should be_empty } + specify { expect(@family.taxon_concept.standard_taxon_concept_references).to be_empty } end context "for genus Uroplatus" do - specify { @genus.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should be_empty } + specify { expect(@genus.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to be_empty } end context "for species Uroplatus alluaudi" do - specify { @species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should be_empty } + specify { expect(@species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to be_empty } end context "for species Uroplatus giganteus" do - specify { @species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref.id } + specify { expect(@species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref.id } end end end context "LISTING" do describe :cites_listing do context "for genus Uroplatus" do - specify { @genus.cites_listing.should == 'II' } + specify { expect(@genus.cites_listing).to eq('II') } end context "for species Uroplatus giganteus" do - specify { @species2.cites_listing.should == 'II' } + specify { expect(@species2.cites_listing).to eq('II') } end end describe :eu_listing do context "for genus Uroplatus" do - specify { @genus.eu_listing.should == 'B' } + specify { expect(@genus.eu_listing).to eq('B') } end context "for species Uroplatus giganteus" do - specify { @species2.eu_listing.should == 'B' } + specify { expect(@species2.eu_listing).to eq('B') } end end describe :cites_listed do context "for family Gekkonidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Uroplatus" do - specify { @genus.cites_listed.should be_truthy } + specify { expect(@genus.cites_listed).to be_truthy } end context "for species Uroplatus giganteus" do - specify { @species2.cites_listed.should == false } + specify { expect(@species2.cites_listed).to eq(false) } end end describe :eu_listed do context "for family Gekkonidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Uroplatus" do - specify { @genus.eu_listed.should be_truthy } + specify { expect(@genus.eu_listed).to be_truthy } end context "for species Uroplatus giganteus" do - specify { @species2.eu_listed.should == false } + specify { expect(@species2.eu_listed).to eq(false) } end end diff --git a/spec/models/taxon_concept/validation_spec.rb b/spec/models/taxon_concept/validation_spec.rb index 25a50ad324..2f340605b6 100644 --- a/spec/models/taxon_concept/validation_spec.rb +++ b/spec/models/taxon_concept/validation_spec.rb @@ -16,7 +16,7 @@ :parent_id => kingdom_tc.id ) } - specify { tc.valid? should be_truthy } + specify { tc.valid? is_expected.to be_truthy } end context "taxonomy does not match parent" do let(:tc) { @@ -25,7 +25,7 @@ :parent_id => kingdom_tc.id ) } - specify { tc.should have(1).error_on(:parent_id) } + specify { expect(tc.error_on(:parent_id).size).to eq(1) } end context "parent is not an accepted name" do let(:genus_tc) { @@ -40,7 +40,7 @@ :parent_id => genus_tc.id ) } - specify { tc.should have(1).error_on(:parent_id) } + specify { expect(tc.error_on(:parent_id).size).to eq(1) } end context "parent rank is too high above child rank" do let(:tc) { @@ -49,7 +49,7 @@ :parent_id => kingdom_tc.id ) } - specify { tc.should have(1).error_on(:parent_id) } + specify { expect(tc.error_on(:parent_id).size).to eq(1) } end context "parent rank is below child rank" do let(:parent) { @@ -64,7 +64,7 @@ :parent_id => parent.id ) } - specify { tc.should have(1).error_on(:parent_id) } + specify { expect(tc.error_on(:parent_id).size).to eq(1) } end context "scientific name is not given" do let(:tc) { @@ -74,7 +74,7 @@ :taxon_name => build(:taxon_name, :scientific_name => nil) ) } - specify { tc.should have(1).error_on(:taxon_name_id) } + specify { expect(tc.error_on(:taxon_name_id).size).to eq(1) } end context "when taxonomic position malformed" do let(:tc) { @@ -84,7 +84,7 @@ :taxonomic_position => '1.a.b' ) } - specify { tc.should have(1).error_on(:taxonomic_position) } + specify { expect(tc.error_on(:taxonomic_position).size).to eq(1) } end context "when full name is already given" do let(:tc_parent) { create_cites_eu_species } @@ -100,7 +100,7 @@ taxon_name: build(:taxon_name, scientific_name: 'duplicatus') ) } - specify { tc2.should have(1).error_on(:full_name) } + specify { expect(tc2.error_on(:full_name).size).to eq(1) } end end context "update" do @@ -132,17 +132,17 @@ let!(:species_child) { create_cites_eu_subspecies(parent_id: species.id) } specify "cannot change taxonomy when dependents present" do species.taxonomy = cms - expect(species).to have(1).error_on(:taxonomy_id) + expect(species.error_on(:taxonomy_id).size).to eq(1) end end context "scientific name" do specify "cannot change species scientific name" do species.scientific_name = 'Vulgaris' - expect(species).to have(1).error_on(:full_name) + expect(species.error_on(:full_name).size).to eq(1) end specify "cannot change genus scientific name" do genus.scientific_name = 'Felis' - expect(genus).to have(1).error_on(:full_name) + expect(genus.error_on(:full_name).size).to eq(1) end end context "parent" do @@ -159,25 +159,25 @@ end specify "cannot change A species parent" do species.parent = new_genus - expect(species).to have(1).error_on(:full_name) + expect(species.error_on(:full_name).size).to eq(1) end specify "can change S species parent" do s_species.parent = new_genus - expect(s_species).to have(0).error_on(:full_name) + expect(s_species.error_on(:full_name).size).to eq(0) end specify "can change A genus parent" do genus.parent = new_family - expect(genus).to have(0).error_on(:full_name) + expect(genus.error_on(:full_name).size).to eq(0) end end context "rank" do specify "cannot change A species rank" do species.rank = create(:rank, name: 'GENUS') - expect(species).to have(1).error_on(:full_name) + expect(species.error_on(:full_name).size).to eq(1) end specify "can change S species rank" do s_species.rank = create(:rank, name: 'GENUS') - expect(s_species).to have(0).error_on(:full_name) + expect(s_species.error_on(:full_name).size).to eq(0) end end end diff --git a/spec/models/taxon_concept/varanidae_spec.rb b/spec/models/taxon_concept/varanidae_spec.rb index 864e5ba393..3dbb782a63 100644 --- a/spec/models/taxon_concept/varanidae_spec.rb +++ b/spec/models/taxon_concept/varanidae_spec.rb @@ -7,65 +7,65 @@ context "REFERENCES" do describe :cites_accepted do context "for species Varanus bengalensis" do - specify { @species1.cites_accepted.should be_truthy } + specify { expect(@species1.cites_accepted).to be_truthy } end end describe :standard_taxon_concept_references do context "for order Sauria" do - specify { @order.taxon_concept.standard_taxon_concept_references.should be_empty } + specify { expect(@order.taxon_concept.standard_taxon_concept_references).to be_empty } end context "for family Varanidae" do - specify { @family.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref1.id } + specify { expect(@family.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref1.id } end context "for species Varanus bengalensis" do - specify { @species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref1.id } + specify { expect(@species1.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref1.id } end context "for species Varanus bushi" do - specify { @species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref1.id } - specify { @species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id).should include @ref2.id } + specify { expect(@species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref1.id } + specify { expect(@species2.taxon_concept.standard_taxon_concept_references.map(&:reference_id)).to include @ref2.id } end end end context "LISTING" do describe :cites_listing do context "for genus Varanus" do - specify { @genus.cites_listing.should == 'I/II' } + specify { expect(@genus.cites_listing).to eq('I/II') } end context "for species Varanus bengalensis" do - specify { @species1.cites_listing.should == 'I' } + specify { expect(@species1.cites_listing).to eq('I') } end end describe :eu_listing do context "for genus Varanus" do - specify { @genus.eu_listing.should == 'A/B' } + specify { expect(@genus.eu_listing).to eq('A/B') } end context "for species Varanus bengalensis" do - specify { @species1.eu_listing.should == 'A' } + specify { expect(@species1.eu_listing).to eq('A') } end end describe :cites_listed do context "for family Varanidae" do - specify { @family.cites_listed.should == false } + specify { expect(@family.cites_listed).to eq(false) } end context "for genus Varanus" do - specify { @genus.cites_listed.should be_truthy } + specify { expect(@genus.cites_listed).to be_truthy } end context "for species Varanus bengalensis" do - specify { @species1.cites_listed.should be_truthy } + specify { expect(@species1.cites_listed).to be_truthy } end end describe :eu_listed do context "for family Varanidae" do - specify { @family.eu_listed.should == false } + specify { expect(@family.eu_listed).to eq(false) } end context "for genus Varanus" do - specify { @genus.eu_listed.should be_truthy } + specify { expect(@genus.eu_listed).to be_truthy } end context "for species Varanus bengalensis" do - specify { @species1.eu_listed.should be_truthy } + specify { expect(@species1.eu_listed).to be_truthy } end end diff --git a/spec/models/taxon_concept_prefix_matcher_spec.rb b/spec/models/taxon_concept_prefix_matcher_spec.rb index 709e3c75e5..69736f7875 100644 --- a/spec/models/taxon_concept_prefix_matcher_spec.rb +++ b/spec/models/taxon_concept_prefix_matcher_spec.rb @@ -50,8 +50,8 @@ SearchParams.new(:taxonomy => { :id => taxonomy.id }, :scientific_name => 'Ab') } let(:matcher) { TaxonConceptPrefixMatcher.new matcher_params } - specify { matcher.taxon_concepts.should include(taxon_concept4) } - specify { matcher.taxon_concepts.should_not include(hybrid) } + specify { expect(matcher.taxon_concepts).to include(taxon_concept4) } + specify { expect(matcher.taxon_concepts).not_to include(hybrid) } end context "when name status H" do @@ -59,8 +59,8 @@ SearchParams.new(:taxonomy => { :id => taxonomy.id }, :scientific_name => 'Ab', :name_status => 'H') } let(:matcher) { TaxonConceptPrefixMatcher.new matcher_params } - specify { matcher.taxon_concepts.should_not include(taxon_concept4) } - specify { matcher.taxon_concepts.should include(hybrid) } + specify { expect(matcher.taxon_concepts).not_to include(taxon_concept4) } + specify { expect(matcher.taxon_concepts).to include(hybrid) } end context "when rank scope applied" do @@ -76,8 +76,9 @@ } specify { - parent_matcher.taxon_concepts.map(&:full_name).should == + expect(parent_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aab', 'Aac'] + ) } let(:ancestor_matcher_params) { @@ -92,8 +93,9 @@ } specify { - ancestor_matcher.taxon_concepts.map(&:full_name).should == + expect(ancestor_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aaa'] + ) } let(:self_and_ancestor_matcher_params) { @@ -108,8 +110,9 @@ } specify { - self_and_ancestor_matcher.taxon_concepts.map(&:full_name).should == + expect(self_and_ancestor_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aaa', 'Aaab'] + ) } end @@ -126,8 +129,9 @@ } specify { - ancestor_matcher.taxon_concepts.map(&:full_name).should == + expect(ancestor_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aaa', 'Aab', 'Aac'] + ) } let(:descendant_matcher_params) { @@ -142,8 +146,9 @@ } specify { - descendant_matcher.taxon_concepts.map(&:full_name).should == + expect(descendant_matcher.taxon_concepts.map(&:full_name)).to eq( ['Aaab', 'Aab', 'Abb'] + ) } end diff --git a/spec/models/taxon_relationship_spec.rb b/spec/models/taxon_relationship_spec.rb index 33843d4a49..cbcce73ca3 100644 --- a/spec/models/taxon_relationship_spec.rb +++ b/spec/models/taxon_relationship_spec.rb @@ -19,12 +19,12 @@ context 'a relationship with no opposite' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => false) } let!(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { taxon_relationship.has_opposite?.should == false } + specify { expect(taxon_relationship.has_opposite?).to eq(false) } end context 'with an opposite' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => true) } let(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { taxon_relationship.has_opposite?.should == true } + specify { expect(taxon_relationship.has_opposite?).to eq(true) } end end @@ -32,13 +32,13 @@ context 'when creating a bidirectional relationship' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => true) } let!(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { taxon_relationship.has_opposite?.should == true } + specify { expect(taxon_relationship.has_opposite?).to eq(true) } end context 'when creating a non bidirectional relationship' do let(:taxon_relationship_type) { create(:taxon_relationship_type, :is_bidirectional => false) } let!(:taxon_relationship) { create(:taxon_relationship, :taxon_relationship_type_id => taxon_relationship_type.id) } - specify { taxon_relationship.has_opposite?.should == false } + specify { expect(taxon_relationship.has_opposite?).to eq(false) } end end @@ -90,7 +90,7 @@ ) } specify { - taxon_relationship2.valid?.should == false + expect(taxon_relationship2.valid?).to eq(false) } end context "adding an intertaxonomic relationship between taxon concepts that are already related in the opposite direction (B -> A)" do @@ -116,7 +116,7 @@ ) } specify { - taxon_relationship2.valid?.should == false + expect(taxon_relationship2.valid?).to eq(false) } end context "adding an intertaxonomic relationship between taxon concepts that are not already related" do @@ -144,7 +144,7 @@ } specify { - taxon_relationship2.valid?.should == true + expect(taxon_relationship2.valid?).to eq(true) } end end diff --git a/spec/models/taxonomy_spec.rb b/spec/models/taxonomy_spec.rb index 667476afc3..f2fd940082 100644 --- a/spec/models/taxonomy_spec.rb +++ b/spec/models/taxonomy_spec.rb @@ -14,41 +14,41 @@ describe :create do context "when valid" do let(:taxonomy) { build(:taxonomy, :name => 'WILDLIFE') } - specify { taxonomy.should be_valid } + specify { expect(taxonomy).to be_valid } end context "when name missing" do let(:taxonomy) { build(:taxonomy, :name => nil) } - specify { taxonomy.should be_invalid } - specify { taxonomy.should have(1).error_on(:name) } + specify { expect(taxonomy).to be_invalid } + specify { expect(taxonomy).to have(1).error_on(:name) } end context "when name duplicated" do let!(:taxonomy1) { create(:taxonomy) } let(:taxonomy2) { build(:taxonomy, :name => taxonomy1.name) } - specify { taxonomy2.should be_invalid } - specify { taxonomy2.should have(1).error_on(:name) } + specify { expect(taxonomy2).to be_invalid } + specify { expect(taxonomy2).to have(1).error_on(:name) } end end describe :update do context "when updating a non-protected name" do let(:taxonomy) { create(:taxonomy) } - specify { taxonomy.update_attributes({ :name => 'WORLD OF LOLCATS' }).should be_truthy } + specify { expect(taxonomy.update_attributes({ :name => 'WORLD OF LOLCATS' })).to be_truthy } end context "when updating a protected name" do - specify { cites_eu.update_attributes({ :name => 'WORLD OF LOLCATS' }).should be_falsey } + specify { expect(cites_eu.update_attributes({ :name => 'WORLD OF LOLCATS' })).to be_falsey } end end describe :destroy do context "when no dependent objects attached" do let(:taxonomy) { create(:taxonomy, :name => 'WILDLIFE') } - specify { taxonomy.destroy.should be_truthy } + specify { expect(taxonomy.destroy).to be_truthy } end context "when dependent objects attached" do let(:taxonomy) { create(:taxonomy, :name => 'WILDLIFE') } let!(:designation) { create(:designation, :taxonomy => taxonomy) } - specify { taxonomy.destroy.should be_falsey } + specify { expect(taxonomy.destroy).to be_falsey } end context "when protected name" do - specify { cites_eu.destroy.should be_falsey } + specify { expect(cites_eu.destroy).to be_falsey } end end end diff --git a/spec/models/term_spec.rb b/spec/models/term_spec.rb index 6b39148e4f..03dc9bddf7 100644 --- a/spec/models/term_spec.rb +++ b/spec/models/term_spec.rb @@ -18,7 +18,7 @@ describe :destroy do context "when no dependent objects attached" do let(:term) { create(:term) } - specify { term.destroy.should be_truthy } + specify { expect(term.destroy).to be_truthy } end context "when dependent objects attached" do let(:term) { create(:term) } @@ -30,16 +30,16 @@ :start_notification_id => create_cites_suspension_notification.id ) } - specify { term.destroy.should be_falsey } + specify { expect(term.destroy).to be_falsey } end context "when CITES quota" do let(:geo_entity) { create(:geo_entity) } let!(:quota) { create(:quota, :terms => [term], :geo_entity_id => geo_entity.id) } - specify { term.destroy.should be_falsey } + specify { expect(term.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :term => term) } - specify { term.destroy.should be_falsey } + specify { expect(term.destroy).to be_falsey } end end end diff --git a/spec/models/trade/annual_report_upload_spec.rb b/spec/models/trade/annual_report_upload_spec.rb index 2838815d38..5009d6b86d 100644 --- a/spec/models/trade/annual_report_upload_spec.rb +++ b/spec/models/trade/annual_report_upload_spec.rb @@ -51,7 +51,7 @@ def invalid_file :csv_source_file => exporter_file ) } - specify { subject.should be_valid } + specify { expect(subject).to be_valid } end context "when uploaded file as importer with exporter column headers" do subject { @@ -61,7 +61,7 @@ def invalid_file :csv_source_file => exporter_file ) } - specify { subject.should_not be_valid } + specify { expect(subject).not_to be_valid } end context "when uploaded file as importer with importer column headers" do subject { @@ -71,7 +71,7 @@ def invalid_file :csv_source_file => importer_file ) } - specify { subject.should be_valid } + specify { expect(subject).to be_valid } end context "when uploaded file as exporter with importer column headers" do subject { @@ -81,7 +81,7 @@ def invalid_file :csv_source_file => importer_file ) } - specify { subject.should_not be_valid } + specify { expect(subject).not_to be_valid } end end @@ -96,7 +96,7 @@ def invalid_file :csv_source_file => importer_file ) } - specify { subject.validation_errors.should be_empty } + specify { expect(subject.validation_errors).to be_empty } end describe :create do @@ -111,7 +111,7 @@ def invalid_file } specify { sandbox_klass = Trade::SandboxTemplate.ar_klass(subject.sandbox.table_name) - sandbox_klass.count.should == 10 + expect(sandbox_klass.count).to eq(10) } end end @@ -125,7 +125,7 @@ def invalid_file ) } specify { - subject.sandbox.should_receive(:destroy) + expect(subject.sandbox).to receive(:destroy) subject.destroy } end diff --git a/spec/models/trade/distinct_values_validation_rule_spec.rb b/spec/models/trade/distinct_values_validation_rule_spec.rb index 313384298b..4c3da03fcb 100644 --- a/spec/models/trade/distinct_values_validation_rule_spec.rb +++ b/spec/models/trade/distinct_values_validation_rule_spec.rb @@ -51,7 +51,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end context 'exporter should not equal importer (I)' do @@ -68,7 +68,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end context 'exporter should not equal country of origin' do @@ -81,7 +81,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end end diff --git a/spec/models/trade/filter_spec.rb b/spec/models/trade/filter_spec.rb index df0087ee40..df9ef90298 100644 --- a/spec/models/trade/filter_spec.rb +++ b/spec/models/trade/filter_spec.rb @@ -12,9 +12,9 @@ :internal => false, :taxon_with_descendants => true }).results } - specify { subject.should include(@shipment1) } - specify { subject.should_not include(@shipment2) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject).not_to include(@shipment2) } + specify { expect(subject.length).to eq(2) } end context "at FAMILY rank" do subject { Trade::Filter.new({ @@ -22,7 +22,7 @@ :internal => false, :taxon_with_descendants => false }).results } - specify { subject.length.should == 0 } + specify { expect(subject.length).to eq(0) } end end context "in the admin interface" do @@ -31,18 +31,18 @@ :taxon_concepts_ids => [@animal_genus.id], :internal => true }).results } - specify { subject.should include(@shipment1) } - specify { subject.should_not include(@shipment2) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject).not_to include(@shipment2) } + specify { expect(subject.length).to eq(2) } end context "at FAMILY rank" do subject { Trade::Filter.new({ :taxon_concepts_ids => [@plant_family.id], :internal => true }).results } - specify { subject.should include(@shipment2) } - specify { subject.should_not include(@shipment1) } - specify { subject.length.should == 4 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject).not_to include(@shipment1) } + specify { expect(subject.length).to eq(4) } end context "at mixed ranks" do subject { @@ -51,9 +51,9 @@ :internal => true }).results } - specify { subject.should include(@shipment1) } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 6 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(6) } end end context "when status N shipments present" do @@ -65,7 +65,7 @@ :taxon_concepts_ids => [@status_N_species.id] }).results } - specify { subject.should include(@shipment_of_status_N) } + specify { expect(subject).to include(@shipment_of_status_N) } end context "when subspecies shipments present" do before(:each) do @@ -76,7 +76,7 @@ :taxon_concepts_ids => [@animal_species.id] }).results } - specify { subject.should include(@shipment_of_subspecies) } + specify { expect(subject).to include(@shipment_of_subspecies) } end context "when synonym subspecies shipments present" do before(:each) do @@ -92,7 +92,7 @@ :taxon_concepts_ids => [@animal_species.id] }).results } - specify { subject.should_not include(@shipment_of_synonym_subspecies) } + specify { expect(subject).not_to include(@shipment_of_synonym_subspecies) } end context "when searching by accepted name" do subject { @@ -100,7 +100,7 @@ :taxon_concepts_ids => [@plant_species.id] }).results } - specify { subject.should include(@shipment_of_synonym_subspecies) } + specify { expect(subject).to include(@shipment_of_synonym_subspecies) } end end end @@ -119,160 +119,160 @@ :reported_taxon_concepts_ids => [@trade_name.id] }).results } - specify { subject.should include(@shipment_of_trade_name) } + specify { expect(subject).to include(@shipment_of_trade_name) } end end context "when searching by appendices" do subject { Trade::Filter.new({ :appendices => ['I'] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(1) } end context "when searching for terms_ids" do subject { Trade::Filter.new({ :terms_ids => [@term_cav.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 3 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(3) } end context "when searching for units_ids" do subject { Trade::Filter.new({ :units_ids => [@unit.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 3 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(3) } end context "when searching for purposes_ids" do subject { Trade::Filter.new({ :purposes_ids => [@purpose.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 7 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(7) } end context "when searching for sources_ids" do context "when code" do subject { Trade::Filter.new({ :sources_ids => [@source.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(2) } end context "when blank" do subject { Trade::Filter.new({ :source_blank => true }).results } - specify { subject.should include(@shipment6) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment6) } + specify { expect(subject.length).to eq(1) } end context "when both code and blank" do subject { Trade::Filter.new({ :sources_ids => [@source.id], :source_blank => true }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 3 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(3) } end context "when wild" do subject { Trade::Filter.new({ :sources_ids => [@source_wild.id], :source_blank => true }).results } - specify { subject.should include(@shipment3) } - specify { subject.length.should == 5 } + specify { expect(subject).to include(@shipment3) } + specify { expect(subject.length).to eq(5) } end context "when wild and internal" do subject { Trade::Filter.new({ :sources_ids => [@source_wild.id], :source_blank => true, :internal => true }).results } - specify { subject.should include(@shipment3) } - specify { subject.length.should == 4 } + specify { expect(subject).to include(@shipment3) } + specify { expect(subject.length).to eq(4) } end end context "when searching for importers_ids" do subject { Trade::Filter.new({ :importers_ids => [@argentina.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(2) } end context "when searching for exporters_ids" do subject { Trade::Filter.new({ :exporters_ids => [@argentina.id] }).results } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 5 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(5) } end context "when searching for countries_of_origin_ids" do subject { Trade::Filter.new({ :countries_of_origin_ids => [@argentina.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(2) } end context "when searching by year" do context "when time range specified" do subject { Trade::Filter.new({ :time_range_start => 2013, :time_range_end => 2015 }).results } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 6 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(6) } end context "when time range specified incorrectly" do subject { Trade::Filter.new({ :time_range_start => 2013, :time_range_end => 2012 }).results } - specify { subject.length.should == 0 } + specify { expect(subject.length).to eq(0) } end context "when time range start specified" do subject { Trade::Filter.new({ :time_range_start => 2012 }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 7 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(7) } end context "when time range end specified" do subject { Trade::Filter.new({ :time_range_end => 2012 }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(1) } end end context "when searching by reporter_type" do context "when reporter type is not I or E" do subject { Trade::Filter.new({ :internal => true, :reporter_type => 'K' }).results } - specify { subject.length.should == 7 } + specify { expect(subject.length).to eq(7) } end context "when reporter type is I" do subject { Trade::Filter.new({ :internal => true, :reporter_type => 'I' }).results } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 5 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(5) } end context "when reporter type is E" do subject { Trade::Filter.new({ :internal => true, :reporter_type => 'E' }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 2 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(2) } end end context "when searching by permit" do context "when permit number" do subject { Trade::Filter.new({ :internal => true, :permits_ids => [@export_permit1.id] }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(1) } end context "when blank" do subject { Trade::Filter.new({ :internal => true, :permit_blank => true }).results } - specify { subject.should include(@shipment2) } - specify { subject.length.should == 5 } + specify { expect(subject).to include(@shipment2) } + specify { expect(subject.length).to eq(5) } end context "when both permit number and blank" do subject { Trade::Filter.new({ :internal => true, :permits_ids => [@export_permit1.id], :permit_blank => true }).results } - specify { subject.length.should == 6 } + specify { expect(subject.length).to eq(6) } end end context "when searching by quantity" do subject { Trade::Filter.new({ :internal => true, :quantity => 20 }).results } - specify { subject.should include(@shipment1) } - specify { subject.length.should == 1 } + specify { expect(subject).to include(@shipment1) } + specify { expect(subject.length).to eq(1) } end end describe :total_cnt do context "when none matches" do subject { Trade::Filter.new({ :appendices => ['III'] }) } - specify { subject.total_cnt.should == 0 } + specify { expect(subject.total_cnt).to eq(0) } end context "when one matches" do subject { Trade::Filter.new({ :appendices => ['I'] }) } - specify { subject.total_cnt.should == 1 } + specify { expect(subject.total_cnt).to eq(1) } end context "when two match" do subject { Trade::Filter.new({ :purposes_ids => [@purpose.id] }) } - specify { subject.total_cnt.should == 7 } + specify { expect(subject.total_cnt).to eq(7) } end end diff --git a/spec/models/trade/inclusion_validation_rule_spec.rb b/spec/models/trade/inclusion_validation_rule_spec.rb index ff6f00ca80..e7612dc869 100644 --- a/spec/models/trade/inclusion_validation_rule_spec.rb +++ b/spec/models/trade/inclusion_validation_rule_spec.rb @@ -149,7 +149,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).should be_empty + expect(subject.validation_errors_for_aru(annual_report_upload)).to be_empty } end context 'trading partner should be a valid iso code' do @@ -176,7 +176,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end context 'term can only be paired with unit as defined by term_trade_codes_pairs table' do @@ -203,7 +203,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end context "when required unit blank" do @@ -215,7 +215,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end @@ -235,7 +235,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 2 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(2) } end context 'taxon_concept_id can only be paired with term as defined by trade_taxon_concept_term_pairs table' do @@ -256,7 +256,7 @@ end specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end context "when hybrid" do @@ -273,7 +273,7 @@ end specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end diff --git a/spec/models/trade/permit_matcher_spec.rb b/spec/models/trade/permit_matcher_spec.rb index e74cfd9618..10d95e86a8 100644 --- a/spec/models/trade/permit_matcher_spec.rb +++ b/spec/models/trade/permit_matcher_spec.rb @@ -7,23 +7,23 @@ end context "when regular query" do subject { Trade::PermitMatcher.new({ :permit_query => '006' }).results } - specify { subject.should include(@permit) } + specify { expect(subject).to include(@permit) } end context "when wildcard query" do subject { Trade::PermitMatcher.new({ :permit_query => '%AA' }).results } - specify { subject.should include(@permit) } + specify { expect(subject).to include(@permit) } end context "when malicious query" do subject { Trade::PermitMatcher.new({ :permit_query => '006\'' }).results } - specify { subject.should be_empty } + specify { expect(subject).to be_empty } end context "when leading whitespace" do subject { Trade::PermitMatcher.new({ :permit_query => ' 006' }).results } - specify { subject.should include(@permit) } + specify { expect(subject).to include(@permit) } end context "when trailing whitespace" do subject { Trade::PermitMatcher.new({ :permit_query => '006AAA ' }).results } - specify { subject.should include(@permit) } + specify { expect(subject).to include(@permit) } end end end diff --git a/spec/models/trade/pov_inclusion_validation_rule_spec.rb b/spec/models/trade/pov_inclusion_validation_rule_spec.rb index 3b02d2b41c..7e028e6f87 100644 --- a/spec/models/trade/pov_inclusion_validation_rule_spec.rb +++ b/spec/models/trade/pov_inclusion_validation_rule_spec.rb @@ -73,7 +73,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end context "when W source and country of origin blank and exporter doesn't match distribution (I)" do @@ -96,7 +96,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end context "when W source and country XX" do @@ -119,7 +119,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).should be_empty + expect(subject.validation_errors_for_aru(@aru)).to be_empty } end context "when W source and country doesn't match distribution of higher taxa" do @@ -142,7 +142,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).should be_empty + expect(subject.validation_errors_for_aru(@aru)).to be_empty } end context "when invalid scope specified" do diff --git a/spec/models/trade/sandbox_spec.rb b/spec/models/trade/sandbox_spec.rb index 876afdd971..6b2a91c240 100644 --- a/spec/models/trade/sandbox_spec.rb +++ b/spec/models/trade/sandbox_spec.rb @@ -47,7 +47,7 @@ specify { sandbox_klass = Trade::SandboxTemplate.ar_klass(subject.table_name) subject.destroy - ActiveRecord::Base.connection.table_exists?('trade_sandbox_1').should be_falsey + expect(ActiveRecord::Base.connection.table_exists?('trade_sandbox_1')).to be_falsey } end diff --git a/spec/models/trade/sandbox_template_spec.rb b/spec/models/trade/sandbox_template_spec.rb index 7b275bfcb5..6be0160989 100644 --- a/spec/models/trade/sandbox_template_spec.rb +++ b/spec/models/trade/sandbox_template_spec.rb @@ -55,7 +55,7 @@ end specify { @shipment1.update_attributes(:taxon_name => canis_aureus.full_name) - @shipment1.reload.taxon_concept_id.should == canis_aureus.id + expect(@shipment1.reload.taxon_concept_id).to eq(canis_aureus.id) } end @@ -76,13 +76,13 @@ ) end specify { - @shipment.reload.taxon_concept_id.should be_nil + expect(@shipment.reload.taxon_concept_id).to be_nil sandbox_klass.update_batch( { taxon_name: 'Canis lupus' }, @validation_error, annual_report_upload ) - @shipment.reload.taxon_concept_id.should == canis_lupus.id + expect(@shipment.reload.taxon_concept_id).to eq(canis_lupus.id) } end diff --git a/spec/models/trade/scoped_inclusion_validation_rule_spec.rb b/spec/models/trade/scoped_inclusion_validation_rule_spec.rb index 1d9b324a38..f55cad3c84 100644 --- a/spec/models/trade/scoped_inclusion_validation_rule_spec.rb +++ b/spec/models/trade/scoped_inclusion_validation_rule_spec.rb @@ -19,7 +19,7 @@ create_taxon_concept_country_of_origin_validation } specify { - subject.validation_errors(@aru).size.should == 0 + expect(subject.validation_errors(@aru).size).to eq(0) } end @@ -46,7 +46,7 @@ create_taxon_concept_country_of_origin_validation } specify { - subject.validation_errors(@aru).size.should == 0 + expect(subject.validation_errors(@aru).size).to eq(0) } end diff --git a/spec/models/trade/shipment_spec.rb b/spec/models/trade/shipment_spec.rb index 65395b15c7..3d5261f867 100644 --- a/spec/models/trade/shipment_spec.rb +++ b/spec/models/trade/shipment_spec.rb @@ -38,15 +38,15 @@ describe :create do context "when reporter_type not given" do subject { build(:shipment, :reporter_type => nil) } - specify { subject.should have(2).error_on(:reporter_type) } + specify { expect(subject.error_on(:reporter_type).size).to eq(2) } end context "when appendix valid" do subject { build(:shipment, :appendix => 'N') } - specify { subject.should be_valid } + specify { expect(subject).to be_valid } end context "when appendix not valid" do subject { build(:shipment, :appendix => 'I/II') } - specify { subject.should have(1).error_on(:appendix) } + specify { expect(subject.error_on(:appendix).size).to eq(1) } end context "when permit numbers given" do before(:each) do @@ -57,13 +57,13 @@ ) end context "when export permit" do - specify { @shipment.export_permit_number.should == 'A' } + specify { expect(@shipment.export_permit_number).to eq('A') } end context "when import permit" do - specify { @shipment.import_permit_number.should == 'B' } + specify { expect(@shipment.import_permit_number).to eq('B') } end context "when origin permit" do - specify { @shipment.origin_permit_number.should == 'C' } + specify { expect(@shipment.origin_permit_number).to eq('C') } end end end @@ -120,7 +120,7 @@ :taxon_concept => @taxon_concept, :appendix => 'II', :year => 2013 ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "invalid" do subject { @@ -129,7 +129,7 @@ :taxon_concept => @taxon_concept, :appendix => 'N', :year => 2013 ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -138,7 +138,7 @@ :taxon_concept => @taxon_concept, :appendix => 'I', :year => 2013 ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end @@ -160,7 +160,7 @@ :taxon_concept => @taxon_concept, :appendix => 'N', :year => 2013 ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end @@ -181,7 +181,7 @@ :taxon_concept => @taxon_concept, :appendix => 'N', :year => 2013 ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end end @@ -206,7 +206,7 @@ :term => @cav, :unit => @bag ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -215,7 +215,7 @@ :term => @cav, :unit => @kil ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end context "blank unit is valid" do subject { @@ -224,7 +224,7 @@ :term => @cav, :unit => nil ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end context "blank unit is invalid" do subject { @@ -233,7 +233,7 @@ :term => @cap, :unit => nil ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end end context "when term + purpose" do @@ -252,7 +252,7 @@ :term => @cav, :purpose => @b ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -261,7 +261,7 @@ :term => @cav, :purpose => @p ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when species name + term" do @@ -280,7 +280,7 @@ :taxon_concept => @taxon_concept, :term => @cav ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -289,7 +289,7 @@ :taxon_concept => @taxon_concept, :term => @bal ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when species name + country of origin" do @@ -305,7 +305,7 @@ :country_of_origin => @poland ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -316,7 +316,7 @@ :country_of_origin => @argentina ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end context "blank" do subject { @@ -327,7 +327,7 @@ :country_of_origin => nil ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when species name + exporter" do @@ -344,7 +344,7 @@ :exporter => @poland ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -356,7 +356,7 @@ :exporter => @argentina ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end context "valid with XX" do subject { @@ -368,7 +368,7 @@ :exporter => @xx ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when exporter + country of origin" do @@ -384,7 +384,7 @@ :country_of_origin => @argentina ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -395,7 +395,7 @@ :country_of_origin => @argentina ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when exporter + importer" do @@ -411,7 +411,7 @@ :exporter => @argentina ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -422,7 +422,7 @@ :exporter => @argentina ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end context "when species name + source code" do @@ -442,7 +442,7 @@ :source => @artificial ) } - specify { subject.warnings.should_not be_empty } + specify { expect(subject.warnings).not_to be_empty } end context "valid" do subject { @@ -452,7 +452,7 @@ :source => @wild ) } - specify { subject.warnings.should be_empty } + specify { expect(subject.warnings).to be_empty } end end end diff --git a/spec/models/trade/shipments_comptab_export_spec.rb b/spec/models/trade/shipments_comptab_export_spec.rb index 677aeb07eb..2371af5826 100644 --- a/spec/models/trade/shipments_comptab_export_spec.rb +++ b/spec/models/trade/shipments_comptab_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsComptabExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsComptabExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsComptabExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsComptabExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end end diff --git a/spec/models/trade/shipments_export_spec.rb b/spec/models/trade/shipments_export_spec.rb index 5fb7f56e3e..04c591339b 100644 --- a/spec/models/trade/shipments_export_spec.rb +++ b/spec/models/trade/shipments_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end end diff --git a/spec/models/trade/shipments_gross_exports_export_spec.rb b/spec/models/trade/shipments_gross_exports_export_spec.rb index 731238ed3a..a24542671e 100644 --- a/spec/models/trade/shipments_gross_exports_export_spec.rb +++ b/spec/models/trade/shipments_gross_exports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsGrossExportsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/shipments_gross_imports_export_spec.rb b/spec/models/trade/shipments_gross_imports_export_spec.rb index 028853fbe1..a4e5f25c0e 100644 --- a/spec/models/trade/shipments_gross_imports_export_spec.rb +++ b/spec/models/trade/shipments_gross_imports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsGrossImportsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/shipments_net_exports_export_spec.rb b/spec/models/trade/shipments_net_exports_export_spec.rb index e7dd4e576d..60a11f6afc 100644 --- a/spec/models/trade/shipments_net_exports_export_spec.rb +++ b/spec/models/trade/shipments_net_exports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsNetExportsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsNetExportsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsNetExportsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsNetExportsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/shipments_net_imports_export_spec.rb b/spec/models/trade/shipments_net_imports_export_spec.rb index 5bca60f606..2cf261f6ea 100644 --- a/spec/models/trade/shipments_net_imports_export_spec.rb +++ b/spec/models/trade/shipments_net_imports_export_spec.rb @@ -9,22 +9,22 @@ describe :total_cnt do context "when internal" do subject { Trade::ShipmentsNetImportsExport.new(:internal => true, :per_page => 4) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end context "when public" do subject { Trade::ShipmentsNetImportsExport.new(:internal => false, :per_page => 3) } - specify { subject.total_cnt.should == 4 } + specify { expect(subject.total_cnt).to eq(4) } end end describe :query do context "when internal" do subject { Trade::ShipmentsNetImportsExport.new(:internal => true, :per_page => 4) } - specify { subject.query.ntuples.should == 4 } + specify { expect(subject.query.ntuples).to eq(4) } end context "when public" do subject { Trade::ShipmentsNetImportsExport.new(:internal => false, :per_page => 3) } - specify { subject.query.ntuples.should == 3 } + specify { expect(subject.query.ntuples).to eq(3) } end # TODO Temporarily disabling this test. # No changes to the code seem responsible for this to fail. diff --git a/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb b/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb index c141d8e3cb..92e5cbbe5e 100644 --- a/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb +++ b/spec/models/trade/taxon_concept_appendix_year_validation_rule_spec.rb @@ -76,7 +76,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 0 + expect(subject.validation_errors_for_aru(@aru).size).to eq(0) } end context "when old listing" do @@ -93,12 +93,12 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } specify { subject.refresh_errors_if_needed(@aru) ve = subject.validation_errors_for_aru(@aru).first - ve.error_message.should == 'taxon_name Loxodonta africana with appendix II with year 1996 is invalid' + expect(ve.error_message).to eq('taxon_name Loxodonta africana with appendix II with year 1996 is invalid') } end context "when appendix N and CITES listed" do @@ -112,12 +112,12 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } specify { subject.refresh_errors_if_needed(@aru) ve = subject.validation_errors_for_aru(@aru).first - ve.error_message.should == 'taxon_name Loxodonta africana with appendix N with year 1996 is invalid' + expect(ve.error_message).to eq('taxon_name Loxodonta africana with appendix N with year 1996 is invalid') } end context "when reported under a synonym, but otherwise fine" do @@ -131,7 +131,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 0 + expect(subject.validation_errors_for_aru(@aru).size).to eq(0) } end context "when hybrid" do @@ -168,7 +168,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 0 + expect(subject.validation_errors_for_aru(@aru).size).to eq(0) } end end @@ -184,7 +184,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 0 + expect(subject.validation_errors_for_aru(@aru).size).to eq(0) } end context "when not CITES listed and not EU listed" do @@ -199,7 +199,7 @@ } specify { subject.refresh_errors_if_needed(@aru) - subject.validation_errors_for_aru(@aru).size.should == 1 + expect(subject.validation_errors_for_aru(@aru).size).to eq(1) } end end diff --git a/spec/models/trade/taxon_concept_source_validation_rule_spec.rb b/spec/models/trade/taxon_concept_source_validation_rule_spec.rb index af16dc1b1d..28b82a9ee2 100644 --- a/spec/models/trade/taxon_concept_source_validation_rule_spec.rb +++ b/spec/models/trade/taxon_concept_source_validation_rule_spec.rb @@ -41,12 +41,12 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } specify { subject.refresh_errors_if_needed(annual_report_upload) ve = subject.validation_errors_for_aru(annual_report_upload).first - ve.error_message.should == "taxon_name #{@animal.full_name} with source_code A is invalid" + expect(ve.error_message).to eq("taxon_name #{@animal.full_name} with source_code A is invalid") } end context "when species name is from Kingdom Plantae, source_code can't be C or R" do @@ -62,7 +62,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 2 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(2) } end end diff --git a/spec/models/trade/validation_rule_spec.rb b/spec/models/trade/validation_rule_spec.rb index 3f8b4794f1..b236d58596 100644 --- a/spec/models/trade/validation_rule_spec.rb +++ b/spec/models/trade/validation_rule_spec.rb @@ -137,7 +137,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end @@ -158,7 +158,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end @@ -175,7 +175,7 @@ } specify { subject.refresh_errors_if_needed(annual_report_upload) - subject.validation_errors_for_aru(annual_report_upload).size.should == 1 + expect(subject.validation_errors_for_aru(annual_report_upload).size).to eq(1) } end end diff --git a/spec/models/trade_restriction_spec.rb b/spec/models/trade_restriction_spec.rb index f2b0b23afe..00b953f3b6 100644 --- a/spec/models/trade_restriction_spec.rb +++ b/spec/models/trade_restriction_spec.rb @@ -46,11 +46,11 @@ end it "should return @quota1 if filter set to current" do result = Quota.filter_is_current("current") - result.should == [@quota1] + expect(result).to eq([@quota1]) end it 'should return both @quota1 and @quota2 if filter set to "all"' do result = Quota.filter_is_current("all") - result.should =~ [@quota1, @quota2] + expect(result).to match_array([@quota1, @quota2]) end end @@ -67,15 +67,15 @@ end it 'should get all quotas if geo_entities filter not set' do result = Quota.filter_geo_entities({}) - result.should =~ [@quota1, @quota2, @quota3, @quota4] + expect(result).to match_array([@quota1, @quota2, @quota3, @quota4]) end it 'should return quota1 and quota3 if geo_entities filter set to @geo_entity1' do result = Quota.filter_geo_entities({ "geo_entities_ids" => [@geo_entity1.id] }) - result.should =~ [@quota1, @quota3] + expect(result).to match_array([@quota1, @quota3]) end it 'should return quota1, quota3, and quota4 if geo_entities filter set to @geo_entity1 and @geo_entity3' do result = Quota.filter_geo_entities({ "geo_entities_ids" => [@geo_entity1.id, @geo_entity3.id] }) - result.should =~ [@quota1, @quota3, @quota4] + expect(result).to match_array([@quota1, @quota3, @quota4]) end end @@ -89,15 +89,15 @@ end it 'should get all quotas if years filter not set' do result = Quota.filter_years({}) - result.should =~ [@quota1, @quota2, @quota3, @quota4] + expect(result).to match_array([@quota1, @quota2, @quota3, @quota4]) end it 'should return quota1 and quota3 if years filter set to 2012' do result = Quota.filter_years({ "years" => [2012] }) - result.should =~ [@quota1, @quota3] + expect(result).to match_array([@quota1, @quota3]) end it 'should return quota1, quota3, and quota4 if years filter set to 2012 and 2013' do result = Quota.filter_years({ "years" => [2012, 2013] }) - result.should =~ [@quota1, @quota3, @quota4] + expect(result).to match_array([@quota1, @quota3, @quota4]) end end end diff --git a/spec/models/unit_spec.rb b/spec/models/unit_spec.rb index ad8e4725dc..296529fc5c 100644 --- a/spec/models/unit_spec.rb +++ b/spec/models/unit_spec.rb @@ -18,18 +18,18 @@ describe :destroy do context "when no dependent objects attached" do let(:unit) { create(:unit) } - specify { unit.destroy.should be_truthy } + specify { expect(unit.destroy).to be_truthy } end context "when dependent objects attached" do let(:unit) { create(:unit) } context "when quotas" do let(:geo_entity) { create(:geo_entity) } let!(:quota) { create(:quota, :unit => unit, :geo_entity_id => geo_entity.id) } - specify { unit.destroy.should be_falsey } + specify { expect(unit.destroy).to be_falsey } end context "when shipments" do before(:each) { create(:shipment, :unit => unit) } - specify { unit.destroy.should be_falsey } + specify { expect(unit.destroy).to be_falsey } end end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 27c62321ac..94508582db 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -36,7 +36,7 @@ describe :destroy do context "when no dependent objects attached" do let(:user) { create(:user) } - specify { user.destroy.should be_truthy } + specify { expect(user.destroy).to be_truthy } end context "when dependent objects attached" do let(:user) { create(:user) } @@ -44,7 +44,7 @@ user.make_current create(:shipment) end - specify { user.destroy.should be_falsey } + specify { expect(user.destroy).to be_falsey } end end @@ -55,38 +55,38 @@ context "when is a Data Manager" do let(:user) { create(:user, role: User::MANAGER) } - it { should be_able_to(:manage, :all) } + it { is_expected.to be_able_to(:manage, :all) } end context "when is a Data Contributor" do let(:user) { create(:user, role: User::CONTRIBUTOR) } - it { should be_able_to(:create, TaxonConcept) } - it { should_not be_able_to(:destroy, TaxonConcept) } + it { is_expected.to be_able_to(:create, TaxonConcept) } + it { is_expected.not_to be_able_to(:destroy, TaxonConcept) } end context "when is a E-library Viewer" do let(:user) { create(:user, role: User::ELIBRARY_USER) } - it { should_not be_able_to(:manage, TaxonConcept) } + it { is_expected.not_to be_able_to(:manage, TaxonConcept) } end context "when is an API User" do let(:user) { create(:user, role: User::API_USER) } - it { should_not be_able_to(:manage, TaxonConcept) } + it { is_expected.not_to be_able_to(:manage, TaxonConcept) } end context "when is a Secretariat" do let(:user) { create(:user, role: User::SECRETARIAT) } - it { should_not be_able_to(:create, :all) } - it { should_not be_able_to(:update, :all) } - it { should_not be_able_to(:destroy, :all) } + it { is_expected.not_to be_able_to(:create, :all) } + it { is_expected.not_to be_able_to(:update, :all) } + it { is_expected.not_to be_able_to(:destroy, :all) } end context "when is not active" do let(:user) { create(:user, role: User::MANAGER, is_active: false) } - it { should_not be_able_to(:create, :all) } - it { should_not be_able_to(:update, :all) } - it { should_not be_able_to(:destroy, :all) } + it { is_expected.not_to be_able_to(:create, :all) } + it { is_expected.not_to be_able_to(:update, :all) } + it { is_expected.not_to be_able_to(:destroy, :all) } end end end diff --git a/spec/workers/eu_regulation_activation_worker_spec.rb b/spec/workers/eu_regulation_activation_worker_spec.rb index dadd184bf5..3e9789cd54 100644 --- a/spec/workers/eu_regulation_activation_worker_spec.rb +++ b/spec/workers/eu_regulation_activation_worker_spec.rb @@ -29,16 +29,16 @@ EuRegulationActivationWorker.new.perform(eu_regulation.id, true) end - specify { eu_regulation.listing_changes.reload.first.is_current.should be_truthy } - specify { prev_eu_regulation.listing_changes.reload.first.is_current.should be_truthy } + specify { expect(eu_regulation.listing_changes.reload.first.is_current).to be_truthy } + specify { expect(prev_eu_regulation.listing_changes.reload.first.is_current).to be_truthy } describe "Set old EU regulation to false" do before do EuRegulationActivationWorker.new.perform(prev_eu_regulation.id, false) end - specify { eu_regulation.listing_changes.reload.first.is_current.should be_truthy } - specify { prev_eu_regulation.listing_changes.reload.first.is_current.should be_falsey } + specify { expect(eu_regulation.listing_changes.reload.first.is_current).to be_truthy } + specify { expect(prev_eu_regulation.listing_changes.reload.first.is_current).to be_falsey } end end diff --git a/spec/workers/event_listing_changes_copy_worker_spec.rb b/spec/workers/event_listing_changes_copy_worker_spec.rb index 7538921e6f..2650a87b06 100644 --- a/spec/workers/event_listing_changes_copy_worker_spec.rb +++ b/spec/workers/event_listing_changes_copy_worker_spec.rb @@ -39,14 +39,14 @@ ) } before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - specify { eu_regulation.listing_changes.reload.count.should == 1 } - specify { eu_regulation.listing_changes.first.is_current.should be_falsey } + specify { expect(eu_regulation.listing_changes.reload.count).to eq(1) } + specify { expect(eu_regulation.listing_changes.first.is_current).to be_falsey } end context "when copy into current regulation" do before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - specify { eu_regulation.listing_changes.reload.count.should == 1 } - specify { eu_regulation.listing_changes.first.is_current.should be_truthy } + specify { expect(eu_regulation.listing_changes.reload.count).to eq(1) } + specify { expect(eu_regulation.listing_changes.first.is_current).to be_truthy } end context "when exclusion" do @@ -67,10 +67,10 @@ } before { EventListingChangesCopyWorker.new.perform(prev_eu_regulation.id, eu_regulation.id) } - specify { eu_regulation.listing_changes.reload.count.should == 1 } - specify { eu_regulation.listing_changes.first.exclusions.count.should == 2 } - specify { eu_regulation.listing_changes.first.taxonomic_exclusions.count.should == 1 } - specify { eu_regulation.listing_changes.first.geographic_exclusions.count.should == 1 } + specify { expect(eu_regulation.listing_changes.reload.count).to eq(1) } + specify { expect(eu_regulation.listing_changes.first.exclusions.count).to eq(2) } + specify { expect(eu_regulation.listing_changes.first.taxonomic_exclusions.count).to eq(1) } + specify { expect(eu_regulation.listing_changes.first.geographic_exclusions.count).to eq(1) } end end diff --git a/spec/workers/quotas_copy_worker_spec.rb b/spec/workers/quotas_copy_worker_spec.rb index 996be3e8b8..847957f607 100644 --- a/spec/workers/quotas_copy_worker_spec.rb +++ b/spec/workers/quotas_copy_worker_spec.rb @@ -44,10 +44,10 @@ before(:each) do QuotasCopyWorker.new.perform(job_defaults) end - specify { Quota.count(true).should == 2 } - specify { Quota.where(:is_current => true).count(true).should == 1 } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).first.id.should == quota.id } + specify { expect(Quota.count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } end describe "Try to copy quota from wrong year" do @@ -56,9 +56,9 @@ "from_year" => quota.start_date.year + 1 })) end - specify { Quota.count(true).should == 1 } - specify { Quota.where(:is_current => true).count(true).should == 1 } - specify { Quota.where(:is_current => false).count(true).should == 0 } + specify { expect(Quota.count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(0) } end describe "Copy quota when there are no current quotas" do @@ -67,9 +67,9 @@ quota.save QuotasCopyWorker.new.perform(job_defaults) end - specify { Quota.count(true).should == 1 } - specify { Quota.where(:is_current => true).count(true).should == 0 } - specify { Quota.where(:is_current => false).count(true).should == 1 } + specify { expect(Quota.count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(0) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } end describe "When multiple quotas copy quota for given country" do @@ -87,11 +87,11 @@ "included_geo_entities_ids" => [geo_entity.id] })) end - specify { Quota.count(true).should == 3 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).first.id.should == quota.id } + specify { expect(Quota.count(true)).to eq(3) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } end describe "When multiple quotas copy quota for both countries" do @@ -109,11 +109,11 @@ "included_geo_entities_ids" => [geo_entity.id.to_s, geo_entity2.id.to_s] })) end - specify { Quota.count(true).should == 4 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => false).count(true).should == 2 } - specify { Quota.where(:is_current => false).map(&:id).should include(quota.id) } - specify { Quota.where(:is_current => false).map(&:id).should include(@quota2.id) } + specify { expect(Quota.count(true)).to eq(4) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => false).map(&:id)).to include(quota.id) } + specify { expect(Quota.where(:is_current => false).map(&:id)).to include(@quota2.id) } end describe "When multiple quotas don't copy quota for given country" do @@ -131,11 +131,11 @@ "excluded_geo_entities_ids" => [geo_entity2.id.to_s] })) end - specify { Quota.count(true).should == 3 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).first.id.should == quota.id } + specify { expect(Quota.count(true)).to eq(3) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } end describe "When multiple quotas copy quota for given taxon_concept" do @@ -152,11 +152,11 @@ "included_taxon_concepts_ids" => quota.taxon_concept_id.to_s })) end - specify { Quota.count(true).should == 3 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).map(&:id).should include(quota.id) } + specify { expect(Quota.count(true)).to eq(3) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).map(&:id)).to include(quota.id) } end describe "When multiple quotas copy quota for both taxon_concepts" do @@ -174,11 +174,11 @@ "included_taxon_concepts_ids" => "#{taxon_concept.id},#{tc.id}" })) end - specify { Quota.count(true).should == 4 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should_not include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 2 } - specify { Quota.where(:is_current => false).map(&:id).should include(quota.id) } + specify { expect(Quota.count(true)).to eq(4) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => false).map(&:id)).to include(quota.id) } end describe "When multiple quotas don't copy quota for given taxon_concept" do @@ -195,11 +195,11 @@ "excluded_taxon_concepts_ids" => tc.id.to_s })) end - specify { Quota.count(true).should == 3 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should include(@quota2.id) } - specify { Quota.where(:is_current => false).count(true).should == 1 } - specify { Quota.where(:is_current => false).first.id.should == quota.id } + specify { expect(Quota.count(true)).to eq(3) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).to include(@quota2.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(1) } + specify { expect(Quota.where(:is_current => false).first.id).to eq(quota.id) } end describe "When text to replace passed, should be replaced" do @@ -219,14 +219,14 @@ })) end - specify { Quota.count(true).should == 4 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should_not include(@quota2.id) } - specify { Quota.where(:is_current => true).map(&:id).should_not include(quota.id) } - specify { Quota.where(:is_current => false).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:notes).should include(@quota2.notes) } - specify { Quota.where(:is_current => true).map(&:notes).should_not include(quota.notes) } - specify { Quota.where(:is_current => true).map(&:notes).should include('Le Salmon is my favourite fish') } + specify { expect(Quota.count(true)).to eq(4) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(@quota2.id) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(quota.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:notes)).to include(@quota2.notes) } + specify { expect(Quota.where(:is_current => true).map(&:notes)).not_to include(quota.notes) } + specify { expect(Quota.where(:is_current => true).map(&:notes)).to include('Le Salmon is my favourite fish') } end describe "When url passed, should be replaced" do @@ -242,11 +242,11 @@ :notes => "Derp di doo wildlife") QuotasCopyWorker.new.perform(job_defaults.merge({ "url" => 'http://myurl.co.uk' })) end - specify { Quota.count(true).should == 4 } - specify { Quota.where(:is_current => true).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:id).should_not include(@quota2.id) } - specify { Quota.where(:is_current => true).map(&:id).should_not include(quota.id) } - specify { Quota.where(:is_current => false).count(true).should == 2 } - specify { Quota.where(:is_current => true).map(&:url).should include('http://myurl.co.uk') } + specify { expect(Quota.count(true)).to eq(4) } + specify { expect(Quota.where(:is_current => true).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(@quota2.id) } + specify { expect(Quota.where(:is_current => true).map(&:id)).not_to include(quota.id) } + specify { expect(Quota.where(:is_current => false).count(true)).to eq(2) } + specify { expect(Quota.where(:is_current => true).map(&:url)).to include('http://myurl.co.uk') } end end diff --git a/spec/workers/submission_worker_spec.rb b/spec/workers/submission_worker_spec.rb index 44ca697554..583556c102 100644 --- a/spec/workers/submission_worker_spec.rb +++ b/spec/workers/submission_worker_spec.rb @@ -32,9 +32,9 @@ def deliver :iso_code2 => 'PT' ) @submitter = FactoryGirl.create(:user, role: User::MANAGER) - Trade::ChangelogCsvGenerator.stub(:call).and_return(Tempfile.new('changelog.csv')) - SubmissionWorker.any_instance.stub(:upload_on_S3) - NotificationMailer.any_instance.stub(:mail).and_return(EmailMessageStub.new()) + allow(Trade::ChangelogCsvGenerator).to receive(:call).and_return(Tempfile.new('changelog.csv')) + allow_any_instance_of(SubmissionWorker).to receive(:upload_on_S3) + allow_any_instance_of(NotificationMailer).to receive(:mail).and_return(EmailMessageStub.new()) end context "when no primary errors" do pending(PENDING_REASON) if PENDING_REASON @@ -64,7 +64,7 @@ def deliver } specify "leading space is stripped" do SubmissionWorker.new.perform(@aru.id, @submitter.id) - Trade::Permit.find_by_number('BBB').should_not be_nil + expect(Trade::Permit.find_by_number('BBB')).not_to be_nil end context "when permit previously reported" do before(:each) { create(:permit, :number => 'xxx') } @@ -127,11 +127,11 @@ def deliver } specify { SubmissionWorker.new.perform(@aru.id, @submitter.id) - Trade::Shipment.first.taxon_concept_id.should == @species.id + expect(Trade::Shipment.first.taxon_concept_id).to eq(@species.id) } specify { SubmissionWorker.new.perform(@aru.id, @submitter.id) - Trade::Shipment.first.reported_taxon_concept_id.should == @synonym.id + expect(Trade::Shipment.first.reported_taxon_concept_id).to eq(@synonym.id) } end end From c3ec1c2d13bf62e026ab4d934625b028643a24c6 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 11 Jan 2024 15:56:53 +0000 Subject: [PATCH 071/334] remove activeresource gem. I believe it is not in-use. All test pass after remove it. --- Gemfile | 1 - Gemfile.lock | 5 ----- config/application.rb | 1 - 3 files changed, 7 deletions(-) diff --git a/Gemfile b/Gemfile index 952b84de3e..5b9b400cde 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,6 @@ gem 'rails', '4.2.11.3' gem 'actionpack-action_caching', '~> 1.2', '>= 1.2.2' # A feature that removed from core in Rails 4.0, maybe be better migrate away from this. gem 'actionpack-page_caching', '1.1.1' # A feature that removed from core in Rails 4.0, maybe be better migrate away from this. # TODO, need update when upgrade to rails 5 gem 'active_model_serializers', '0.8.4' # Deprecated -gem 'activeresource', '4.1.0' # TODO: can be removed? Seems no place using this. gem 'dalli', '2.7.10' # TODO: latest is 3.2.6. I believe should be fine to upgrade but we have no way to test. gem 'pg', '0.21.0' # TODO: latest 1.5.4, need Rails 5 to upgrade to 1.0.0 gem 'pg_array_parser', '0.0.9' # TODO: latest 0.0.9 diff --git a/Gemfile.lock b/Gemfile.lock index fd66980323..ce04cd1048 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -37,10 +37,6 @@ GEM activemodel (= 4.2.11.3) activesupport (= 4.2.11.3) arel (~> 6.0) - activeresource (4.1.0) - activemodel (~> 4.0) - activesupport (~> 4.0) - rails-observers (~> 0.1.2) activesupport (4.2.11.3) i18n (~> 0.7) minitest (~> 5.1) @@ -565,7 +561,6 @@ DEPENDENCIES actionpack-action_caching (~> 1.2, >= 1.2.2) actionpack-page_caching (= 1.1.1) active_model_serializers (= 0.8.4) - activeresource (= 4.1.0) acts-as-taggable-on (= 5.0.0) ahoy_matey (= 1.6.1) annotate (= 2.5.0) diff --git a/config/application.rb b/config/application.rb index d17368955a..f078f6c5ff 100644 --- a/config/application.rb +++ b/config/application.rb @@ -4,7 +4,6 @@ require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" -require "active_resource/railtie" require "sprockets/railtie" require "susy" # require "rails/test_unit/railtie" From a9d0b4dfa8d7840c6e39d28e1853ede5b94fd767 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Mon, 15 Jan 2024 13:05:11 +0000 Subject: [PATCH 072/334] Upgrade Ahoy https://github.com/ankane/ahoy/tree/v1.6.1#140 --- Gemfile | 2 +- Gemfile.lock | 3 +++ db/migrate/20240115115451_ahoy_1_4_0_upgrade_step_0.rb | 8 ++++++++ db/migrate/20240115115456_ahoy_1_4_0_upgrade_step_1.rb | 9 +++++++++ db/migrate/20240115115459_ahoy_1_4_0_upgrade_step_2.rb | 10 ++++++++++ db/migrate/20240115115503_ahoy_1_4_0_upgrade_step_3.rb | 8 ++++++++ 6 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20240115115451_ahoy_1_4_0_upgrade_step_0.rb create mode 100644 db/migrate/20240115115456_ahoy_1_4_0_upgrade_step_1.rb create mode 100644 db/migrate/20240115115459_ahoy_1_4_0_upgrade_step_2.rb create mode 100644 db/migrate/20240115115503_ahoy_1_4_0_upgrade_step_3.rb diff --git a/Gemfile b/Gemfile index 5b9b400cde..6a54e12784 100644 --- a/Gemfile +++ b/Gemfile @@ -66,7 +66,7 @@ gem 'coffee-rails', '4.1.0' # TODO: v5 support Rails 6; 4.1.1 for Rails 5 # gem 'therubyracer', :platforms => :ruby gem 'uglifier', '2.7.2' # TODO: Only works with ES5. Latest version 4.2.0 @ 2019 - +gem 'strong_migrations', '~> 0.3.1' # TODO: should upgrade when we upgrade to rails 5 # To use ActiveModel has_secure_password diff --git a/Gemfile.lock b/Gemfile.lock index ce04cd1048..1a010be57f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -509,6 +509,8 @@ GEM mutex_m net-scp (>= 1.1.2) net-ssh (>= 2.8.0) + strong_migrations (0.3.1) + activerecord (>= 3.2.0) strscan (3.0.7) susy (2.2.14) sass (>= 3.3.0, < 3.5) @@ -648,6 +650,7 @@ DEPENDENCIES slackistrano (= 0.1.9) spring sprockets (= 2.12.5) + strong_migrations (~> 0.3.1) susy (= 2.2.14) test-unit (= 3.1.5) traco (~> 5.3, >= 5.3.3) diff --git a/db/migrate/20240115115451_ahoy_1_4_0_upgrade_step_0.rb b/db/migrate/20240115115451_ahoy_1_4_0_upgrade_step_0.rb new file mode 100644 index 0000000000..5be5885152 --- /dev/null +++ b/db/migrate/20240115115451_ahoy_1_4_0_upgrade_step_0.rb @@ -0,0 +1,8 @@ +# https://github.com/ankane/ahoy/tree/v1.6.1#140 +class Ahoy140UpgradeStep0 < ActiveRecord::Migration + disable_ddl_transaction! + + def change + add_index :ahoy_events, [:name, :time], algorithm: :concurrently + end +end diff --git a/db/migrate/20240115115456_ahoy_1_4_0_upgrade_step_1.rb b/db/migrate/20240115115456_ahoy_1_4_0_upgrade_step_1.rb new file mode 100644 index 0000000000..39bb38d152 --- /dev/null +++ b/db/migrate/20240115115456_ahoy_1_4_0_upgrade_step_1.rb @@ -0,0 +1,9 @@ +# https://github.com/ankane/ahoy/tree/v1.6.1#140 +class Ahoy140UpgradeStep1 < ActiveRecord::Migration + def change + safety_assured { + rename_column :ahoy_events, :properties, :properties_json + add_column :ahoy_events, :properties, :jsonb + } + end +end diff --git a/db/migrate/20240115115459_ahoy_1_4_0_upgrade_step_2.rb b/db/migrate/20240115115459_ahoy_1_4_0_upgrade_step_2.rb new file mode 100644 index 0000000000..f7060fc32f --- /dev/null +++ b/db/migrate/20240115115459_ahoy_1_4_0_upgrade_step_2.rb @@ -0,0 +1,10 @@ +# https://github.com/ankane/ahoy/tree/v1.6.1#140 +# https://stackoverflow.com/a/31672314/556780 +class Ahoy140UpgradeStep2 < ActiveRecord::Migration + disable_ddl_transaction! + def change + Ahoy::Event.where(properties: nil).select(:id).find_in_batches do |events| + Ahoy::Event.where(id: events.map(&:id)).update_all("properties = (regexp_replace(properties_json::text, '\\\\u0000', '', 'g'))::json::jsonb") + end + end +end diff --git a/db/migrate/20240115115503_ahoy_1_4_0_upgrade_step_3.rb b/db/migrate/20240115115503_ahoy_1_4_0_upgrade_step_3.rb new file mode 100644 index 0000000000..5fdbbbf643 --- /dev/null +++ b/db/migrate/20240115115503_ahoy_1_4_0_upgrade_step_3.rb @@ -0,0 +1,8 @@ +# https://github.com/ankane/ahoy/tree/v1.6.1#140 +class Ahoy140UpgradeStep3 < ActiveRecord::Migration + def change + safety_assured { + remove_column :ahoy_events, :properties_json + } + end +end From 95979cc0becc0057eea3fdcead5c952154545179 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Thu, 11 Jan 2024 16:25:09 +0000 Subject: [PATCH 073/334] replace jquery-cookie-rails with js_cookie_rails --- Gemfile | 2 +- Gemfile.lock | 6 +++--- app/assets/javascripts/cites_trade.js | 4 ++-- app/assets/javascripts/cites_trade/application.js | 4 ++-- app/assets/javascripts/species.js | 2 +- .../species/controllers/downloads_controller.js.coffee | 2 +- .../javascripts/species/mixins/signed_in_status.js.coffee | 2 +- .../species/views/downloads/downloads_popup.js.coffee | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 6a54e12784..1d09864946 100644 --- a/Gemfile +++ b/Gemfile @@ -157,7 +157,7 @@ gem 'nested_form', '0.3.2' # TODO: latest @ 2013. Project is public archived on gem 'select2-rails', '3.5.10' # initSelection deprecated on upgrade to version 4 (https://github.com/select2/select2/blob/develop/CHANGELOG.md) gem 'jquery-rails', '2.1.4' # do not upgrade until https://github.com/jquery/jquery/pull/1142 isd pulled into jquery-rails gem 'jquery-mousewheel-rails', '~> 0.0.9' # TODO: latest @ 2014 -gem 'jquery-cookie-rails', '~> 1.3', '>= 1.3.1.1' # TODO: latest @ 2013. No longer maintained. jquery-cookie is now superseded by js-cookie which can be added to your Rails pipeline with js_cookie_rails. +gem 'js_cookie_rails', '~> 2.2' gem 'bootstrap-sass', '2.3.2.2' # TODO: latest 3.4.1 @ 2019. Can't upgrade unless we sure bootstrap v3 backward compatible with boostrap v2 gem 'ember-rails', '0.14.1' # Not support Sprockets 3+ unless upgrade. Latest version support Rails 5.1 gem 'ember-source', '1.6.1' # TODO: just a wrapwrapper. Any update will change the ember.js version. diff --git a/Gemfile.lock b/Gemfile.lock index 1a010be57f..4aab01a1d7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -243,8 +243,6 @@ GEM responders io-wait (0.3.1) jmespath (1.6.2) - jquery-cookie-rails (1.3.1.1) - railties (>= 3.2.0, < 5.0) jquery-mousewheel-rails (0.0.9) railties (>= 3.1) jquery-rails (2.1.4) @@ -252,6 +250,8 @@ GEM thor (>= 0.14, < 2.0) jquery-ui-rails (4.2.1) railties (>= 3.2.16) + js_cookie_rails (2.2.0) + railties (>= 3.1) jslint_on_rails (1.1.1) json (2.7.1) json_spec (1.1.5) @@ -607,10 +607,10 @@ DEPENDENCIES handlebars-source (= 1.0.12) httparty (~> 0.21.0) inherited_resources (= 1.7.2) - jquery-cookie-rails (~> 1.3, >= 1.3.1.1) jquery-mousewheel-rails (~> 0.0.9) jquery-rails (= 2.1.4) jquery-ui-rails (= 4.2.1) + js_cookie_rails (~> 2.2) jslint_on_rails (= 1.1.1) json_spec (= 1.1.5) kaminari (= 1.2.2) diff --git a/app/assets/javascripts/cites_trade.js b/app/assets/javascripts/cites_trade.js index 969fa70453..321c2b860d 100644 --- a/app/assets/javascripts/cites_trade.js +++ b/app/assets/javascripts/cites_trade.js @@ -3,7 +3,7 @@ //= require jquery_ujs //= require jquery.ui.all //= require jquery-deparam -//= require jquery.cookie +//= require js.cookie //= require cites_trade/jquery.jgrowl_minimized //= require cites_trade/jquery.multi-select //= require cites_trade/select2 @@ -17,4 +17,4 @@ //= require cites_trade/topLeft //= require cites_trade/topRight //= require cites_trade/application -//= require_self \ No newline at end of file +//= require_self diff --git a/app/assets/javascripts/cites_trade/application.js b/app/assets/javascripts/cites_trade/application.js index 451248c2e1..a727fe0e23 100644 --- a/app/assets/javascripts/cites_trade/application.js +++ b/app/assets/javascripts/cites_trade/application.js @@ -713,7 +713,7 @@ $(document).ready(function(){ $('input[value=web]').attr("disabled",true); $('span#web-option').css('color', 'LightGray'); } - $('select[name=csvSeparator]').val($.cookie('cites_trade.csv_separator') || 'comma') + $('select[name=csvSeparator]').val(Cookies.get('cites_trade.csv_separator') || 'comma') } function displayResults (q) { @@ -783,7 +783,7 @@ $(document).ready(function(){ goToResults(query); return; } else { - $.cookie('cites_trade.csv_separator', csv_separator) + Cookies.set('cites_trade.csv_separator', csv_separator) query += '&filters[csv_separator]=' + csv_separator; // google analytics function only defined on production diff --git a/app/assets/javascripts/species.js b/app/assets/javascripts/species.js index b53324ee93..0d6f0b3e80 100644 --- a/app/assets/javascripts/species.js +++ b/app/assets/javascripts/species.js @@ -14,7 +14,7 @@ //= require jquery //= require jquery_ujs //= require jquery-deparam -//= require jquery.cookie +//= require js.cookie //= require bootstrap-scrollspy //= require handlebars //= require ember diff --git a/app/assets/javascripts/species/controllers/downloads_controller.js.coffee b/app/assets/javascripts/species/controllers/downloads_controller.js.coffee index f488c2dfe8..156c3d7354 100644 --- a/app/assets/javascripts/species/controllers/downloads_controller.js.coffee +++ b/app/assets/javascripts/species/controllers/downloads_controller.js.coffee @@ -32,7 +32,7 @@ Species.DownloadsController = Ember.Controller.extend Species.Spinner, legislationIsEuDecisions: ( -> @get('euLegislation') == 'decisions' ).property('euLegislation') - csvSeparator: $.cookie('speciesplus.csv_separator') + csvSeparator: Cookies.get('speciesplus.csv_separator') showCsvOptions: () -> $('#csv_options').show() diff --git a/app/assets/javascripts/species/mixins/signed_in_status.js.coffee b/app/assets/javascripts/species/mixins/signed_in_status.js.coffee index 7f0e371a84..cdaebf209a 100644 --- a/app/assets/javascripts/species/mixins/signed_in_status.js.coffee +++ b/app/assets/javascripts/species/mixins/signed_in_status.js.coffee @@ -1,5 +1,5 @@ Species.SignedInStatus = Ember.Mixin.create isSignedIn: ( -> - $.cookie('speciesplus.signed_in') == '1' + Cookies.get('speciesplus.signed_in') == '1' ).property() diff --git a/app/assets/javascripts/species/views/downloads/downloads_popup.js.coffee b/app/assets/javascripts/species/views/downloads/downloads_popup.js.coffee index 376cb8f2aa..4083a46e4b 100644 --- a/app/assets/javascripts/species/views/downloads/downloads_popup.js.coffee +++ b/app/assets/javascripts/species/views/downloads/downloads_popup.js.coffee @@ -4,5 +4,5 @@ Species.DownloadsPopup = Ember.View.extend didInsertElement: () -> $('input[name=csv_separator]').click( (e) -> - $.cookie('speciesplus.csv_separator', e.target.value) + Cookies.set('speciesplus.csv_separator', e.target.value) ) From 7607474de014b15e6c5e6f00835d1c50eddba60e Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 12 Jan 2024 10:23:05 +0000 Subject: [PATCH 074/334] freeze wicked, and update coffee-rails to support rails 5 --- Gemfile | 5 ++--- Gemfile.lock | 17 ++++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index 1d09864946..dcd657db87 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,7 @@ gem 'browser', '2.5.3' # Latest 5.3.1 @ 2021, doesn't work with this project, ma # TODO: starting from v1.4, it break our test due to redirection changes: # rspec ./spec/controllers/admin/nomenclature_changes/lump_controller_spec.rb:147 # rspec ./spec/controllers/admin/nomenclature_changes/split_controller_spec.rb:191 -gem 'wicked', '~> 1.3', '>= 1.3.4' +gem 'wicked', '1.3.4' gem 'groupdate', '2.4.0' # TODO: seems only ApiRequest#recent_requests using this. Suggest rewrite and remove dependencies. @@ -60,7 +60,7 @@ gem 'rails-observers', '~> 0.1.5' # A feature that removed from core in Rails 4. # Gems used for assets gem 'sass-rails', '5.0.7' # TODO: may need to upgrade when upgrade to Rails 5 or 6 (https://github.com/rails/sass-rails/releases) -gem 'coffee-rails', '4.1.0' # TODO: v5 support Rails 6; 4.1.1 for Rails 5 +gem 'coffee-rails', '4.2.2' # TODO: v5 support Rails 6 # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby @@ -149,7 +149,6 @@ gem 'test-unit', '3.1.5' # annoyingly, rails console won't start without it in s # GEM for frontend. gem 'jquery-ui-rails', '4.2.1' # TODO: some breaking change form v5. Latest version 6.0.1 @ 2016 -# gem 'slim', '1.3.6' # I believe not in-use as we do not have .slim file. gem 'susy', '2.2.14' # TODO: Deprecated. 2.2.14 is the latest version @ 2018 gem 'gon', '~> 6.4' # TODO: latest gem "chartkick", '2.3.5' # TODO: latest 5.0.5 @ 2023. Should upgrade to v4 once we upgrade to Rails 5.2+ and Ruby 2.6+ diff --git a/Gemfile.lock b/Gemfile.lock index 4aab01a1d7..cbe0681061 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,7 +58,7 @@ GEM safely_block (>= 0.1.1) user_agent_parser uuidtools - airbrussh (1.5.0) + airbrussh (1.5.1) sshkit (>= 1.6.1, != 1.7.0) annotate (2.5.0) rake @@ -135,9 +135,9 @@ GEM codeclimate-test-reporter (0.1.1) simplecov (>= 0.7.1, < 1.0.0) coderay (1.1.3) - coffee-rails (4.1.0) + coffee-rails (4.2.2) coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.0) + railties (>= 4.0.0) coffee-script (2.4.1) coffee-script-source execjs @@ -307,6 +307,8 @@ GEM timeout net-scp (4.0.0) net-ssh (>= 2.6.5, < 8.0.0) + net-sftp (4.0.0) + net-ssh (>= 5.0.0, < 8.0.0) net-smtp (0.3.0) digest net-protocol @@ -505,9 +507,10 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) - sshkit (1.21.7) + sshkit (1.22.0) mutex_m net-scp (>= 1.1.2) + net-sftp (>= 2.1.2) net-ssh (>= 2.8.0) strong_migrations (0.3.1) activerecord (>= 3.2.0) @@ -521,7 +524,7 @@ GEM power_assert thor (0.20.3) thread_safe (0.3.6) - tilt (1.3.7) + tilt (1.4.1) timeout (0.4.0) tins (1.32.1) sync @@ -587,7 +590,7 @@ DEPENDENCIES chartkick (= 2.3.5) clerk (= 0.2.3) codeclimate-test-reporter (= 0.1.1) - coffee-rails (= 4.1.0) + coffee-rails (= 4.2.2) coveralls (= 0.7.1) dalli (= 2.7.10) database_cleaner (= 1.2.0) @@ -659,7 +662,7 @@ DEPENDENCIES web-console (~> 2.0) webrick (= 1.3.1) whenever (= 0.11.0) - wicked (~> 1.3, >= 1.3.4) + wicked (= 1.3.4) wkhtmltopdf-binary (~> 0.12.6.6) RUBY VERSION From 7a33e9d487cf9a490f8b409f5a73bf40367e0909 Mon Sep 17 00:00:00 2001 From: Leonardo Wong Date: Fri, 12 Jan 2024 10:41:45 +0000 Subject: [PATCH 075/334] Remove jquery-ui-rails gem. Add the js file directly to vendor folder. --- Gemfile | 1 - Gemfile.lock | 3 - app/assets/javascripts/cites_trade.js | 2 +- .../cites_trade/jquery-ui-1.10.4.custom.js | 15008 ++++++++++++++++ 4 files changed, 15009 insertions(+), 5 deletions(-) create mode 100644 vendor/assets/javascripts/cites_trade/jquery-ui-1.10.4.custom.js diff --git a/Gemfile b/Gemfile index dcd657db87..72dbcbfb72 100644 --- a/Gemfile +++ b/Gemfile @@ -148,7 +148,6 @@ gem 'appsignal', '1.3.3' gem 'test-unit', '3.1.5' # annoyingly, rails console won't start without it in staging / production # GEM for frontend. -gem 'jquery-ui-rails', '4.2.1' # TODO: some breaking change form v5. Latest version 6.0.1 @ 2016 gem 'susy', '2.2.14' # TODO: Deprecated. 2.2.14 is the latest version @ 2018 gem 'gon', '~> 6.4' # TODO: latest gem "chartkick", '2.3.5' # TODO: latest 5.0.5 @ 2023. Should upgrade to v4 once we upgrade to Rails 5.2+ and Ruby 2.6+ diff --git a/Gemfile.lock b/Gemfile.lock index cbe0681061..ec49e1870d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -248,8 +248,6 @@ GEM jquery-rails (2.1.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (4.2.1) - railties (>= 3.2.16) js_cookie_rails (2.2.0) railties (>= 3.1) jslint_on_rails (1.1.1) @@ -612,7 +610,6 @@ DEPENDENCIES inherited_resources (= 1.7.2) jquery-mousewheel-rails (~> 0.0.9) jquery-rails (= 2.1.4) - jquery-ui-rails (= 4.2.1) js_cookie_rails (~> 2.2) jslint_on_rails (= 1.1.1) json_spec (= 1.1.5) diff --git a/app/assets/javascripts/cites_trade.js b/app/assets/javascripts/cites_trade.js index 321c2b860d..b14f0e7698 100644 --- a/app/assets/javascripts/cites_trade.js +++ b/app/assets/javascripts/cites_trade.js @@ -1,7 +1,7 @@ //= require underscore //= require jquery //= require jquery_ujs -//= require jquery.ui.all +//= require cites_trade/jquery-ui-1.10.4.custom //= require jquery-deparam //= require js.cookie //= require cites_trade/jquery.jgrowl_minimized diff --git a/vendor/assets/javascripts/cites_trade/jquery-ui-1.10.4.custom.js b/vendor/assets/javascripts/cites_trade/jquery-ui-1.10.4.custom.js new file mode 100644 index 0000000000..9d4bc2a41e --- /dev/null +++ b/vendor/assets/javascripts/cites_trade/jquery-ui-1.10.4.custom.js @@ -0,0 +1,15008 @@ +/*! jQuery UI - v1.10.4 - 2024-01-12 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +(function( $, undefined ) { + +var uuid = 0, + runiqueId = /^ui-id-\d+$/; + +// $.ui might exist from components with no dependencies, e.g., $.ui.position +$.ui = $.ui || {}; + +$.extend( $.ui, { + version: "1.10.4", + + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } +}); + +// plugins +$.fn.extend({ + focus: (function( orig ) { + return function( delay, fn ) { + return typeof delay === "number" ? + this.each(function() { + var elem = this; + setTimeout(function() { + $( elem ).focus(); + if ( fn ) { + fn.call( elem ); + } + }, delay ); + }) : + orig.apply( this, arguments ); + }; + })( $.fn.focus ), + + scrollParent: function() { + var scrollParent; + if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { + scrollParent = this.parents().filter(function() { + return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); + }).eq(0); + } else { + scrollParent = this.parents().filter(function() { + return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); + }).eq(0); + } + + return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; + }, + + zIndex: function( zIndex ) { + if ( zIndex !== undefined ) { + return this.css( "zIndex", zIndex ); + } + + if ( this.length ) { + var elem = $( this[ 0 ] ), position, value; + while ( elem.length && elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css( "position" ); + if ( position === "absolute" || position === "relative" || position === "fixed" ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + //

+ value = parseInt( elem.css( "zIndex" ), 10 ); + if ( !isNaN( value ) && value !== 0 ) { + return value; + } + } + elem = elem.parent(); + } + } + + return 0; + }, + + uniqueId: function() { + return this.each(function() { + if ( !this.id ) { + this.id = "ui-id-" + (++uuid); + } + }); + }, + + removeUniqueId: function() { + return this.each(function() { + if ( runiqueId.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + }); + } +}); + +// selectors +function focusable( element, isTabIndexNotNaN ) { + var map, mapName, img, + nodeName = element.nodeName.toLowerCase(); + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap=#" + mapName + "]" )[0]; + return !!img && visible( img ); + } + return ( /input|select|textarea|button|object/.test( nodeName ) ? + !element.disabled : + "a" === nodeName ? + element.href || isTabIndexNotNaN : + isTabIndexNotNaN) && + // the element and all of its ancestors must be visible + visible( element ); +} + +function visible( element ) { + return $.expr.filters.visible( element ) && + !$( element ).parents().addBack().filter(function() { + return $.css( this, "visibility" ) === "hidden"; + }).length; +} + +$.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo(function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + }) : + // support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + }, + + focusable: function( element ) { + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); + }, + + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + isTabIndexNaN = isNaN( tabIndex ); + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); + } +}); + +// support: jQuery <1.8 +if ( !$( "" ).outerWidth( 1 ).jquery ) { + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + }); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each(function() { + $( this ).css( type, reduce( this, size ) + "px" ); + }); + }; + + $.fn[ "outer" + name] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each(function() { + $( this).css( type, reduce( this, size, true, margin ) + "px" ); + }); + }; + }); +} + +// support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) +if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { + $.fn.removeData = (function( removeData ) { + return function( key ) { + if ( arguments.length ) { + return removeData.call( this, $.camelCase( key ) ); + } else { + return removeData.call( this ); + } + }; + })( $.fn.removeData ); +} + + + + + +// deprecated +$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); + +$.support.selectstart = "onselectstart" in document.createElement( "div" ); +$.fn.extend({ + disableSelection: function() { + return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + + ".ui-disableSelection", function( event ) { + event.preventDefault(); + }); + }, + + enableSelection: function() { + return this.unbind( ".ui-disableSelection" ); + } +}); + +$.extend( $.ui, { + // $.ui.plugin is deprecated. Use $.widget() extensions instead. + plugin: { + add: function( module, option, set ) { + var i, + proto = $.ui[ module ].prototype; + for ( i in set ) { + proto.plugins[ i ] = proto.plugins[ i ] || []; + proto.plugins[ i ].push( [ option, set[ i ] ] ); + } + }, + call: function( instance, name, args ) { + var i, + set = instance.plugins[ name ]; + if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { + return; + } + + for ( i = 0; i < set.length; i++ ) { + if ( instance.options[ set[ i ][ 0 ] ] ) { + set[ i ][ 1 ].apply( instance.element, args ); + } + } + } + }, + + // only used by resizable + hasScroll: function( el, a ) { + + //If overflow is hidden, the element might have extra content, but the user wants to hide it + if ( $( el ).css( "overflow" ) === "hidden") { + return false; + } + + var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", + has = false; + + if ( el[ scroll ] > 0 ) { + return true; + } + + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[ scroll ] = 1; + has = ( el[ scroll ] > 0 ); + el[ scroll ] = 0; + return has; + } +}); + +})( jQuery ); +(function( $, undefined ) { + +var uuid = 0, + slice = Array.prototype.slice, + _cleanData = $.cleanData; +$.cleanData = function( elems ) { + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + try { + $( elem ).triggerHandler( "remove" ); + // http://bugs.jquery.com/ticket/8235 + } catch( e ) {} + } + _cleanData( elems ); +}; + +$.widget = function( name, base, prototype ) { + var fullName, existingConstructor, constructor, basePrototype, + // proxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + proxiedPrototype = {}, + namespace = name.split( "." )[ 0 ]; + + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); + + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = (function() { + var _super = function() { + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; + return function() { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + }); + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + }); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); +}; + +$.widget.extend = function( target ) { + var input = slice.call( arguments, 1 ), + inputIndex = 0, + inputLength = input.length, + key, + value; + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = slice.call( arguments, 1 ), + returnValue = this; + + // allow multiple hashes to be passed on init + options = !isMethodCall && args.length ? + $.widget.extend.apply( null, [ options ].concat(args) ) : + options; + + if ( isMethodCall ) { + this.each(function() { + var methodValue, + instance = $.data( this, fullName ); + if ( !instance ) { + return $.error( "cannot call methods on " + name + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + " widget instance" ); + } + methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + }); + } else { + this.each(function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} )._init(); + } else { + $.data( this, fullName, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + // 1.9 BC for #7810 + // TODO remove dual storage + .removeData( this.widgetName ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + + return this; + }, + + enable: function() { + return this._setOption( "disabled", false ); + }, + disable: function() { + return this._setOption( "disabled", true ); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + // accept selectors, DOM elements + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^(\w+)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +})( jQuery ); +(function( $, undefined ) { + +var mouseHandled = false; +$( document ).mouseup( function() { + mouseHandled = false; +}); + +$.widget("ui.mouse", { + version: "1.10.4", + options: { + cancel: "input,textarea,button,select,option", + distance: 1, + delay: 0 + }, + _mouseInit: function() { + var that = this; + + this.element + .bind("mousedown."+this.widgetName, function(event) { + return that._mouseDown(event); + }) + .bind("click."+this.widgetName, function(event) { + if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { + $.removeData(event.target, that.widgetName + ".preventClickEvent"); + event.stopImmediatePropagation(); + return false; + } + }); + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.unbind("."+this.widgetName); + if ( this._mouseMoveDelegate ) { + $(document) + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); + } + }, + + _mouseDown: function(event) { + // don't let more than one widget handle mouseStart + if( mouseHandled ) { return; } + + // we may have missed mouseup (out of window) + (this._mouseStarted && this._mouseUp(event)); + + this._mouseDownEvent = event; + + var that = this, + btnIsLeft = (event.which === 1), + // event.target.nodeName works around a bug in IE 8 with + // disabled inputs (#7620) + elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { + return true; + } + + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) { + this._mouseDelayTimer = setTimeout(function() { + that.mouseDelayMet = true; + }, this.options.delay); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = (this._mouseStart(event) !== false); + if (!this._mouseStarted) { + event.preventDefault(); + return true; + } + } + + // Click event may never have fired (Gecko & Opera) + if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { + $.removeData(event.target, this.widgetName + ".preventClickEvent"); + } + + // these delegates are required to keep context + this._mouseMoveDelegate = function(event) { + return that._mouseMove(event); + }; + this._mouseUpDelegate = function(event) { + return that._mouseUp(event); + }; + $(document) + .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .bind("mouseup."+this.widgetName, this._mouseUpDelegate); + + event.preventDefault(); + + mouseHandled = true; + return true; + }, + + _mouseMove: function(event) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { + return this._mouseUp(event); + } + + if (this._mouseStarted) { + this._mouseDrag(event); + return event.preventDefault(); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = + (this._mouseStart(this._mouseDownEvent, event) !== false); + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); + } + + return !this._mouseStarted; + }, + + _mouseUp: function(event) { + $(document) + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); + + if (this._mouseStarted) { + this._mouseStarted = false; + + if (event.target === this._mouseDownEvent.target) { + $.data(event.target, this.widgetName + ".preventClickEvent", true); + } + + this._mouseStop(event); + } + + return false; + }, + + _mouseDistanceMet: function(event) { + return (Math.max( + Math.abs(this._mouseDownEvent.pageX - event.pageX), + Math.abs(this._mouseDownEvent.pageY - event.pageY) + ) >= this.options.distance + ); + }, + + _mouseDelayMet: function(/* event */) { + return this.mouseDelayMet; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function(/* event */) {}, + _mouseDrag: function(/* event */) {}, + _mouseStop: function(/* event */) {}, + _mouseCapture: function(/* event */) { return true; } +}); + +})(jQuery); +(function( $, undefined ) { + +$.ui = $.ui || {}; + +var cachedScrollbarWidth, + max = Math.max, + abs = Math.abs, + round = Math.round, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} + +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +function getDimensions( elem ) { + var raw = elem[0]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "
" ), + innerDiv = div.children()[0]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[0].clientWidth; + } + + div.remove(); + + return (cachedScrollbarWidth = w1 - w2); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[0] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: withinElement.offset() || { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + width: isWindow ? withinElement.width() : withinElement.outerWidth(), + height: isWindow ? withinElement.height() : withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + dimensions = getDimensions( target ); + if ( target[0].preventDefault ) { + // force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + // clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + }); + + // normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each(function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + // if the browser doesn't support fractions, then round for consistent results + if ( !$.support.offsetFractions ) { + position.left = round( position.left ); + position.top = round( position.top ); + } + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem : elem + }); + } + }); + + if ( options.using ) { + // adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + }); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // element is wider than within + if ( data.collisionWidth > outerWidth ) { + // element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; + position.left += overLeft - newOverRight; + // element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + // element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + // too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + // too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + // adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // element is taller than within + if ( data.collisionHeight > outerHeight ) { + // element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; + position.top += overTop - newOverBottom; + // element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + // element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + // too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + // too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + // adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } + else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; + if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) { + position.top += myOffset + atOffset + offset; + } + } + else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; + if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +// fraction support test +(function () { + var testElement, testElementParent, testElementStyle, offsetLeft, i, + body = document.getElementsByTagName( "body" )[ 0 ], + div = document.createElement( "div" ); + + //Create a "fake body" for testing based on method used in jQuery.support + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none" + }; + if ( body ) { + $.extend( testElementStyle, { + position: "absolute", + left: "-1000px", + top: "-1000px" + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || document.documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); + + div.style.cssText = "position: absolute; left: 10.7432222px;"; + + offsetLeft = $( div ).offset().left; + $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11; + + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); +})(); + +}( jQuery ) ); +(function( $, undefined ) { + +$.widget("ui.draggable", $.ui.mouse, { + version: "1.10.4", + widgetEventPrefix: "drag", + options: { + addClasses: true, + appendTo: "parent", + axis: false, + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: false, + refreshPositions: false, + revert: false, + revertDuration: 500, + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: false, + + // callbacks + drag: null, + start: null, + stop: null + }, + _create: function() { + + if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) { + this.element[0].style.position = "relative"; + } + if (this.options.addClasses){ + this.element.addClass("ui-draggable"); + } + if (this.options.disabled){ + this.element.addClass("ui-draggable-disabled"); + } + + this._mouseInit(); + + }, + + _destroy: function() { + this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); + this._mouseDestroy(); + }, + + _mouseCapture: function(event) { + + var o = this.options; + + // among others, prevent a drag on a resizable-handle + if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { + return false; + } + + //Quit if we're not on a valid handle + this.handle = this._getHandle(event); + if (!this.handle) { + return false; + } + + $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { + $("
") + .css({ + width: this.offsetWidth+"px", height: this.offsetHeight+"px", + position: "absolute", opacity: "0.001", zIndex: 1000 + }) + .css($(this).offset()) + .appendTo("body"); + }); + + return true; + + }, + + _mouseStart: function(event) { + + var o = this.options; + + //Create and append the visible helper + this.helper = this._createHelper(event); + + this.helper.addClass("ui-draggable-dragging"); + + //Cache the helper size + this._cacheHelperProportions(); + + //If ddmanager is used for droppables, set the global draggable + if($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Store the helper's css position + this.cssPosition = this.helper.css( "position" ); + this.scrollParent = this.helper.scrollParent(); + this.offsetParent = this.helper.offsetParent(); + this.offsetParentCssPosition = this.offsetParent.css( "position" ); + + //The element's absolute position on the page minus margins + this.offset = this.positionAbs = this.element.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + //Reset scroll cache + this.offset.scroll = false; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + //Generate the original position + this.originalPosition = this.position = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Set a containment if given in the options + this._setContainment(); + + //Trigger event + callbacks + if(this._trigger("start", event) === false) { + this._clear(); + return false; + } + + //Recache the helper size + this._cacheHelperProportions(); + + //Prepare the droppable offsets + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + + this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position + + //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003) + if ( $.ui.ddmanager ) { + $.ui.ddmanager.dragStart(this, event); + } + + return true; + }, + + _mouseDrag: function(event, noPropagation) { + // reset any necessary cached properties (see #5009) + if ( this.offsetParentCssPosition === "fixed" ) { + this.offset.parent = this._getParentOffset(); + } + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + //Call plugins and callbacks and use the resulting position if something is returned + if (!noPropagation) { + var ui = this._uiHash(); + if(this._trigger("drag", event, ui) === false) { + this._mouseUp({}); + return false; + } + this.position = ui.position; + } + + if(!this.options.axis || this.options.axis !== "y") { + this.helper[0].style.left = this.position.left+"px"; + } + if(!this.options.axis || this.options.axis !== "x") { + this.helper[0].style.top = this.position.top+"px"; + } + if($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + return false; + }, + + _mouseStop: function(event) { + + //If we are using droppables, inform the manager about the drop + var that = this, + dropped = false; + if ($.ui.ddmanager && !this.options.dropBehaviour) { + dropped = $.ui.ddmanager.drop(this, event); + } + + //if a drop comes from outside (a sortable) + if(this.dropped) { + dropped = this.dropped; + this.dropped = false; + } + + //if the original element is no longer in the DOM don't bother to continue (see #8269) + if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) { + return false; + } + + if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { + $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { + if(that._trigger("stop", event) !== false) { + that._clear(); + } + }); + } else { + if(this._trigger("stop", event) !== false) { + this._clear(); + } + } + + return false; + }, + + _mouseUp: function(event) { + //Remove frame helpers + $("div.ui-draggable-iframeFix").each(function() { + this.parentNode.removeChild(this); + }); + + //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) + if( $.ui.ddmanager ) { + $.ui.ddmanager.dragStop(this, event); + } + + return $.ui.mouse.prototype._mouseUp.call(this, event); + }, + + cancel: function() { + + if(this.helper.is(".ui-draggable-dragging")) { + this._mouseUp({}); + } else { + this._clear(); + } + + return this; + + }, + + _getHandle: function(event) { + return this.options.handle ? + !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : + true; + }, + + _createHelper: function(event) { + + var o = this.options, + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element); + + if(!helper.parents("body").length) { + helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo)); + } + + if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) { + helper.css("position", "absolute"); + } + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + //Get the offsetParent and cache its position + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + //This needs to be actually done for all browsers, since pageX/pageY includes this information + //Ugly IE fix + if((this.offsetParent[0] === document.body) || + (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition === "relative") { + var p = this.element.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.element.css("marginLeft"),10) || 0), + top: (parseInt(this.element.css("marginTop"),10) || 0), + right: (parseInt(this.element.css("marginRight"),10) || 0), + bottom: (parseInt(this.element.css("marginBottom"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var over, c, ce, + o = this.options; + + if ( !o.containment ) { + this.containment = null; + return; + } + + if ( o.containment === "window" ) { + this.containment = [ + $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, + $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, + $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left, + $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top + ]; + return; + } + + if ( o.containment === "document") { + this.containment = [ + 0, + 0, + $( document ).width() - this.helperProportions.width - this.margins.left, + ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top + ]; + return; + } + + if ( o.containment.constructor === Array ) { + this.containment = o.containment; + return; + } + + if ( o.containment === "parent" ) { + o.containment = this.helper[ 0 ].parentNode; + } + + c = $( o.containment ); + ce = c[ 0 ]; + + if( !ce ) { + return; + } + + over = c.css( "overflow" ) !== "hidden"; + + this.containment = [ + ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), + ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) , + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right, + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top - this.margins.bottom + ]; + this.relative_container = c; + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) { + pos = this.position; + } + + var mod = d === "absolute" ? 1 : -1, + scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent; + + //Cache the scroll + if (!this.offset.scroll) { + this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()}; + } + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod ) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod ) + ) + }; + + }, + + _generatePosition: function(event) { + + var containment, co, top, left, + o = this.options, + scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent, + pageX = event.pageX, + pageY = event.pageY; + + //Cache the scroll + if (!this.offset.scroll) { + this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()}; + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + // If we are not dragging yet, we won't check for options + if ( this.originalPosition ) { + if ( this.containment ) { + if ( this.relative_container ){ + co = this.relative_container.offset(); + containment = [ + this.containment[ 0 ] + co.left, + this.containment[ 1 ] + co.top, + this.containment[ 2 ] + co.left, + this.containment[ 3 ] + co.top + ]; + } + else { + containment = this.containment; + } + + if(event.pageX - this.offset.click.left < containment[0]) { + pageX = containment[0] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top < containment[1]) { + pageY = containment[1] + this.offset.click.top; + } + if(event.pageX - this.offset.click.left > containment[2]) { + pageX = containment[2] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top > containment[3]) { + pageY = containment[3] + this.offset.click.top; + } + } + + if(o.grid) { + //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950) + top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; + pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; + pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) + ) + }; + + }, + + _clear: function() { + this.helper.removeClass("ui-draggable-dragging"); + if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) { + this.helper.remove(); + } + this.helper = null; + this.cancelHelperRemoval = false; + }, + + // From now on bulk stuff - mainly helpers + + _trigger: function(type, event, ui) { + ui = ui || this._uiHash(); + $.ui.plugin.call(this, type, [event, ui]); + //The absolute position has to be recalculated after plugins + if(type === "drag") { + this.positionAbs = this._convertPositionTo("absolute"); + } + return $.Widget.prototype._trigger.call(this, type, event, ui); + }, + + plugins: {}, + + _uiHash: function() { + return { + helper: this.helper, + position: this.position, + originalPosition: this.originalPosition, + offset: this.positionAbs + }; + } + +}); + +$.ui.plugin.add("draggable", "connectToSortable", { + start: function(event, ui) { + + var inst = $(this).data("ui-draggable"), o = inst.options, + uiSortable = $.extend({}, ui, { item: inst.element }); + inst.sortables = []; + $(o.connectToSortable).each(function() { + var sortable = $.data(this, "ui-sortable"); + if (sortable && !sortable.options.disabled) { + inst.sortables.push({ + instance: sortable, + shouldRevert: sortable.options.revert + }); + sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page). + sortable._trigger("activate", event, uiSortable); + } + }); + + }, + stop: function(event, ui) { + + //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper + var inst = $(this).data("ui-draggable"), + uiSortable = $.extend({}, ui, { item: inst.element }); + + $.each(inst.sortables, function() { + if(this.instance.isOver) { + + this.instance.isOver = 0; + + inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance + this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) + + //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid" + if(this.shouldRevert) { + this.instance.options.revert = this.shouldRevert; + } + + //Trigger the stop of the sortable + this.instance._mouseStop(event); + + this.instance.options.helper = this.instance.options._helper; + + //If the helper has been the original item, restore properties in the sortable + if(inst.options.helper === "original") { + this.instance.currentItem.css({ top: "auto", left: "auto" }); + } + + } else { + this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance + this.instance._trigger("deactivate", event, uiSortable); + } + + }); + + }, + drag: function(event, ui) { + + var inst = $(this).data("ui-draggable"), that = this; + + $.each(inst.sortables, function() { + + var innermostIntersecting = false, + thisSortable = this; + + //Copy over some variables to allow calling the sortable's native _intersectsWith + this.instance.positionAbs = inst.positionAbs; + this.instance.helperProportions = inst.helperProportions; + this.instance.offset.click = inst.offset.click; + + if(this.instance._intersectsWith(this.instance.containerCache)) { + innermostIntersecting = true; + $.each(inst.sortables, function () { + this.instance.positionAbs = inst.positionAbs; + this.instance.helperProportions = inst.helperProportions; + this.instance.offset.click = inst.offset.click; + if (this !== thisSortable && + this.instance._intersectsWith(this.instance.containerCache) && + $.contains(thisSortable.instance.element[0], this.instance.element[0]) + ) { + innermostIntersecting = false; + } + return innermostIntersecting; + }); + } + + + if(innermostIntersecting) { + //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once + if(!this.instance.isOver) { + + this.instance.isOver = 1; + //Now we fake the start of dragging for the sortable instance, + //by cloning the list group item, appending it to the sortable and using it as inst.currentItem + //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) + this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true); + this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it + this.instance.options.helper = function() { return ui.helper[0]; }; + + event.target = this.instance.currentItem[0]; + this.instance._mouseCapture(event, true); + this.instance._mouseStart(event, true, true); + + //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes + this.instance.offset.click.top = inst.offset.click.top; + this.instance.offset.click.left = inst.offset.click.left; + this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; + this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; + + inst._trigger("toSortable", event); + inst.dropped = this.instance.element; //draggable revert needs that + //hack so receive/update callbacks work (mostly) + inst.currentItem = inst.element; + this.instance.fromOutside = inst; + + } + + //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable + if(this.instance.currentItem) { + this.instance._mouseDrag(event); + } + + } else { + + //If it doesn't intersect with the sortable, and it intersected before, + //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval + if(this.instance.isOver) { + + this.instance.isOver = 0; + this.instance.cancelHelperRemoval = true; + + //Prevent reverting on this forced stop + this.instance.options.revert = false; + + // The out event needs to be triggered independently + this.instance._trigger("out", event, this.instance._uiHash(this.instance)); + + this.instance._mouseStop(event, true); + this.instance.options.helper = this.instance.options._helper; + + //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size + this.instance.currentItem.remove(); + if(this.instance.placeholder) { + this.instance.placeholder.remove(); + } + + inst._trigger("fromSortable", event); + inst.dropped = false; //draggable revert needs that + } + + } + + }); + + } +}); + +$.ui.plugin.add("draggable", "cursor", { + start: function() { + var t = $("body"), o = $(this).data("ui-draggable").options; + if (t.css("cursor")) { + o._cursor = t.css("cursor"); + } + t.css("cursor", o.cursor); + }, + stop: function() { + var o = $(this).data("ui-draggable").options; + if (o._cursor) { + $("body").css("cursor", o._cursor); + } + } +}); + +$.ui.plugin.add("draggable", "opacity", { + start: function(event, ui) { + var t = $(ui.helper), o = $(this).data("ui-draggable").options; + if(t.css("opacity")) { + o._opacity = t.css("opacity"); + } + t.css("opacity", o.opacity); + }, + stop: function(event, ui) { + var o = $(this).data("ui-draggable").options; + if(o._opacity) { + $(ui.helper).css("opacity", o._opacity); + } + } +}); + +$.ui.plugin.add("draggable", "scroll", { + start: function() { + var i = $(this).data("ui-draggable"); + if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { + i.overflowOffset = i.scrollParent.offset(); + } + }, + drag: function( event ) { + + var i = $(this).data("ui-draggable"), o = i.options, scrolled = false; + + if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { + + if(!o.axis || o.axis !== "x") { + if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; + } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) { + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; + } + } + + if(!o.axis || o.axis !== "y") { + if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; + } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) { + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; + } + } + + } else { + + if(!o.axis || o.axis !== "x") { + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + } + } + + if(!o.axis || o.axis !== "y") { + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + } + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(i, event); + } + + } +}); + +$.ui.plugin.add("draggable", "snap", { + start: function() { + + var i = $(this).data("ui-draggable"), + o = i.options; + + i.snapElements = []; + + $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() { + var $t = $(this), + $o = $t.offset(); + if(this !== i.element[0]) { + i.snapElements.push({ + item: this, + width: $t.outerWidth(), height: $t.outerHeight(), + top: $o.top, left: $o.left + }); + } + }); + + }, + drag: function(event, ui) { + + var ts, bs, ls, rs, l, r, t, b, i, first, + inst = $(this).data("ui-draggable"), + o = inst.options, + d = o.snapTolerance, + x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, + y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; + + for (i = inst.snapElements.length - 1; i >= 0; i--){ + + l = inst.snapElements[i].left; + r = l + inst.snapElements[i].width; + t = inst.snapElements[i].top; + b = t + inst.snapElements[i].height; + + if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) { + if(inst.snapElements[i].snapping) { + (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + } + inst.snapElements[i].snapping = false; + continue; + } + + if(o.snapMode !== "inner") { + ts = Math.abs(t - y2) <= d; + bs = Math.abs(b - y1) <= d; + ls = Math.abs(l - x2) <= d; + rs = Math.abs(r - x1) <= d; + if(ts) { + ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; + } + if(bs) { + ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; + } + if(ls) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; + } + if(rs) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; + } + } + + first = (ts || bs || ls || rs); + + if(o.snapMode !== "outer") { + ts = Math.abs(t - y1) <= d; + bs = Math.abs(b - y2) <= d; + ls = Math.abs(l - x1) <= d; + rs = Math.abs(r - x2) <= d; + if(ts) { + ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; + } + if(bs) { + ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; + } + if(ls) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; + } + if(rs) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; + } + } + + if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) { + (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + } + inst.snapElements[i].snapping = (ts || bs || ls || rs || first); + + } + + } +}); + +$.ui.plugin.add("draggable", "stack", { + start: function() { + var min, + o = this.data("ui-draggable").options, + group = $.makeArray($(o.stack)).sort(function(a,b) { + return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0); + }); + + if (!group.length) { return; } + + min = parseInt($(group[0]).css("zIndex"), 10) || 0; + $(group).each(function(i) { + $(this).css("zIndex", min + i); + }); + this.css("zIndex", (min + group.length)); + } +}); + +$.ui.plugin.add("draggable", "zIndex", { + start: function(event, ui) { + var t = $(ui.helper), o = $(this).data("ui-draggable").options; + if(t.css("zIndex")) { + o._zIndex = t.css("zIndex"); + } + t.css("zIndex", o.zIndex); + }, + stop: function(event, ui) { + var o = $(this).data("ui-draggable").options; + if(o._zIndex) { + $(ui.helper).css("zIndex", o._zIndex); + } + } +}); + +})(jQuery); +(function( $, undefined ) { + +function isOverAxis( x, reference, size ) { + return ( x > reference ) && ( x < ( reference + size ) ); +} + +$.widget("ui.droppable", { + version: "1.10.4", + widgetEventPrefix: "drop", + options: { + accept: "*", + activeClass: false, + addClasses: true, + greedy: false, + hoverClass: false, + scope: "default", + tolerance: "intersect", + + // callbacks + activate: null, + deactivate: null, + drop: null, + out: null, + over: null + }, + _create: function() { + + var proportions, + o = this.options, + accept = o.accept; + + this.isover = false; + this.isout = true; + + this.accept = $.isFunction(accept) ? accept : function(d) { + return d.is(accept); + }; + + this.proportions = function( /* valueToWrite */ ) { + if ( arguments.length ) { + // Store the droppable's proportions + proportions = arguments[ 0 ]; + } else { + // Retrieve or derive the droppable's proportions + return proportions ? + proportions : + proportions = { + width: this.element[ 0 ].offsetWidth, + height: this.element[ 0 ].offsetHeight + }; + } + }; + + // Add the reference and positions to the manager + $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || []; + $.ui.ddmanager.droppables[o.scope].push(this); + + (o.addClasses && this.element.addClass("ui-droppable")); + + }, + + _destroy: function() { + var i = 0, + drop = $.ui.ddmanager.droppables[this.options.scope]; + + for ( ; i < drop.length; i++ ) { + if ( drop[i] === this ) { + drop.splice(i, 1); + } + } + + this.element.removeClass("ui-droppable ui-droppable-disabled"); + }, + + _setOption: function(key, value) { + + if(key === "accept") { + this.accept = $.isFunction(value) ? value : function(d) { + return d.is(value); + }; + } + $.Widget.prototype._setOption.apply(this, arguments); + }, + + _activate: function(event) { + var draggable = $.ui.ddmanager.current; + if(this.options.activeClass) { + this.element.addClass(this.options.activeClass); + } + if(draggable){ + this._trigger("activate", event, this.ui(draggable)); + } + }, + + _deactivate: function(event) { + var draggable = $.ui.ddmanager.current; + if(this.options.activeClass) { + this.element.removeClass(this.options.activeClass); + } + if(draggable){ + this._trigger("deactivate", event, this.ui(draggable)); + } + }, + + _over: function(event) { + + var draggable = $.ui.ddmanager.current; + + // Bail if draggable and droppable are same element + if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) { + return; + } + + if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.hoverClass) { + this.element.addClass(this.options.hoverClass); + } + this._trigger("over", event, this.ui(draggable)); + } + + }, + + _out: function(event) { + + var draggable = $.ui.ddmanager.current; + + // Bail if draggable and droppable are same element + if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) { + return; + } + + if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.hoverClass) { + this.element.removeClass(this.options.hoverClass); + } + this._trigger("out", event, this.ui(draggable)); + } + + }, + + _drop: function(event,custom) { + + var draggable = custom || $.ui.ddmanager.current, + childrenIntersection = false; + + // Bail if draggable and droppable are same element + if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) { + return false; + } + + this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() { + var inst = $.data(this, "ui-droppable"); + if( + inst.options.greedy && + !inst.options.disabled && + inst.options.scope === draggable.options.scope && + inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) && + $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance) + ) { childrenIntersection = true; return false; } + }); + if(childrenIntersection) { + return false; + } + + if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.activeClass) { + this.element.removeClass(this.options.activeClass); + } + if(this.options.hoverClass) { + this.element.removeClass(this.options.hoverClass); + } + this._trigger("drop", event, this.ui(draggable)); + return this.element; + } + + return false; + + }, + + ui: function(c) { + return { + draggable: (c.currentItem || c.element), + helper: c.helper, + position: c.position, + offset: c.positionAbs + }; + } + +}); + +$.ui.intersect = function(draggable, droppable, toleranceMode) { + + if (!droppable.offset) { + return false; + } + + var draggableLeft, draggableTop, + x1 = (draggable.positionAbs || draggable.position.absolute).left, + y1 = (draggable.positionAbs || draggable.position.absolute).top, + x2 = x1 + draggable.helperProportions.width, + y2 = y1 + draggable.helperProportions.height, + l = droppable.offset.left, + t = droppable.offset.top, + r = l + droppable.proportions().width, + b = t + droppable.proportions().height; + + switch (toleranceMode) { + case "fit": + return (l <= x1 && x2 <= r && t <= y1 && y2 <= b); + case "intersect": + return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half + x2 - (draggable.helperProportions.width / 2) < r && // Left Half + t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half + y2 - (draggable.helperProportions.height / 2) < b ); // Top Half + case "pointer": + draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left); + draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top); + return isOverAxis( draggableTop, t, droppable.proportions().height ) && isOverAxis( draggableLeft, l, droppable.proportions().width ); + case "touch": + return ( + (y1 >= t && y1 <= b) || // Top edge touching + (y2 >= t && y2 <= b) || // Bottom edge touching + (y1 < t && y2 > b) // Surrounded vertically + ) && ( + (x1 >= l && x1 <= r) || // Left edge touching + (x2 >= l && x2 <= r) || // Right edge touching + (x1 < l && x2 > r) // Surrounded horizontally + ); + default: + return false; + } + +}; + +/* + This manager tracks offsets of draggables and droppables +*/ +$.ui.ddmanager = { + current: null, + droppables: { "default": [] }, + prepareOffsets: function(t, event) { + + var i, j, + m = $.ui.ddmanager.droppables[t.options.scope] || [], + type = event ? event.type : null, // workaround for #2317 + list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(); + + droppablesLoop: for (i = 0; i < m.length; i++) { + + //No disabled and non-accepted + if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) { + continue; + } + + // Filter out elements in the current dragged item + for (j=0; j < list.length; j++) { + if(list[j] === m[i].element[0]) { + m[i].proportions().height = 0; + continue droppablesLoop; + } + } + + m[i].visible = m[i].element.css("display") !== "none"; + if(!m[i].visible) { + continue; + } + + //Activate the droppable if used directly from draggables + if(type === "mousedown") { + m[i]._activate.call(m[i], event); + } + + m[ i ].offset = m[ i ].element.offset(); + m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight }); + + } + + }, + drop: function(draggable, event) { + + var dropped = false; + // Create a copy of the droppables in case the list changes during the drop (#9116) + $.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() { + + if(!this.options) { + return; + } + if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) { + dropped = this._drop.call(this, event) || dropped; + } + + if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + this.isout = true; + this.isover = false; + this._deactivate.call(this, event); + } + + }); + return dropped; + + }, + dragStart: function( draggable, event ) { + //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) + draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() { + if( !draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + }); + }, + drag: function(draggable, event) { + + //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. + if(draggable.options.refreshPositions) { + $.ui.ddmanager.prepareOffsets(draggable, event); + } + + //Run through all droppables and check their positions based on specific tolerance options + $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { + + if(this.options.disabled || this.greedyChild || !this.visible) { + return; + } + + var parentInstance, scope, parent, + intersects = $.ui.intersect(draggable, this, this.options.tolerance), + c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null); + if(!c) { + return; + } + + if (this.options.greedy) { + // find droppable parents with same scope + scope = this.options.scope; + parent = this.element.parents(":data(ui-droppable)").filter(function () { + return $.data(this, "ui-droppable").options.scope === scope; + }); + + if (parent.length) { + parentInstance = $.data(parent[0], "ui-droppable"); + parentInstance.greedyChild = (c === "isover"); + } + } + + // we just moved into a greedy child + if (parentInstance && c === "isover") { + parentInstance.isover = false; + parentInstance.isout = true; + parentInstance._out.call(parentInstance, event); + } + + this[c] = true; + this[c === "isout" ? "isover" : "isout"] = false; + this[c === "isover" ? "_over" : "_out"].call(this, event); + + // we just moved out of a greedy child + if (parentInstance && c === "isout") { + parentInstance.isout = false; + parentInstance.isover = true; + parentInstance._over.call(parentInstance, event); + } + }); + + }, + dragStop: function( draggable, event ) { + draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); + //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) + if( !draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + } +}; + +})(jQuery); +(function( $, undefined ) { + +function num(v) { + return parseInt(v, 10) || 0; +} + +function isNumber(value) { + return !isNaN(parseInt(value, 10)); +} + +$.widget("ui.resizable", $.ui.mouse, { + version: "1.10.4", + widgetEventPrefix: "resize", + options: { + alsoResize: false, + animate: false, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: false, + autoHide: false, + containment: false, + ghost: false, + grid: false, + handles: "e,s,se", + helper: false, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + // See #7960 + zIndex: 90, + + // callbacks + resize: null, + start: null, + stop: null + }, + _create: function() { + + var n, i, handle, axis, hname, + that = this, + o = this.options; + this.element.addClass("ui-resizable"); + + $.extend(this, { + _aspectRatio: !!(o.aspectRatio), + aspectRatio: o.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null + }); + + //Wrap the element if it cannot hold child nodes + if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { + + //Create a wrapper element and set the wrapper to the new current internal element + this.element.wrap( + $("
").css({ + position: this.element.css("position"), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css("top"), + left: this.element.css("left") + }) + ); + + //Overwrite the original this.element + this.element = this.element.parent().data( + "ui-resizable", this.element.data("ui-resizable") + ); + + this.elementIsWrapper = true; + + //Move margins to the wrapper + this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") }); + this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}); + + //Prevent Safari textarea resize + this.originalResizeStyle = this.originalElement.css("resize"); + this.originalElement.css("resize", "none"); + + //Push the actual element to our proportionallyResize internal array + this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })); + + // avoid IE jump (hard set the margin) + this.originalElement.css({ margin: this.originalElement.css("margin") }); + + // fix handlers offset + this._proportionallyResize(); + + } + + this.handles = o.handles || (!$(".ui-resizable-handle", this.element).length ? "e,s,se" : { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" }); + if(this.handles.constructor === String) { + + if ( this.handles === "all") { + this.handles = "n,e,s,w,se,sw,ne,nw"; + } + + n = this.handles.split(","); + this.handles = {}; + + for(i = 0; i < n.length; i++) { + + handle = $.trim(n[i]); + hname = "ui-resizable-"+handle; + axis = $("
"); + + // Apply zIndex to all handles - see #7960 + axis.css({ zIndex: o.zIndex }); + + //TODO : What's going on here? + if ("se" === handle) { + axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); + } + + //Insert into internal handles object and append to element + this.handles[handle] = ".ui-resizable-"+handle; + this.element.append(axis); + } + + } + + this._renderAxis = function(target) { + + var i, axis, padPos, padWrapper; + + target = target || this.element; + + for(i in this.handles) { + + if(this.handles[i].constructor === String) { + this.handles[i] = $(this.handles[i], this.element).show(); + } + + //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls) + if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { + + axis = $(this.handles[i], this.element); + + //Checking the correct pad and border + padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); + + //The padding type i have to apply... + padPos = [ "padding", + /ne|nw|n/.test(i) ? "Top" : + /se|sw|s/.test(i) ? "Bottom" : + /^e$/.test(i) ? "Right" : "Left" ].join(""); + + target.css(padPos, padWrapper); + + this._proportionallyResize(); + + } + + //TODO: What's that good for? There's not anything to be executed left + if(!$(this.handles[i]).length) { + continue; + } + } + }; + + //TODO: make renderAxis a prototype function + this._renderAxis(this.element); + + this._handles = $(".ui-resizable-handle", this.element) + .disableSelection(); + + //Matching axis name + this._handles.mouseover(function() { + if (!that.resizing) { + if (this.className) { + axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); + } + //Axis, default = se + that.axis = axis && axis[1] ? axis[1] : "se"; + } + }); + + //If we want to auto hide the elements + if (o.autoHide) { + this._handles.hide(); + $(this.element) + .addClass("ui-resizable-autohide") + .mouseenter(function() { + if (o.disabled) { + return; + } + $(this).removeClass("ui-resizable-autohide"); + that._handles.show(); + }) + .mouseleave(function(){ + if (o.disabled) { + return; + } + if (!that.resizing) { + $(this).addClass("ui-resizable-autohide"); + that._handles.hide(); + } + }); + } + + //Initialize the mouse interaction + this._mouseInit(); + + }, + + _destroy: function() { + + this._mouseDestroy(); + + var wrapper, + _destroy = function(exp) { + $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") + .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove(); + }; + + //TODO: Unwrap at same DOM position + if (this.elementIsWrapper) { + _destroy(this.element); + wrapper = this.element; + this.originalElement.css({ + position: wrapper.css("position"), + width: wrapper.outerWidth(), + height: wrapper.outerHeight(), + top: wrapper.css("top"), + left: wrapper.css("left") + }).insertAfter( wrapper ); + wrapper.remove(); + } + + this.originalElement.css("resize", this.originalResizeStyle); + _destroy(this.originalElement); + + return this; + }, + + _mouseCapture: function(event) { + var i, handle, + capture = false; + + for (i in this.handles) { + handle = $(this.handles[i])[0]; + if (handle === event.target || $.contains(handle, event.target)) { + capture = true; + } + } + + return !this.options.disabled && capture; + }, + + _mouseStart: function(event) { + + var curleft, curtop, cursor, + o = this.options, + iniPos = this.element.position(), + el = this.element; + + this.resizing = true; + + // bugfix for http://dev.jquery.com/ticket/1749 + if ( (/absolute/).test( el.css("position") ) ) { + el.css({ position: "absolute", top: el.css("top"), left: el.css("left") }); + } else if (el.is(".ui-draggable")) { + el.css({ position: "absolute", top: iniPos.top, left: iniPos.left }); + } + + this._renderProxy(); + + curleft = num(this.helper.css("left")); + curtop = num(this.helper.css("top")); + + if (o.containment) { + curleft += $(o.containment).scrollLeft() || 0; + curtop += $(o.containment).scrollTop() || 0; + } + + //Store needed variables + this.offset = this.helper.offset(); + this.position = { left: curleft, top: curtop }; + this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: el.width(), height: el.height() }; + this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; + this.originalPosition = { left: curleft, top: curtop }; + this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; + this.originalMousePosition = { left: event.pageX, top: event.pageY }; + + //Aspect Ratio + this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1); + + cursor = $(".ui-resizable-" + this.axis).css("cursor"); + $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor); + + el.addClass("ui-resizable-resizing"); + this._propagate("start", event); + return true; + }, + + _mouseDrag: function(event) { + + //Increase performance, avoid regex + var data, + el = this.helper, props = {}, + smp = this.originalMousePosition, + a = this.axis, + prevTop = this.position.top, + prevLeft = this.position.left, + prevWidth = this.size.width, + prevHeight = this.size.height, + dx = (event.pageX-smp.left)||0, + dy = (event.pageY-smp.top)||0, + trigger = this._change[a]; + + if (!trigger) { + return false; + } + + // Calculate the attrs that will be change + data = trigger.apply(this, [event, dx, dy]); + + // Put this in the mouseDrag handler since the user can start pressing shift while resizing + this._updateVirtualBoundaries(event.shiftKey); + if (this._aspectRatio || event.shiftKey) { + data = this._updateRatio(data, event); + } + + data = this._respectSize(data, event); + + this._updateCache(data); + + // plugins callbacks need to be called first + this._propagate("resize", event); + + if (this.position.top !== prevTop) { + props.top = this.position.top + "px"; + } + if (this.position.left !== prevLeft) { + props.left = this.position.left + "px"; + } + if (this.size.width !== prevWidth) { + props.width = this.size.width + "px"; + } + if (this.size.height !== prevHeight) { + props.height = this.size.height + "px"; + } + el.css(props); + + if (!this._helper && this._proportionallyResizeElements.length) { + this._proportionallyResize(); + } + + // Call the user callback if the element was resized + if ( ! $.isEmptyObject(props) ) { + this._trigger("resize", event, this.ui()); + } + + return false; + }, + + _mouseStop: function(event) { + + this.resizing = false; + var pr, ista, soffseth, soffsetw, s, left, top, + o = this.options, that = this; + + if(this._helper) { + + pr = this._proportionallyResizeElements; + ista = pr.length && (/textarea/i).test(pr[0].nodeName); + soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height; + soffsetw = ista ? 0 : that.sizeDiff.width; + + s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) }; + left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null; + top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null; + + if (!o.animate) { + this.element.css($.extend(s, { top: top, left: left })); + } + + that.helper.height(that.size.height); + that.helper.width(that.size.width); + + if (this._helper && !o.animate) { + this._proportionallyResize(); + } + } + + $("body").css("cursor", "auto"); + + this.element.removeClass("ui-resizable-resizing"); + + this._propagate("stop", event); + + if (this._helper) { + this.helper.remove(); + } + + return false; + + }, + + _updateVirtualBoundaries: function(forceAspectRatio) { + var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, + o = this.options; + + b = { + minWidth: isNumber(o.minWidth) ? o.minWidth : 0, + maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity, + minHeight: isNumber(o.minHeight) ? o.minHeight : 0, + maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity + }; + + if(this._aspectRatio || forceAspectRatio) { + // We want to create an enclosing box whose aspect ration is the requested one + // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension + pMinWidth = b.minHeight * this.aspectRatio; + pMinHeight = b.minWidth / this.aspectRatio; + pMaxWidth = b.maxHeight * this.aspectRatio; + pMaxHeight = b.maxWidth / this.aspectRatio; + + if(pMinWidth > b.minWidth) { + b.minWidth = pMinWidth; + } + if(pMinHeight > b.minHeight) { + b.minHeight = pMinHeight; + } + if(pMaxWidth < b.maxWidth) { + b.maxWidth = pMaxWidth; + } + if(pMaxHeight < b.maxHeight) { + b.maxHeight = pMaxHeight; + } + } + this._vBoundaries = b; + }, + + _updateCache: function(data) { + this.offset = this.helper.offset(); + if (isNumber(data.left)) { + this.position.left = data.left; + } + if (isNumber(data.top)) { + this.position.top = data.top; + } + if (isNumber(data.height)) { + this.size.height = data.height; + } + if (isNumber(data.width)) { + this.size.width = data.width; + } + }, + + _updateRatio: function( data ) { + + var cpos = this.position, + csize = this.size, + a = this.axis; + + if (isNumber(data.height)) { + data.width = (data.height * this.aspectRatio); + } else if (isNumber(data.width)) { + data.height = (data.width / this.aspectRatio); + } + + if (a === "sw") { + data.left = cpos.left + (csize.width - data.width); + data.top = null; + } + if (a === "nw") { + data.top = cpos.top + (csize.height - data.height); + data.left = cpos.left + (csize.width - data.width); + } + + return data; + }, + + _respectSize: function( data ) { + + var o = this._vBoundaries, + a = this.axis, + ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), + isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height), + dw = this.originalPosition.left + this.originalSize.width, + dh = this.position.top + this.size.height, + cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); + if (isminw) { + data.width = o.minWidth; + } + if (isminh) { + data.height = o.minHeight; + } + if (ismaxw) { + data.width = o.maxWidth; + } + if (ismaxh) { + data.height = o.maxHeight; + } + + if (isminw && cw) { + data.left = dw - o.minWidth; + } + if (ismaxw && cw) { + data.left = dw - o.maxWidth; + } + if (isminh && ch) { + data.top = dh - o.minHeight; + } + if (ismaxh && ch) { + data.top = dh - o.maxHeight; + } + + // fixing jump error on top/left - bug #2330 + if (!data.width && !data.height && !data.left && data.top) { + data.top = null; + } else if (!data.width && !data.height && !data.top && data.left) { + data.left = null; + } + + return data; + }, + + _proportionallyResize: function() { + + if (!this._proportionallyResizeElements.length) { + return; + } + + var i, j, borders, paddings, prel, + element = this.helper || this.element; + + for ( i=0; i < this._proportionallyResizeElements.length; i++) { + + prel = this._proportionallyResizeElements[i]; + + if (!this.borderDif) { + this.borderDif = []; + borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")]; + paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")]; + + for ( j = 0; j < borders.length; j++ ) { + this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 ); + } + } + + prel.css({ + height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0, + width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0 + }); + + } + + }, + + _renderProxy: function() { + + var el = this.element, o = this.options; + this.elementOffset = el.offset(); + + if(this._helper) { + + this.helper = this.helper || $("
"); + + this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() - 1, + height: this.element.outerHeight() - 1, + position: "absolute", + left: this.elementOffset.left +"px", + top: this.elementOffset.top +"px", + zIndex: ++o.zIndex //TODO: Don't modify option + }); + + this.helper + .appendTo("body") + .disableSelection(); + + } else { + this.helper = this.element; + } + + }, + + _change: { + e: function(event, dx) { + return { width: this.originalSize.width + dx }; + }, + w: function(event, dx) { + var cs = this.originalSize, sp = this.originalPosition; + return { left: sp.left + dx, width: cs.width - dx }; + }, + n: function(event, dx, dy) { + var cs = this.originalSize, sp = this.originalPosition; + return { top: sp.top + dy, height: cs.height - dy }; + }, + s: function(event, dx, dy) { + return { height: this.originalSize.height + dy }; + }, + se: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); + }, + sw: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); + }, + ne: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); + }, + nw: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); + } + }, + + _propagate: function(n, event) { + $.ui.plugin.call(this, n, [event, this.ui()]); + (n !== "resize" && this._trigger(n, event, this.ui())); + }, + + plugins: {}, + + ui: function() { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition + }; + } + +}); + +/* + * Resizable Extensions + */ + +$.ui.plugin.add("resizable", "animate", { + + stop: function( event ) { + var that = $(this).data("ui-resizable"), + o = that.options, + pr = that._proportionallyResizeElements, + ista = pr.length && (/textarea/i).test(pr[0].nodeName), + soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height, + soffsetw = ista ? 0 : that.sizeDiff.width, + style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, + left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null, + top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null; + + that.element.animate( + $.extend(style, top && left ? { top: top, left: left } : {}), { + duration: o.animateDuration, + easing: o.animateEasing, + step: function() { + + var data = { + width: parseInt(that.element.css("width"), 10), + height: parseInt(that.element.css("height"), 10), + top: parseInt(that.element.css("top"), 10), + left: parseInt(that.element.css("left"), 10) + }; + + if (pr && pr.length) { + $(pr[0]).css({ width: data.width, height: data.height }); + } + + // propagating resize, and updating values for each animation step + that._updateCache(data); + that._propagate("resize", event); + + } + } + ); + } + +}); + +$.ui.plugin.add("resizable", "containment", { + + start: function() { + var element, p, co, ch, cw, width, height, + that = $(this).data("ui-resizable"), + o = that.options, + el = that.element, + oc = o.containment, + ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc; + + if (!ce) { + return; + } + + that.containerElement = $(ce); + + if (/document/.test(oc) || oc === document) { + that.containerOffset = { left: 0, top: 0 }; + that.containerPosition = { left: 0, top: 0 }; + + that.parentData = { + element: $(document), left: 0, top: 0, + width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight + }; + } + + // i'm a node, so compute top, left, right, bottom + else { + element = $(ce); + p = []; + $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); }); + + that.containerOffset = element.offset(); + that.containerPosition = element.position(); + that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) }; + + co = that.containerOffset; + ch = that.containerSize.height; + cw = that.containerSize.width; + width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ); + height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch); + + that.parentData = { + element: ce, left: co.left, top: co.top, width: width, height: height + }; + } + }, + + resize: function( event ) { + var woset, hoset, isParent, isOffsetRelative, + that = $(this).data("ui-resizable"), + o = that.options, + co = that.containerOffset, cp = that.position, + pRatio = that._aspectRatio || event.shiftKey, + cop = { top:0, left:0 }, ce = that.containerElement; + + if (ce[0] !== document && (/static/).test(ce.css("position"))) { + cop = co; + } + + if (cp.left < (that._helper ? co.left : 0)) { + that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left)); + if (pRatio) { + that.size.height = that.size.width / that.aspectRatio; + } + that.position.left = o.helper ? co.left : 0; + } + + if (cp.top < (that._helper ? co.top : 0)) { + that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top); + if (pRatio) { + that.size.width = that.size.height * that.aspectRatio; + } + that.position.top = that._helper ? co.top : 0; + } + + that.offset.left = that.parentData.left+that.position.left; + that.offset.top = that.parentData.top+that.position.top; + + woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ); + hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height ); + + isParent = that.containerElement.get(0) === that.element.parent().get(0); + isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position")); + + if ( isParent && isOffsetRelative ) { + woset -= Math.abs( that.parentData.left ); + } + + if (woset + that.size.width >= that.parentData.width) { + that.size.width = that.parentData.width - woset; + if (pRatio) { + that.size.height = that.size.width / that.aspectRatio; + } + } + + if (hoset + that.size.height >= that.parentData.height) { + that.size.height = that.parentData.height - hoset; + if (pRatio) { + that.size.width = that.size.height * that.aspectRatio; + } + } + }, + + stop: function(){ + var that = $(this).data("ui-resizable"), + o = that.options, + co = that.containerOffset, + cop = that.containerPosition, + ce = that.containerElement, + helper = $(that.helper), + ho = helper.offset(), + w = helper.outerWidth() - that.sizeDiff.width, + h = helper.outerHeight() - that.sizeDiff.height; + + if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) { + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); + } + + if (that._helper && !o.animate && (/static/).test(ce.css("position"))) { + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); + } + + } +}); + +$.ui.plugin.add("resizable", "alsoResize", { + + start: function () { + var that = $(this).data("ui-resizable"), + o = that.options, + _store = function (exp) { + $(exp).each(function() { + var el = $(this); + el.data("ui-resizable-alsoresize", { + width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), + left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10) + }); + }); + }; + + if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) { + if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); } + else { $.each(o.alsoResize, function (exp) { _store(exp); }); } + }else{ + _store(o.alsoResize); + } + }, + + resize: function (event, ui) { + var that = $(this).data("ui-resizable"), + o = that.options, + os = that.originalSize, + op = that.originalPosition, + delta = { + height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0, + top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0 + }, + + _alsoResize = function (exp, c) { + $(exp).each(function() { + var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {}, + css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; + + $.each(css, function (i, prop) { + var sum = (start[prop]||0) + (delta[prop]||0); + if (sum && sum >= 0) { + style[prop] = sum || null; + } + }); + + el.css(style); + }); + }; + + if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) { + $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); }); + }else{ + _alsoResize(o.alsoResize); + } + }, + + stop: function () { + $(this).removeData("resizable-alsoresize"); + } +}); + +$.ui.plugin.add("resizable", "ghost", { + + start: function() { + + var that = $(this).data("ui-resizable"), o = that.options, cs = that.size; + + that.ghost = that.originalElement.clone(); + that.ghost + .css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }) + .addClass("ui-resizable-ghost") + .addClass(typeof o.ghost === "string" ? o.ghost : ""); + + that.ghost.appendTo(that.helper); + + }, + + resize: function(){ + var that = $(this).data("ui-resizable"); + if (that.ghost) { + that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width }); + } + }, + + stop: function() { + var that = $(this).data("ui-resizable"); + if (that.ghost && that.helper) { + that.helper.get(0).removeChild(that.ghost.get(0)); + } + } + +}); + +$.ui.plugin.add("resizable", "grid", { + + resize: function() { + var that = $(this).data("ui-resizable"), + o = that.options, + cs = that.size, + os = that.originalSize, + op = that.originalPosition, + a = that.axis, + grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid, + gridX = (grid[0]||1), + gridY = (grid[1]||1), + ox = Math.round((cs.width - os.width) / gridX) * gridX, + oy = Math.round((cs.height - os.height) / gridY) * gridY, + newWidth = os.width + ox, + newHeight = os.height + oy, + isMaxWidth = o.maxWidth && (o.maxWidth < newWidth), + isMaxHeight = o.maxHeight && (o.maxHeight < newHeight), + isMinWidth = o.minWidth && (o.minWidth > newWidth), + isMinHeight = o.minHeight && (o.minHeight > newHeight); + + o.grid = grid; + + if (isMinWidth) { + newWidth = newWidth + gridX; + } + if (isMinHeight) { + newHeight = newHeight + gridY; + } + if (isMaxWidth) { + newWidth = newWidth - gridX; + } + if (isMaxHeight) { + newHeight = newHeight - gridY; + } + + if (/^(se|s|e)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + } else if (/^(ne)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + that.position.top = op.top - oy; + } else if (/^(sw)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + that.position.left = op.left - ox; + } else { + if ( newHeight - gridY > 0 ) { + that.size.height = newHeight; + that.position.top = op.top - oy; + } else { + that.size.height = gridY; + that.position.top = op.top + os.height - gridY; + } + if ( newWidth - gridX > 0 ) { + that.size.width = newWidth; + that.position.left = op.left - ox; + } else { + that.size.width = gridX; + that.position.left = op.left + os.width - gridX; + } + } + } + +}); + +})(jQuery); +(function( $, undefined ) { + +$.widget("ui.selectable", $.ui.mouse, { + version: "1.10.4", + options: { + appendTo: "body", + autoRefresh: true, + distance: 0, + filter: "*", + tolerance: "touch", + + // callbacks + selected: null, + selecting: null, + start: null, + stop: null, + unselected: null, + unselecting: null + }, + _create: function() { + var selectees, + that = this; + + this.element.addClass("ui-selectable"); + + this.dragged = false; + + // cache selectee children based on filter + this.refresh = function() { + selectees = $(that.options.filter, that.element[0]); + selectees.addClass("ui-selectee"); + selectees.each(function() { + var $this = $(this), + pos = $this.offset(); + $.data(this, "selectable-item", { + element: this, + $element: $this, + left: pos.left, + top: pos.top, + right: pos.left + $this.outerWidth(), + bottom: pos.top + $this.outerHeight(), + startselected: false, + selected: $this.hasClass("ui-selected"), + selecting: $this.hasClass("ui-selecting"), + unselecting: $this.hasClass("ui-unselecting") + }); + }); + }; + this.refresh(); + + this.selectees = selectees.addClass("ui-selectee"); + + this._mouseInit(); + + this.helper = $("
"); + }, + + _destroy: function() { + this.selectees + .removeClass("ui-selectee") + .removeData("selectable-item"); + this.element + .removeClass("ui-selectable ui-selectable-disabled"); + this._mouseDestroy(); + }, + + _mouseStart: function(event) { + var that = this, + options = this.options; + + this.opos = [event.pageX, event.pageY]; + + if (this.options.disabled) { + return; + } + + this.selectees = $(options.filter, this.element[0]); + + this._trigger("start", event); + + $(options.appendTo).append(this.helper); + // position helper (lasso) + this.helper.css({ + "left": event.pageX, + "top": event.pageY, + "width": 0, + "height": 0 + }); + + if (options.autoRefresh) { + this.refresh(); + } + + this.selectees.filter(".ui-selected").each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.startselected = true; + if (!event.metaKey && !event.ctrlKey) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + }); + + $(event.target).parents().addBack().each(function() { + var doSelect, + selectee = $.data(this, "selectable-item"); + if (selectee) { + doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected"); + selectee.$element + .removeClass(doSelect ? "ui-unselecting" : "ui-selected") + .addClass(doSelect ? "ui-selecting" : "ui-unselecting"); + selectee.unselecting = !doSelect; + selectee.selecting = doSelect; + selectee.selected = doSelect; + // selectable (UN)SELECTING callback + if (doSelect) { + that._trigger("selecting", event, { + selecting: selectee.element + }); + } else { + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + return false; + } + }); + + }, + + _mouseDrag: function(event) { + + this.dragged = true; + + if (this.options.disabled) { + return; + } + + var tmp, + that = this, + options = this.options, + x1 = this.opos[0], + y1 = this.opos[1], + x2 = event.pageX, + y2 = event.pageY; + + if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; } + if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; } + this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1}); + + this.selectees.each(function() { + var selectee = $.data(this, "selectable-item"), + hit = false; + + //prevent helper from being selected if appendTo: selectable + if (!selectee || selectee.element === that.element[0]) { + return; + } + + if (options.tolerance === "touch") { + hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) ); + } else if (options.tolerance === "fit") { + hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2); + } + + if (hit) { + // SELECT + if (selectee.selected) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + } + if (selectee.unselecting) { + selectee.$element.removeClass("ui-unselecting"); + selectee.unselecting = false; + } + if (!selectee.selecting) { + selectee.$element.addClass("ui-selecting"); + selectee.selecting = true; + // selectable SELECTING callback + that._trigger("selecting", event, { + selecting: selectee.element + }); + } + } else { + // UNSELECT + if (selectee.selecting) { + if ((event.metaKey || event.ctrlKey) && selectee.startselected) { + selectee.$element.removeClass("ui-selecting"); + selectee.selecting = false; + selectee.$element.addClass("ui-selected"); + selectee.selected = true; + } else { + selectee.$element.removeClass("ui-selecting"); + selectee.selecting = false; + if (selectee.startselected) { + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + } + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + if (selectee.selected) { + if (!event.metaKey && !event.ctrlKey && !selectee.startselected) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + } + }); + + return false; + }, + + _mouseStop: function(event) { + var that = this; + + this.dragged = false; + + $(".ui-unselecting", this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass("ui-unselecting"); + selectee.unselecting = false; + selectee.startselected = false; + that._trigger("unselected", event, { + unselected: selectee.element + }); + }); + $(".ui-selecting", this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass("ui-selecting").addClass("ui-selected"); + selectee.selecting = false; + selectee.selected = true; + selectee.startselected = true; + that._trigger("selected", event, { + selected: selectee.element + }); + }); + this._trigger("stop", event); + + this.helper.remove(); + + return false; + } + +}); + +})(jQuery); +(function( $, undefined ) { + +function isOverAxis( x, reference, size ) { + return ( x > reference ) && ( x < ( reference + size ) ); +} + +function isFloating(item) { + return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); +} + +$.widget("ui.sortable", $.ui.mouse, { + version: "1.10.4", + widgetEventPrefix: "sort", + ready: false, + options: { + appendTo: "parent", + axis: false, + connectWith: false, + containment: false, + cursor: "auto", + cursorAt: false, + dropOnEmpty: true, + forcePlaceholderSize: false, + forceHelperSize: false, + grid: false, + handle: false, + helper: "original", + items: "> *", + opacity: false, + placeholder: false, + revert: false, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1000, + + // callbacks + activate: null, + beforeStop: null, + change: null, + deactivate: null, + out: null, + over: null, + receive: null, + remove: null, + sort: null, + start: null, + stop: null, + update: null + }, + _create: function() { + + var o = this.options; + this.containerCache = {}; + this.element.addClass("ui-sortable"); + + //Get the items + this.refresh(); + + //Let's determine if the items are being displayed horizontally + this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false; + + //Let's determine the parent's offset + this.offset = this.element.offset(); + + //Initialize mouse events for interaction + this._mouseInit(); + + //We're ready to go + this.ready = true; + + }, + + _destroy: function() { + this.element + .removeClass("ui-sortable ui-sortable-disabled"); + this._mouseDestroy(); + + for ( var i = this.items.length - 1; i >= 0; i-- ) { + this.items[i].item.removeData(this.widgetName + "-item"); + } + + return this; + }, + + _setOption: function(key, value){ + if ( key === "disabled" ) { + this.options[ key ] = value; + + this.widget().toggleClass( "ui-sortable-disabled", !!value ); + } else { + // Don't call widget base _setOption for disable as it adds ui-state-disabled class + $.Widget.prototype._setOption.apply(this, arguments); + } + }, + + _mouseCapture: function(event, overrideHandle) { + var currentItem = null, + validHandle = false, + that = this; + + if (this.reverting) { + return false; + } + + if(this.options.disabled || this.options.type === "static") { + return false; + } + + //We have to refresh the items data once first + this._refreshItems(event); + + //Find out if the clicked node (or one of its parents) is a actual item in this.items + $(event.target).parents().each(function() { + if($.data(this, that.widgetName + "-item") === that) { + currentItem = $(this); + return false; + } + }); + if($.data(event.target, that.widgetName + "-item") === that) { + currentItem = $(event.target); + } + + if(!currentItem) { + return false; + } + if(this.options.handle && !overrideHandle) { + $(this.options.handle, currentItem).find("*").addBack().each(function() { + if(this === event.target) { + validHandle = true; + } + }); + if(!validHandle) { + return false; + } + } + + this.currentItem = currentItem; + this._removeCurrentsFromItems(); + return true; + + }, + + _mouseStart: function(event, overrideHandle, noActivation) { + + var i, body, + o = this.options; + + this.currentContainer = this; + + //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture + this.refreshPositions(); + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Get the next scrolling parent + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.currentItem.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + // Only after we got the offset, we can change the helper's position to absolute + // TODO: Still need to figure out a way to make relative sorting possible + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Cache the former DOM position + this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; + + //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way + if(this.helper[0] !== this.currentItem[0]) { + this.currentItem.hide(); + } + + //Create the placeholder + this._createPlaceholder(); + + //Set a containment if given in the options + if(o.containment) { + this._setContainment(); + } + + if( o.cursor && o.cursor !== "auto" ) { // cursor option + body = this.document.find( "body" ); + + // support: IE + this.storedCursor = body.css( "cursor" ); + body.css( "cursor", o.cursor ); + + this.storedStylesheet = $( "" ).appendTo( body ); + } + + if(o.opacity) { // opacity option + if (this.helper.css("opacity")) { + this._storedOpacity = this.helper.css("opacity"); + } + this.helper.css("opacity", o.opacity); + } + + if(o.zIndex) { // zIndex option + if (this.helper.css("zIndex")) { + this._storedZIndex = this.helper.css("zIndex"); + } + this.helper.css("zIndex", o.zIndex); + } + + //Prepare scrolling + if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { + this.overflowOffset = this.scrollParent.offset(); + } + + //Call callbacks + this._trigger("start", event, this._uiHash()); + + //Recache the helper size + if(!this._preserveHelperProportions) { + this._cacheHelperProportions(); + } + + + //Post "activate" events to possible containers + if( !noActivation ) { + for ( i = this.containers.length - 1; i >= 0; i-- ) { + this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); + } + } + + //Prepare possible droppables + if($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + this.dragging = true; + + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + + }, + + _mouseDrag: function(event) { + var i, item, itemElement, intersection, + o = this.options, + scrolled = false; + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Do scrolling + if(this.options.scroll) { + if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { + + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; + } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; + } + + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; + } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; + } + + } else { + + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + } + + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + } + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + //Set the helper position + if(!this.options.axis || this.options.axis !== "y") { + this.helper[0].style.left = this.position.left+"px"; + } + if(!this.options.axis || this.options.axis !== "x") { + this.helper[0].style.top = this.position.top+"px"; + } + + //Rearrange + for (i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + item = this.items[i]; + itemElement = item.item[0]; + intersection = this._intersectsWithPointer(item); + if (!intersection) { + continue; + } + + // Only put the placeholder inside the current Container, skip all + // items from other containers. This works because when moving + // an item from one container to another the + // currentContainer is switched before the placeholder is moved. + // + // Without this, moving items in "sub-sortables" can cause + // the placeholder to jitter beetween the outer and inner container. + if (item.instance !== this.currentContainer) { + continue; + } + + // cannot intersect with itself + // no useless actions that have been done before + // no action if the item moved is the parent of the item checked + if (itemElement !== this.currentItem[0] && + this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && + !$.contains(this.placeholder[0], itemElement) && + (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) + ) { + + this.direction = intersection === 1 ? "down" : "up"; + + if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { + this._rearrange(event, item); + } else { + break; + } + + this._trigger("change", event, this._uiHash()); + break; + } + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + //Call callbacks + this._trigger("sort", event, this._uiHash()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + if(!event) { + return; + } + + //If we are using droppables, inform the manager about the drop + if ($.ui.ddmanager && !this.options.dropBehaviour) { + $.ui.ddmanager.drop(this, event); + } + + if(this.options.revert) { + var that = this, + cur = this.placeholder.offset(), + axis = this.options.axis, + animation = {}; + + if ( !axis || axis === "x" ) { + animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft); + } + if ( !axis || axis === "y" ) { + animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop); + } + this.reverting = true; + $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { + that._clear(event); + }); + } else { + this._clear(event, noPropagation); + } + + return false; + + }, + + cancel: function() { + + if(this.dragging) { + + this._mouseUp({ target: null }); + + if(this.options.helper === "original") { + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + //Post deactivating events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._trigger("deactivate", null, this._uiHash(this)); + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", null, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + if (this.placeholder) { + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + if(this.placeholder[0].parentNode) { + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + } + if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { + this.helper.remove(); + } + + $.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + + if(this.domPosition.prev) { + $(this.domPosition.prev).after(this.currentItem); + } else { + $(this.domPosition.parent).prepend(this.currentItem); + } + } + + return this; + + }, + + serialize: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + str = []; + o = o || {}; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); + if (res) { + str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); + } + }); + + if(!str.length && o.key) { + str.push(o.key + "="); + } + + return str.join("&"); + + }, + + toArray: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + ret = []; + + o = o || {}; + + items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); + return ret; + + }, + + /* Be careful with the following core functions */ + _intersectsWith: function(item) { + + var x1 = this.positionAbs.left, + x2 = x1 + this.helperProportions.width, + y1 = this.positionAbs.top, + y2 = y1 + this.helperProportions.height, + l = item.left, + r = l + item.width, + t = item.top, + b = t + item.height, + dyClick = this.offset.click.top, + dxClick = this.offset.click.left, + isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), + isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), + isOverElement = isOverElementHeight && isOverElementWidth; + + if ( this.options.tolerance === "pointer" || + this.options.forcePointerForContainers || + (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) + ) { + return isOverElement; + } else { + + return (l < x1 + (this.helperProportions.width / 2) && // Right Half + x2 - (this.helperProportions.width / 2) < r && // Left Half + t < y1 + (this.helperProportions.height / 2) && // Bottom Half + y2 - (this.helperProportions.height / 2) < b ); // Top Half + + } + }, + + _intersectsWithPointer: function(item) { + + var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), + isOverElement = isOverElementHeight && isOverElementWidth, + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (!isOverElement) { + return false; + } + + return this.floating ? + ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) + : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); + + }, + + _intersectsWithSides: function(item) { + + var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), + isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (this.floating && horizontalDirection) { + return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); + } else { + return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); + } + + }, + + _getDragVerticalDirection: function() { + var delta = this.positionAbs.top - this.lastPositionAbs.top; + return delta !== 0 && (delta > 0 ? "down" : "up"); + }, + + _getDragHorizontalDirection: function() { + var delta = this.positionAbs.left - this.lastPositionAbs.left; + return delta !== 0 && (delta > 0 ? "right" : "left"); + }, + + refresh: function(event) { + this._refreshItems(event); + this.refreshPositions(); + return this; + }, + + _connectWith: function() { + var options = this.options; + return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; + }, + + _getItemsAsjQuery: function(connected) { + + var i, j, cur, inst, + items = [], + queries = [], + connectWith = this._connectWith(); + + if(connectWith && connected) { + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i]); + for ( j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); + } + } + } + } + + queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); + + function addItems() { + items.push( this ); + } + for (i = queries.length - 1; i >= 0; i--){ + queries[i][0].each( addItems ); + } + + return $(items); + + }, + + _removeCurrentsFromItems: function() { + + var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); + + this.items = $.grep(this.items, function (item) { + for (var j=0; j < list.length; j++) { + if(list[j] === item.item[0]) { + return false; + } + } + return true; + }); + + }, + + _refreshItems: function(event) { + + this.items = []; + this.containers = [this]; + + var i, j, cur, inst, targetData, _queries, item, queriesLength, + items = this.items, + queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], + connectWith = this._connectWith(); + + if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i]); + for (j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); + this.containers.push(inst); + } + } + } + } + + for (i = queries.length - 1; i >= 0; i--) { + targetData = queries[i][1]; + _queries = queries[i][0]; + + for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { + item = $(_queries[j]); + + item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) + + items.push({ + item: item, + instance: targetData, + width: 0, height: 0, + left: 0, top: 0 + }); + } + } + + }, + + refreshPositions: function(fast) { + + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change + if(this.offsetParent && this.helper) { + this.offset.parent = this._getParentOffset(); + } + + var i, item, t, p; + + for (i = this.items.length - 1; i >= 0; i--){ + item = this.items[i]; + + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { + continue; + } + + t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; + + if (!fast) { + item.width = t.outerWidth(); + item.height = t.outerHeight(); + } + + p = t.offset(); + item.left = p.left; + item.top = p.top; + } + + if(this.options.custom && this.options.custom.refreshContainers) { + this.options.custom.refreshContainers.call(this); + } else { + for (i = this.containers.length - 1; i >= 0; i--){ + p = this.containers[i].element.offset(); + this.containers[i].containerCache.left = p.left; + this.containers[i].containerCache.top = p.top; + this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); + this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + } + } + + return this; + }, + + _createPlaceholder: function(that) { + that = that || this; + var className, + o = that.options; + + if(!o.placeholder || o.placeholder.constructor === String) { + className = o.placeholder; + o.placeholder = { + element: function() { + + var nodeName = that.currentItem[0].nodeName.toLowerCase(), + element = $( "<" + nodeName + ">", that.document[0] ) + .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") + .removeClass("ui-sortable-helper"); + + if ( nodeName === "tr" ) { + that.currentItem.children().each(function() { + $( " ", that.document[0] ) + .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) + .appendTo( element ); + }); + } else if ( nodeName === "img" ) { + element.attr( "src", that.currentItem.attr( "src" ) ); + } + + if ( !className ) { + element.css( "visibility", "hidden" ); + } + + return element; + }, + update: function(container, p) { + + // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that + // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified + if(className && !o.forcePlaceholderSize) { + return; + } + + //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item + if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } + if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } + } + }; + } + + //Create the placeholder + that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); + + //Append it after the actual current item + that.currentItem.after(that.placeholder); + + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) + o.placeholder.update(that, that.placeholder); + + }, + + _contactContainers: function(event) { + var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, + innermostContainer = null, + innermostIndex = null; + + // get innermost container that intersects with item + for (i = this.containers.length - 1; i >= 0; i--) { + + // never consider a container that's located within the item itself + if($.contains(this.currentItem[0], this.containers[i].element[0])) { + continue; + } + + if(this._intersectsWith(this.containers[i].containerCache)) { + + // if we've already found a container and it's more "inner" than this, then continue + if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { + continue; + } + + innermostContainer = this.containers[i]; + innermostIndex = i; + + } else { + // container doesn't intersect. trigger "out" event if necessary + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", event, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + // if no intersecting containers found, return + if(!innermostContainer) { + return; + } + + // move the item into the container if it's not there already + if(this.containers.length === 1) { + if (!this.containers[innermostIndex].containerCache.over) { + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + } else { + + //When entering a new container, we will find the item with the least distance and append our item near it + dist = 10000; + itemWithLeastDistance = null; + floating = innermostContainer.floating || isFloating(this.currentItem); + posProperty = floating ? "left" : "top"; + sizeProperty = floating ? "width" : "height"; + base = this.positionAbs[posProperty] + this.offset.click[posProperty]; + for (j = this.items.length - 1; j >= 0; j--) { + if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { + continue; + } + if(this.items[j].item[0] === this.currentItem[0]) { + continue; + } + if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { + continue; + } + cur = this.items[j].item.offset()[posProperty]; + nearBottom = false; + if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ + nearBottom = true; + cur += this.items[j][sizeProperty]; + } + + if(Math.abs(cur - base) < dist) { + dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; + this.direction = nearBottom ? "up": "down"; + } + } + + //Check if dropOnEmpty is enabled + if(!itemWithLeastDistance && !this.options.dropOnEmpty) { + return; + } + + if(this.currentContainer === this.containers[innermostIndex]) { + return; + } + + itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); + this._trigger("change", event, this._uiHash()); + this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); + this.currentContainer = this.containers[innermostIndex]; + + //Update the placeholder + this.options.placeholder.update(this.currentContainer, this.placeholder); + + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + + + }, + + _createHelper: function(event) { + + var o = this.options, + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); + + //Add the helper to the DOM if that didn't happen already + if(!helper.parents("body").length) { + $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); + } + + if(helper[0] === this.currentItem[0]) { + this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; + } + + if(!helper[0].style.width || o.forceHelperSize) { + helper.width(this.currentItem.width()); + } + if(!helper[0].style.height || o.forceHelperSize) { + helper.height(this.currentItem.height()); + } + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + // This needs to be actually done for all browsers, since pageX/pageY includes this information + // with an ugly IE fix + if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition === "relative") { + var p = this.currentItem.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), + top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var ce, co, over, + o = this.options; + if(o.containment === "parent") { + o.containment = this.helper[0].parentNode; + } + if(o.containment === "document" || o.containment === "window") { + this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top + ]; + } + + if(!(/^(document|window|parent)$/).test(o.containment)) { + ce = $(o.containment)[0]; + co = $(o.containment).offset(); + over = ($(ce).css("overflow") !== "hidden"); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) { + pos = this.position; + } + var mod = d === "absolute" ? 1 : -1, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + var top, left, + o = this.options, + pageX = event.pageX, + pageY = event.pageY, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { + this.offset.relative = this._getRelativeOffset(); + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + + if(this.containment) { + if(event.pageX - this.offset.click.left < this.containment[0]) { + pageX = this.containment[0] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top < this.containment[1]) { + pageY = this.containment[1] + this.offset.click.top; + } + if(event.pageX - this.offset.click.left > this.containment[2]) { + pageX = this.containment[2] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top > this.containment[3]) { + pageY = this.containment[3] + this.offset.click.top; + } + } + + if(o.grid) { + top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; + pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; + pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _rearrange: function(event, i, a, hardRefresh) { + + a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); + + //Various things done here to improve the performance: + // 1. we create a setTimeout, that calls refreshPositions + // 2. on the instance, we have a counter variable, that get's higher after every append + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same + // 4. this lets only the last addition to the timeout stack through + this.counter = this.counter ? ++this.counter : 1; + var counter = this.counter; + + this._delay(function() { + if(counter === this.counter) { + this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove + } + }); + + }, + + _clear: function(event, noPropagation) { + + this.reverting = false; + // We delay all events that have to be triggered to after the point where the placeholder has been removed and + // everything else normalized again + var i, + delayedTriggers = []; + + // We first have to update the dom position of the actual currentItem + // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) + if(!this._noFinalSort && this.currentItem.parent().length) { + this.placeholder.before(this.currentItem); + } + this._noFinalSort = null; + + if(this.helper[0] === this.currentItem[0]) { + for(i in this._storedCSS) { + if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { + this._storedCSS[i] = ""; + } + } + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + if(this.fromOutside && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); + } + if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed + } + + // Check if the items Container has Changed and trigger appropriate + // events. + if (this !== this.currentContainer) { + if(!noPropagation) { + delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); + delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + } + } + + + //Post events to containers + function delayEvent( type, instance, container ) { + return function( event ) { + container._trigger( type, event, instance._uiHash( instance ) ); + }; + } + for (i = this.containers.length - 1; i >= 0; i--){ + if (!noPropagation) { + delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) ); + } + if(this.containers[i].containerCache.over) { + delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) ); + this.containers[i].containerCache.over = 0; + } + } + + //Do what was originally in plugins + if ( this.storedCursor ) { + this.document.find( "body" ).css( "cursor", this.storedCursor ); + this.storedStylesheet.remove(); + } + if(this._storedOpacity) { + this.helper.css("opacity", this._storedOpacity); + } + if(this._storedZIndex) { + this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); + } + + this.dragging = false; + if(this.cancelHelperRemoval) { + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + for (i=0; i < delayedTriggers.length; i++) { + delayedTriggers[i].call(this, event); + } //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return false; + } + + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + } + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + + if(this.helper[0] !== this.currentItem[0]) { + this.helper.remove(); + } + this.helper = null; + + if(!noPropagation) { + for (i=0; i < delayedTriggers.length; i++) { + delayedTriggers[i].call(this, event); + } //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return true; + + }, + + _trigger: function() { + if ($.Widget.prototype._trigger.apply(this, arguments) === false) { + this.cancel(); + } + }, + + _uiHash: function(_inst) { + var inst = _inst || this; + return { + helper: inst.helper, + placeholder: inst.placeholder || $([]), + position: inst.position, + originalPosition: inst.originalPosition, + offset: inst.positionAbs, + item: inst.currentItem, + sender: _inst ? _inst.element : null + }; + } + +}); + +})(jQuery); +(function( $, undefined ) { + +var uid = 0, + hideProps = {}, + showProps = {}; + +hideProps.height = hideProps.paddingTop = hideProps.paddingBottom = + hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide"; +showProps.height = showProps.paddingTop = showProps.paddingBottom = + showProps.borderTopWidth = showProps.borderBottomWidth = "show"; + +$.widget( "ui.accordion", { + version: "1.10.4", + options: { + active: 0, + animate: {}, + collapsible: false, + event: "click", + header: "> li > :first-child,> :not(li):even", + heightStyle: "auto", + icons: { + activeHeader: "ui-icon-triangle-1-s", + header: "ui-icon-triangle-1-e" + }, + + // callbacks + activate: null, + beforeActivate: null + }, + + _create: function() { + var options = this.options; + this.prevShow = this.prevHide = $(); + this.element.addClass( "ui-accordion ui-widget ui-helper-reset" ) + // ARIA + .attr( "role", "tablist" ); + + // don't allow collapsible: false and active: false / null + if ( !options.collapsible && (options.active === false || options.active == null) ) { + options.active = 0; + } + + this._processPanels(); + // handle negative values + if ( options.active < 0 ) { + options.active += this.headers.length; + } + this._refresh(); + }, + + _getCreateEventData: function() { + return { + header: this.active, + panel: !this.active.length ? $() : this.active.next(), + content: !this.active.length ? $() : this.active.next() + }; + }, + + _createIcons: function() { + var icons = this.options.icons; + if ( icons ) { + $( "" ) + .addClass( "ui-accordion-header-icon ui-icon " + icons.header ) + .prependTo( this.headers ); + this.active.children( ".ui-accordion-header-icon" ) + .removeClass( icons.header ) + .addClass( icons.activeHeader ); + this.headers.addClass( "ui-accordion-icons" ); + } + }, + + _destroyIcons: function() { + this.headers + .removeClass( "ui-accordion-icons" ) + .children( ".ui-accordion-header-icon" ) + .remove(); + }, + + _destroy: function() { + var contents; + + // clean up main element + this.element + .removeClass( "ui-accordion ui-widget ui-helper-reset" ) + .removeAttr( "role" ); + + // clean up headers + this.headers + .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) + .removeAttr( "role" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-controls" ) + .removeAttr( "tabIndex" ) + .each(function() { + if ( /^ui-accordion/.test( this.id ) ) { + this.removeAttribute( "id" ); + } + }); + this._destroyIcons(); + + // clean up content panels + contents = this.headers.next() + .css( "display", "" ) + .removeAttr( "role" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-labelledby" ) + .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" ) + .each(function() { + if ( /^ui-accordion/.test( this.id ) ) { + this.removeAttribute( "id" ); + } + }); + if ( this.options.heightStyle !== "content" ) { + contents.css( "height", "" ); + } + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "event" ) { + if ( this.options.event ) { + this._off( this.headers, this.options.event ); + } + this._setupEvents( value ); + } + + this._super( key, value ); + + // setting collapsible: false while collapsed; open first panel + if ( key === "collapsible" && !value && this.options.active === false ) { + this._activate( 0 ); + } + + if ( key === "icons" ) { + this._destroyIcons(); + if ( value ) { + this._createIcons(); + } + } + + // #5332 - opacity doesn't cascade to positioned elements in IE + // so we need to add the disabled class to the headers and panels + if ( key === "disabled" ) { + this.headers.add( this.headers.next() ) + .toggleClass( "ui-state-disabled", !!value ); + } + }, + + _keydown: function( event ) { + if ( event.altKey || event.ctrlKey ) { + return; + } + + var keyCode = $.ui.keyCode, + length = this.headers.length, + currentIndex = this.headers.index( event.target ), + toFocus = false; + + switch ( event.keyCode ) { + case keyCode.RIGHT: + case keyCode.DOWN: + toFocus = this.headers[ ( currentIndex + 1 ) % length ]; + break; + case keyCode.LEFT: + case keyCode.UP: + toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; + break; + case keyCode.SPACE: + case keyCode.ENTER: + this._eventHandler( event ); + break; + case keyCode.HOME: + toFocus = this.headers[ 0 ]; + break; + case keyCode.END: + toFocus = this.headers[ length - 1 ]; + break; + } + + if ( toFocus ) { + $( event.target ).attr( "tabIndex", -1 ); + $( toFocus ).attr( "tabIndex", 0 ); + toFocus.focus(); + event.preventDefault(); + } + }, + + _panelKeyDown : function( event ) { + if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { + $( event.currentTarget ).prev().focus(); + } + }, + + refresh: function() { + var options = this.options; + this._processPanels(); + + // was collapsed or no panel + if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) { + options.active = false; + this.active = $(); + // active false only when collapsible is true + } else if ( options.active === false ) { + this._activate( 0 ); + // was active, but active panel is gone + } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + // all remaining panel are disabled + if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) { + options.active = false; + this.active = $(); + // activate previous panel + } else { + this._activate( Math.max( 0, options.active - 1 ) ); + } + // was active, active panel still exists + } else { + // make sure active index is correct + options.active = this.headers.index( this.active ); + } + + this._destroyIcons(); + + this._refresh(); + }, + + _processPanels: function() { + this.headers = this.element.find( this.options.header ) + .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" ); + + this.headers.next() + .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) + .filter(":not(.ui-accordion-content-active)") + .hide(); + }, + + _refresh: function() { + var maxHeight, + options = this.options, + heightStyle = options.heightStyle, + parent = this.element.parent(), + accordionId = this.accordionId = "ui-accordion-" + + (this.element.attr( "id" ) || ++uid); + + this.active = this._findActive( options.active ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ) + .removeClass( "ui-corner-all" ); + this.active.next() + .addClass( "ui-accordion-content-active" ) + .show(); + + this.headers + .attr( "role", "tab" ) + .each(function( i ) { + var header = $( this ), + headerId = header.attr( "id" ), + panel = header.next(), + panelId = panel.attr( "id" ); + if ( !headerId ) { + headerId = accordionId + "-header-" + i; + header.attr( "id", headerId ); + } + if ( !panelId ) { + panelId = accordionId + "-panel-" + i; + panel.attr( "id", panelId ); + } + header.attr( "aria-controls", panelId ); + panel.attr( "aria-labelledby", headerId ); + }) + .next() + .attr( "role", "tabpanel" ); + + this.headers + .not( this.active ) + .attr({ + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + }) + .next() + .attr({ + "aria-hidden": "true" + }) + .hide(); + + // make sure at least one header is in the tab order + if ( !this.active.length ) { + this.headers.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active.attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }) + .next() + .attr({ + "aria-hidden": "false" + }); + } + + this._createIcons(); + + this._setupEvents( options.event ); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + + this.headers.each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.headers.next() + .each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.headers.next() + .each(function() { + maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); + }) + .height( maxHeight ); + } + }, + + _activate: function( index ) { + var active = this._findActive( index )[ 0 ]; + + // trying to activate the already active panel + if ( active === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the currently active header + active = active || this.active[ 0 ]; + + this._eventHandler({ + target: active, + currentTarget: active, + preventDefault: $.noop + }); + }, + + _findActive: function( selector ) { + return typeof selector === "number" ? this.headers.eq( selector ) : $(); + }, + + _setupEvents: function( event ) { + var events = { + keydown: "_keydown" + }; + if ( event ) { + $.each( event.split(" "), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.headers.add( this.headers.next() ) ); + this._on( this.headers, events ); + this._on( this.headers.next(), { keydown: "_panelKeyDown" }); + this._hoverable( this.headers ); + this._focusable( this.headers ); + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + clicked = $( event.currentTarget ), + clickedIsActive = clicked[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : clicked.next(), + toHide = active.next(), + eventData = { + oldHeader: active, + oldPanel: toHide, + newHeader: collapsing ? $() : clicked, + newPanel: toShow + }; + + event.preventDefault(); + + if ( + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.headers.index( clicked ); + + // when the call to ._toggle() comes after the class changes + // it causes a very odd bug in IE 8 (see #6720) + this.active = clickedIsActive ? $() : clicked; + this._toggle( eventData ); + + // switch classes + // corner classes on the previously active header stay after the animation + active.removeClass( "ui-accordion-header-active ui-state-active" ); + if ( options.icons ) { + active.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.activeHeader ) + .addClass( options.icons.header ); + } + + if ( !clickedIsActive ) { + clicked + .removeClass( "ui-corner-all" ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ); + if ( options.icons ) { + clicked.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.header ) + .addClass( options.icons.activeHeader ); + } + + clicked + .next() + .addClass( "ui-accordion-content-active" ); + } + }, + + _toggle: function( data ) { + var toShow = data.newPanel, + toHide = this.prevShow.length ? this.prevShow : data.oldPanel; + + // handle activating a panel during the animation for another activation + this.prevShow.add( this.prevHide ).stop( true, true ); + this.prevShow = toShow; + this.prevHide = toHide; + + if ( this.options.animate ) { + this._animate( toShow, toHide, data ); + } else { + toHide.hide(); + toShow.show(); + this._toggleComplete( data ); + } + + toHide.attr({ + "aria-hidden": "true" + }); + toHide.prev().attr( "aria-selected", "false" ); + // if we're switching panels, remove the old header from the tab order + // if we're opening from collapsed state, remove the previous header from the tab order + // if we're collapsing, then keep the collapsing header in the tab order + if ( toShow.length && toHide.length ) { + toHide.prev().attr({ + "tabIndex": -1, + "aria-expanded": "false" + }); + } else if ( toShow.length ) { + this.headers.filter(function() { + return $( this ).attr( "tabIndex" ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow + .attr( "aria-hidden", "false" ) + .prev() + .attr({ + "aria-selected": "true", + tabIndex: 0, + "aria-expanded": "true" + }); + }, + + _animate: function( toShow, toHide, data ) { + var total, easing, duration, + that = this, + adjust = 0, + down = toShow.length && + ( !toHide.length || ( toShow.index() < toHide.index() ) ), + animate = this.options.animate || {}, + options = down && animate.down || animate, + complete = function() { + that._toggleComplete( data ); + }; + + if ( typeof options === "number" ) { + duration = options; + } + if ( typeof options === "string" ) { + easing = options; + } + // fall back from options to animation in case of partial down settings + easing = easing || options.easing || animate.easing; + duration = duration || options.duration || animate.duration; + + if ( !toHide.length ) { + return toShow.animate( showProps, duration, easing, complete ); + } + if ( !toShow.length ) { + return toHide.animate( hideProps, duration, easing, complete ); + } + + total = toShow.show().outerHeight(); + toHide.animate( hideProps, { + duration: duration, + easing: easing, + step: function( now, fx ) { + fx.now = Math.round( now ); + } + }); + toShow + .hide() + .animate( showProps, { + duration: duration, + easing: easing, + complete: complete, + step: function( now, fx ) { + fx.now = Math.round( now ); + if ( fx.prop !== "height" ) { + adjust += fx.now; + } else if ( that.options.heightStyle !== "content" ) { + fx.now = Math.round( total - toHide.outerHeight() - adjust ); + adjust = 0; + } + } + }); + }, + + _toggleComplete: function( data ) { + var toHide = data.oldPanel; + + toHide + .removeClass( "ui-accordion-content-active" ) + .prev() + .removeClass( "ui-corner-top" ) + .addClass( "ui-corner-all" ); + + // Work around for rendering bug in IE (#5421) + if ( toHide.length ) { + toHide.parent()[0].className = toHide.parent()[0].className; + } + this._trigger( "activate", null, data ); + } +}); + +})( jQuery ); +(function( $, undefined ) { + +$.widget( "ui.autocomplete", { + version: "1.10.4", + defaultElement: "", + options: { + appendTo: null, + autoFocus: false, + delay: 300, + minLength: 1, + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + source: null, + + // callbacks + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null + }, + + requestIndex: 0, + pending: 0, + + _create: function() { + // Some browsers only repeat keydown events, not keypress events, + // so we use the suppressKeyPress flag to determine if we've already + // handled the keydown event. #7269 + // Unfortunately the code for & in keypress is the same as the up arrow, + // so we use the suppressKeyPressRepeat flag to avoid handling keypress + // events when we know the keydown event was used to modify the + // search term. #7799 + var suppressKeyPress, suppressKeyPressRepeat, suppressInput, + nodeName = this.element[0].nodeName.toLowerCase(), + isTextarea = nodeName === "textarea", + isInput = nodeName === "input"; + + this.isMultiLine = + // Textareas are always multi-line + isTextarea ? true : + // Inputs are always single-line, even if inside a contentEditable element + // IE also treats inputs as contentEditable + isInput ? false : + // All other element types are determined by whether or not they're contentEditable + this.element.prop( "isContentEditable" ); + + this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; + this.isNewMenu = true; + + this.element + .addClass( "ui-autocomplete-input" ) + .attr( "autocomplete", "off" ); + + this._on( this.element, { + keydown: function( event ) { + if ( this.element.prop( "readOnly" ) ) { + suppressKeyPress = true; + suppressInput = true; + suppressKeyPressRepeat = true; + return; + } + + suppressKeyPress = false; + suppressInput = false; + suppressKeyPressRepeat = false; + var keyCode = $.ui.keyCode; + switch( event.keyCode ) { + case keyCode.PAGE_UP: + suppressKeyPress = true; + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + suppressKeyPress = true; + this._move( "nextPage", event ); + break; + case keyCode.UP: + suppressKeyPress = true; + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + suppressKeyPress = true; + this._keyEvent( "next", event ); + break; + case keyCode.ENTER: + case keyCode.NUMPAD_ENTER: + // when menu is open and has focus + if ( this.menu.active ) { + // #6055 - Opera still allows the keypress to occur + // which causes forms to submit + suppressKeyPress = true; + event.preventDefault(); + this.menu.select( event ); + } + break; + case keyCode.TAB: + if ( this.menu.active ) { + this.menu.select( event ); + } + break; + case keyCode.ESCAPE: + if ( this.menu.element.is( ":visible" ) ) { + this._value( this.term ); + this.close( event ); + // Different browsers have different default behavior for escape + // Single press can mean undo or clear + // Double press in IE means clear the whole form + event.preventDefault(); + } + break; + default: + suppressKeyPressRepeat = true; + // search timeout should be triggered before the input value is changed + this._searchTimeout( event ); + break; + } + }, + keypress: function( event ) { + if ( suppressKeyPress ) { + suppressKeyPress = false; + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + event.preventDefault(); + } + return; + } + if ( suppressKeyPressRepeat ) { + return; + } + + // replicate some key handlers to allow them to repeat in Firefox and Opera + var keyCode = $.ui.keyCode; + switch( event.keyCode ) { + case keyCode.PAGE_UP: + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + this._move( "nextPage", event ); + break; + case keyCode.UP: + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + this._keyEvent( "next", event ); + break; + } + }, + input: function( event ) { + if ( suppressInput ) { + suppressInput = false; + event.preventDefault(); + return; + } + this._searchTimeout( event ); + }, + focus: function() { + this.selectedItem = null; + this.previous = this._value(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + clearTimeout( this.searching ); + this.close( event ); + this._change( event ); + } + }); + + this._initSource(); + this.menu = $( "