This commit is contained in:
Senad Uka
2020-07-15 11:57:21 +02:00
parent 4c49a5db03
commit da8e187430
135 changed files with 1952 additions and 1115 deletions

View File

@@ -135,7 +135,9 @@ RSpec.describe Account do
MedicalRelease,
MiscRelease,
MatchingRequest,
ActionMailbox::InboundEmail # This is Rails model, we are not using it and it is NOT added to the Account#storage_total calculation
ActionMailbox::InboundEmail, # This is Rails model, we are not using it and it is NOT added to the Account#storage_total calculation
CastingCall,
CastingCallInterview
]
Rails.application.eager_load!
ActiveRecord::Base.descendants.each do |model|

View File

@@ -0,0 +1,12 @@
require 'rails_helper'
RSpec.describe CastingCallInterview, type: :model do
describe "associations" do
it { is_expected.to belong_to(:casting_call) }
it { is_expected.to have_secure_token(:token) }
end
describe "validations" do
it { is_expected.to validate_presence_of(:performer_name) }
end
end

View File

@@ -0,0 +1,11 @@
require 'rails_helper'
RSpec.describe CastingCall, type: :model do
describe "associations" do
it { is_expected.to belong_to(:project) }
end
describe "validations" do
it { is_expected.to have_secure_token(:token) }
end
end

View File

@@ -19,6 +19,7 @@ RSpec.describe Project, type: :model do
it { is_expected.to have_many(:broadcasts).dependent(:destroy) }
it { is_expected.to have_many(:downloads).dependent(:destroy) }
it { is_expected.to have_many(:zoom_meetings).dependent(:destroy) }
it { is_expected.to have_many(:casting_calls).dependent(:destroy) }
end
describe "nested attributes" do
@@ -36,7 +37,7 @@ RSpec.describe Project, type: :model do
describe "#import_contract_templates" do
it "imports contract templates from other projects within the account" do
existing_project = create(:project_with_contract_template_public)
existing_project = create(:project_with_contract_template)
new_project = create(:project, name: "New Project", account: existing_project.account)
expect {