Merge pull request #611 from sgmap/remove-useless-tests
Remove useless tests
This commit is contained in:
commit
ad08bca621
16 changed files with 0 additions and 262 deletions
|
@ -1,22 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Administrateur, type: :model do
|
||||
describe 'database column' do
|
||||
it { is_expected.to have_db_column(:email) }
|
||||
it { is_expected.to have_db_column(:encrypted_password) }
|
||||
it { is_expected.to have_db_column(:reset_password_token) }
|
||||
it { is_expected.to have_db_column(:reset_password_sent_at) }
|
||||
it { is_expected.to have_db_column(:remember_created_at) }
|
||||
it { is_expected.to have_db_column(:sign_in_count) }
|
||||
it { is_expected.to have_db_column(:current_sign_in_at) }
|
||||
it { is_expected.to have_db_column(:last_sign_in_at) }
|
||||
it { is_expected.to have_db_column(:current_sign_in_ip) }
|
||||
it { is_expected.to have_db_column(:last_sign_in_ip) }
|
||||
it { is_expected.to have_db_column(:created_at) }
|
||||
it { is_expected.to have_db_column(:updated_at) }
|
||||
it { is_expected.to have_db_column(:api_token) }
|
||||
end
|
||||
|
||||
describe 'assocations' do
|
||||
it { is_expected.to have_and_belong_to_many(:gestionnaires) }
|
||||
it { is_expected.to have_many(:procedures) }
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Cerfa do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:content) }
|
||||
it { is_expected.to have_db_column(:original_filename) }
|
||||
it { is_expected.to have_db_column(:content_secure_token) }
|
||||
it { is_expected.to have_db_column(:created_at) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:dossier) }
|
||||
it { is_expected.to belong_to(:user) }
|
||||
end
|
||||
|
||||
describe 'empty?', vcr: { cassette_name: 'models_cerfa_empty' } do
|
||||
subject { create(:cerfa, content: content) }
|
||||
context 'when content exist' do
|
||||
|
|
|
@ -1,19 +1,4 @@
|
|||
shared_examples 'champ_spec' do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:value) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:dossier) }
|
||||
it { is_expected.to belong_to(:type_de_champ) }
|
||||
end
|
||||
|
||||
describe 'delegation' do
|
||||
it { is_expected.to delegate_method(:libelle).to(:type_de_champ) }
|
||||
it { is_expected.to delegate_method(:type_champ).to(:type_de_champ) }
|
||||
it { is_expected.to delegate_method(:order_place).to(:type_de_champ) }
|
||||
end
|
||||
|
||||
describe 'mandatory_and_blank?' do
|
||||
let(:type_de_champ) { TypeDeChamp.new(mandatory: mandatory) }
|
||||
let(:champ) { Champ.new(type_de_champ: type_de_champ, value: value) }
|
||||
|
|
|
@ -3,40 +3,6 @@ require 'spec_helper'
|
|||
describe Dossier do
|
||||
let(:user) { create(:user) }
|
||||
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:autorisation_donnees) }
|
||||
it { is_expected.to have_db_column(:created_at) }
|
||||
it { is_expected.to have_db_column(:updated_at) }
|
||||
it { is_expected.to have_db_column(:state) }
|
||||
it { is_expected.to have_db_column(:procedure_id) }
|
||||
it { is_expected.to have_db_column(:user_id) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:procedure) }
|
||||
it { is_expected.to have_many(:pieces_justificatives) }
|
||||
it { is_expected.to have_many(:champs) }
|
||||
it { is_expected.to have_many(:commentaires) }
|
||||
it { is_expected.to have_many(:quartier_prioritaires) }
|
||||
it { is_expected.to have_many(:cadastres) }
|
||||
it { is_expected.to have_many(:cerfa) }
|
||||
it { is_expected.to have_one(:etablissement) }
|
||||
it { is_expected.to have_one(:entreprise) }
|
||||
it { is_expected.to have_one(:individual) }
|
||||
it { is_expected.to belong_to(:user) }
|
||||
it { is_expected.to have_many(:invites) }
|
||||
it { is_expected.to have_many(:follows) }
|
||||
it { is_expected.to have_many(:notifications) }
|
||||
end
|
||||
|
||||
describe 'delegation' do
|
||||
it { is_expected.to delegate_method(:siren).to(:entreprise) }
|
||||
it { is_expected.to delegate_method(:siret).to(:etablissement) }
|
||||
it { is_expected.to delegate_method(:types_de_piece_justificative).to(:procedure) }
|
||||
it { is_expected.to delegate_method(:types_de_champ).to(:procedure) }
|
||||
it { is_expected.to delegate_method(:france_connect_information).to(:user) }
|
||||
end
|
||||
|
||||
describe 'methods' do
|
||||
let(:dossier) { create(:dossier, :with_entreprise, user: user) }
|
||||
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe DropDownList do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:value) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:type_de_champ) }
|
||||
end
|
||||
|
||||
let(:dropdownlist) { create :drop_down_list, value: value }
|
||||
|
||||
describe '#options' do
|
||||
|
|
|
@ -1,24 +1,4 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Entreprise do
|
||||
describe 'databse columns' do
|
||||
it { is_expected.to have_db_column(:siren) }
|
||||
it { is_expected.to have_db_column(:capital_social) }
|
||||
it { is_expected.to have_db_column(:numero_tva_intracommunautaire) }
|
||||
it { is_expected.to have_db_column(:forme_juridique) }
|
||||
it { is_expected.to have_db_column(:forme_juridique_code) }
|
||||
it { is_expected.to have_db_column(:nom_commercial) }
|
||||
it { is_expected.to have_db_column(:raison_sociale) }
|
||||
it { is_expected.to have_db_column(:siret_siege_social) }
|
||||
it { is_expected.to have_db_column(:code_effectif_entreprise) }
|
||||
it { is_expected.to have_db_column(:date_creation) }
|
||||
it { is_expected.to have_db_column(:nom) }
|
||||
it { is_expected.to have_db_column(:prenom) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:dossier) }
|
||||
it { is_expected.to have_one(:etablissement) }
|
||||
it { is_expected.to have_one(:rna_information) }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,27 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Etablissement do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:siret) }
|
||||
it { is_expected.to have_db_column(:siege_social) }
|
||||
it { is_expected.to have_db_column(:naf) }
|
||||
it { is_expected.to have_db_column(:libelle_naf) }
|
||||
it { is_expected.to have_db_column(:adresse) }
|
||||
it { is_expected.to have_db_column(:numero_voie) }
|
||||
it { is_expected.to have_db_column(:type_voie) }
|
||||
it { is_expected.to have_db_column(:nom_voie) }
|
||||
it { is_expected.to have_db_column(:complement_adresse) }
|
||||
it { is_expected.to have_db_column(:code_postal) }
|
||||
it { is_expected.to have_db_column(:localite) }
|
||||
it { is_expected.to have_db_column(:code_insee_localite) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:dossier) }
|
||||
it { is_expected.to belong_to(:entreprise) }
|
||||
it { is_expected.to have_many(:exercices) }
|
||||
end
|
||||
|
||||
describe '#geo_adresse' do
|
||||
let(:etablissement) { create(:etablissement) }
|
||||
|
||||
|
|
|
@ -1,13 +1,4 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Exercice do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:ca) }
|
||||
it { is_expected.to have_db_column(:dateFinExercice) }
|
||||
it { is_expected.to have_db_column(:date_fin_exercice_timestamp) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:etablissement) }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,20 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe FranceConnectInformation, type: :model do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:given_name) }
|
||||
it { is_expected.to have_db_column(:family_name) }
|
||||
it { is_expected.to have_db_column(:email_france_connect) }
|
||||
it { is_expected.to have_db_column(:birthdate) }
|
||||
it { is_expected.to have_db_column(:gender) }
|
||||
it { is_expected.to have_db_column(:birthplace) }
|
||||
it { is_expected.to have_db_column(:france_connect_particulier_id) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:user) }
|
||||
end
|
||||
|
||||
describe 'validation' do
|
||||
context 'france_connect_particulier_id' do
|
||||
it { is_expected.not_to allow_value(nil).for(:france_connect_particulier_id) }
|
||||
|
|
|
@ -13,30 +13,6 @@ describe Gestionnaire, type: :model do
|
|||
create :assign_to, gestionnaire: gestionnaire, procedure: procedure_2
|
||||
end
|
||||
|
||||
describe 'database column' do
|
||||
it { is_expected.to have_db_column(:email) }
|
||||
it { is_expected.to have_db_column(:encrypted_password) }
|
||||
it { is_expected.to have_db_column(:reset_password_token) }
|
||||
it { is_expected.to have_db_column(:reset_password_sent_at) }
|
||||
it { is_expected.to have_db_column(:remember_created_at) }
|
||||
it { is_expected.to have_db_column(:sign_in_count) }
|
||||
it { is_expected.to have_db_column(:current_sign_in_at) }
|
||||
it { is_expected.to have_db_column(:last_sign_in_at) }
|
||||
it { is_expected.to have_db_column(:current_sign_in_ip) }
|
||||
it { is_expected.to have_db_column(:last_sign_in_ip) }
|
||||
it { is_expected.to have_db_column(:created_at) }
|
||||
it { is_expected.to have_db_column(:updated_at) }
|
||||
end
|
||||
|
||||
describe 'association' do
|
||||
it { is_expected.to have_one(:preference_smart_listing_page) }
|
||||
it { is_expected.to have_and_belong_to_many(:administrateurs) }
|
||||
it { is_expected.to have_many(:procedures) }
|
||||
it { is_expected.to have_many(:dossiers) }
|
||||
it { is_expected.to have_many(:follows) }
|
||||
it { is_expected.to have_many(:preference_list_dossiers) }
|
||||
end
|
||||
|
||||
describe '#toggle_follow_dossier' do
|
||||
let!(:dossier) { create :dossier, procedure: procedure }
|
||||
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Invite do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:email) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:dossier) }
|
||||
it { is_expected.to belong_to(:user) }
|
||||
end
|
||||
|
||||
describe 'an email can be used for multiple dossier' do
|
||||
let(:email1) { 'plop@octo.com' }
|
||||
|
||||
|
|
|
@ -1,20 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe PieceJustificative do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:content) }
|
||||
it { is_expected.to have_db_column(:original_filename) }
|
||||
it { is_expected.to have_db_column(:content_secure_token) }
|
||||
it { is_expected.to have_db_column(:created_at) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:dossier) }
|
||||
it { is_expected.to belong_to(:type_de_piece_justificative) }
|
||||
it { is_expected.to belong_to(:user) }
|
||||
it { is_expected.to have_one(:commentaire) }
|
||||
end
|
||||
|
||||
describe 'validations' do
|
||||
context 'content' do
|
||||
it { is_expected.not_to allow_value(nil).for(:content) }
|
||||
|
@ -22,11 +8,6 @@ describe PieceJustificative do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'delegation' do
|
||||
it { is_expected.to delegate_method(:libelle).to(:type_de_piece_justificative) }
|
||||
it { is_expected.to delegate_method(:api_entreprise).to(:type_de_piece_justificative) }
|
||||
end
|
||||
|
||||
describe '#empty?', vcr: { cassette_name: 'model_piece_justificative' } do
|
||||
let(:piece_justificative) { create(:piece_justificative, content: content) }
|
||||
subject { piece_justificative.empty? }
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe RNAInformation do
|
||||
describe 'databse columns' do
|
||||
it { is_expected.to have_db_column(:association_id) }
|
||||
it { is_expected.to have_db_column(:titre) }
|
||||
it { is_expected.to have_db_column(:objet) }
|
||||
it { is_expected.to have_db_column(:date_creation) }
|
||||
it { is_expected.to have_db_column(:date_publication) }
|
||||
it { is_expected.to have_db_column(:date_declaration) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:entreprise) }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
shared_examples 'type_de_champ_spec' do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:libelle) }
|
||||
it { is_expected.to have_db_column(:type_champ) }
|
||||
it { is_expected.to have_db_column(:order_place) }
|
||||
it { is_expected.to have_db_column(:description) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:procedure) }
|
||||
it { is_expected.to have_many(:champ) }
|
||||
end
|
||||
|
||||
describe 'validation' do
|
||||
context 'libelle' do
|
||||
it { is_expected.not_to allow_value(nil).for(:libelle) }
|
||||
|
|
|
@ -3,21 +3,6 @@ require 'spec_helper'
|
|||
describe TypeDePieceJustificative do
|
||||
let!(:procedure) { create(:procedure) }
|
||||
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:libelle) }
|
||||
it { is_expected.to have_db_column(:description) }
|
||||
it { is_expected.to have_db_column(:api_entreprise) }
|
||||
it { is_expected.to have_db_column(:created_at) }
|
||||
it { is_expected.to have_db_column(:updated_at) }
|
||||
it { is_expected.to have_db_column(:order_place) }
|
||||
it { is_expected.to have_db_column(:lien_demarche) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to have_many(:pieces_justificatives) }
|
||||
it { is_expected.to belong_to(:procedure) }
|
||||
end
|
||||
|
||||
describe 'validation' do
|
||||
context 'libelle' do
|
||||
it { is_expected.not_to allow_value(nil).for(:libelle) }
|
||||
|
|
|
@ -1,28 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe User, type: :model do
|
||||
describe 'database columns' do
|
||||
it { is_expected.to have_db_column(:email) }
|
||||
it { is_expected.to have_db_column(:encrypted_password) }
|
||||
it { is_expected.to have_db_column(:reset_password_token) }
|
||||
it { is_expected.to have_db_column(:reset_password_sent_at) }
|
||||
it { is_expected.to have_db_column(:remember_created_at) }
|
||||
it { is_expected.to have_db_column(:sign_in_count) }
|
||||
it { is_expected.to have_db_column(:current_sign_in_at) }
|
||||
it { is_expected.to have_db_column(:last_sign_in_at) }
|
||||
it { is_expected.to have_db_column(:current_sign_in_ip) }
|
||||
it { is_expected.to have_db_column(:last_sign_in_ip) }
|
||||
it { is_expected.to have_db_column(:created_at) }
|
||||
it { is_expected.to have_db_column(:updated_at) }
|
||||
it { is_expected.to have_db_column(:siret) }
|
||||
it { is_expected.to have_db_column(:loged_in_with_france_connect) }
|
||||
end
|
||||
describe 'associations' do
|
||||
it { is_expected.to have_many(:dossiers) }
|
||||
it { is_expected.to have_many(:invites) }
|
||||
it { is_expected.to have_many(:piece_justificative) }
|
||||
it { is_expected.to have_many(:cerfa) }
|
||||
end
|
||||
describe '#find_for_france_connect' do
|
||||
let(:siret) { '00000000000000' }
|
||||
context 'when user exist' do
|
||||
|
|
Loading…
Reference in a new issue