Cast me
This commit is contained in:
@@ -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|
|
||||
|
||||
12
spec/models/casting_call_interview_spec.rb
Normal file
12
spec/models/casting_call_interview_spec.rb
Normal 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
|
||||
11
spec/models/casting_call_spec.rb
Normal file
11
spec/models/casting_call_spec.rb
Normal 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
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user