Compare commits

..

15 Commits

Author SHA1 Message Date
Bilal
4d83cff8d2 move approved column to common headers 2020-08-05 15:43:45 +02:00
Bilal
a8944c6c4a fix localizations 2020-08-05 15:37:58 +02:00
Bilal
7e571845d8 fix talent release CSV export 2020-08-05 15:35:19 +02:00
Bilal
d1aa103d9c fix music release CSV export 2020-08-05 15:24:57 +02:00
Bilal
3242bebd6a fix misc release CSV export 2020-08-05 15:22:04 +02:00
Bilal
6267f12cc4 fix medical release CSV export 2020-08-05 15:19:01 +02:00
Bilal
78d182624d fix material release CSV export 2020-08-05 15:16:00 +02:00
Bilal
088994b90c fix appearance release CSV export 2020-08-05 15:12:39 +02:00
Bilal
fd7357045c fix location release CSV export 2020-08-05 15:04:47 +02:00
Bilal
6378d45274 fix acq.media release CSV export 2020-08-05 14:50:58 +02:00
Bilal
708cc5e0a8 fix location release CSV export 2020-08-05 14:32:53 +02:00
Bilal
56d73d9844 improve spec 2020-08-05 12:58:30 +02:00
Bilal
580312bc52 fix spec 2020-08-04 15:24:45 +02:00
Bilal
0294a480ee show owner info in acquired media release table 2020-08-04 15:08:19 +02:00
Bilal
a7b7e1ecf9 show owner info in material release table 2020-08-04 13:14:42 +02:00
28 changed files with 277 additions and 118 deletions

View File

@@ -6,6 +6,6 @@ module MailHelper
"1. Tell us the name of the video: \n\n" \ "1. Tell us the name of the video: \n\n" \
"2. Attach each EDL to this email. Please make sure to indicate whether the EDL is a Video Only, Graphics Only, or Audio Only EDL." "2. Attach each EDL to this email. Please make sure to indicate whether the EDL is a Video Only, Graphics Only, or Audio Only EDL."
mail_to "info@mesuite.ai", content, subject: subject, body: body mail_to "info@bigmedia.ai", content, subject: subject, body: body
end end
end end

View File

@@ -1,5 +1,5 @@
class AdminMailer < ApplicationMailer class AdminMailer < ApplicationMailer
default to: %w[bray@mesuite.ai] default to: %w(bray@bigmedia.ai lee@bigmedia.ai)
def new_video(video) def new_video(video)
@video = video @video = video

View File

@@ -1,4 +1,4 @@
class ApplicationMailer < ActionMailer::Base class ApplicationMailer < ActionMailer::Base
default from: ENV.fetch("MAILER_FROM_ADDRESS") { "support@mesuite.ai" } default from: ENV.fetch("MAILER_FROM_ADDRESS") { "support@bigmedia.ai" }
layout "mailer" layout "mailer"
end end

View File

@@ -18,7 +18,7 @@ class AcquiredMediaRelease < ApplicationRecord
class << self class << self
def custom_csv_exportable_headers def custom_csv_exportable_headers
%i[name file_infos_count] %i[name file_infos_count owner_info]
end end
end end

View File

@@ -40,7 +40,7 @@ class AppHost
use_ssl: false, use_ssl: false,
}, },
production: { production: {
host: "mesuite.ai", host: "bigmedia.ai",
use_ssl: true, use_ssl: true,
} }
} }

View File

@@ -3,8 +3,8 @@
module CsvExportable module CsvExportable
extend ActiveSupport::Concern extend ActiveSupport::Concern
COMMON_HEADERS = %i[approved? notes tags signed_at].freeze COMMON_HEADERS = %i[approved notes tags signed_at].freeze
COMMON_VALUES = %w[clean_notes clean_tags signed_on].freeze COMMON_VALUES = %w[approved? clean_notes clean_tags signed_on].freeze
included do included do
class << self class << self
@@ -29,11 +29,20 @@ module CsvExportable
private private
def owner_info
compact_contact_info(name: person_name, address: person_address, phone: person_phone, email: person_email)
end
def contact_info def contact_info
owner_info
end
def compact_contact_info(name: nil, address: nil, phone: nil, email: nil)
contact_info = '' contact_info = ''
contact_info += "#{person_address}; " if person_address.present? contact_info += "#{name}; " if name.present?
contact_info += "P: #{person_phone}; " if person_phone.present? contact_info += "#{address}; " if address.present?
contact_info += "E: #{person_email}" if person_email.present? contact_info += "P: #{phone}; " if phone.present?
contact_info += "E: #{email}" if email.present?
contact_info.delete_suffix '; ' contact_info.delete_suffix '; '
end end

View File

@@ -16,7 +16,7 @@ class LocationRelease < ApplicationRecord
class << self class << self
def custom_csv_exportable_headers def custom_csv_exportable_headers
%i[name address] %i[location_info owner_info amendment_signed_column]
end end
end end
@@ -67,6 +67,18 @@ class LocationRelease < ApplicationRecord
true true
end end
def location_info
compact_contact_info(name: name, address: address)
end
def amendment_signed_column
if amendment_signable?
amendment_signed?
else
I18n.t('location_releases.csv.no_amendment_clause')
end
end
private private
def end_date_after_start_date def end_date_after_start_date

View File

@@ -20,7 +20,7 @@ class MaterialRelease < ApplicationRecord
class << self class << self
def custom_csv_exportable_headers def custom_csv_exportable_headers
%i[name] %i[name owner_info]
end end
end end

View File

@@ -18,6 +18,9 @@
<%= fa_icon("warning", text: t(".no_media"), class: "text-danger") %> <%= fa_icon("warning", text: t(".no_media"), class: "text-danger") %>
<% end %> <% end %>
</td> </td>
<td>
<%= contact_info_for(acquired_media_release.contact_person) %>
</td>
<td> <td>
<%= notes_preview acquired_media_release.notes.order_by_recent %> <%= notes_preview acquired_media_release.notes.order_by_recent %>
</td> </td>

View File

@@ -29,6 +29,7 @@
<th><%= t '.table_headers.approved'%></th> <th><%= t '.table_headers.approved'%></th>
<th><%= AcquiredMediaRelease.human_attribute_name(:name) %></th> <th><%= AcquiredMediaRelease.human_attribute_name(:name) %></th>
<th><%= t(".table_headers.file_infos_count") %></th> <th><%= t(".table_headers.file_infos_count") %></th>
<th><%= t(".table_headers.owner_info") %></th>
<th><%= t(".table_headers.notes") %></th> <th><%= t(".table_headers.notes") %></th>
<th><%= t(".table_headers.tags") %></th> <th><%= t(".table_headers.tags") %></th>
<th><%= t(".table_headers.signed_at") %></th> <th><%= t(".table_headers.signed_at") %></th>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<%= I18n.locale %>"> <html lang="<%= I18n.locale %>">
<head> <head>
<title>MESuite.ai App</title> <title>BiGMedia.ai App</title>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%= csp_meta_tag %> <%= csp_meta_tag %>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<%= I18n.locale %>"> <html lang="<%= I18n.locale %>">
<head> <head>
<title>MESuite.ai App</title> <title>BiGMedia.ai App</title>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%= csp_meta_tag %> <%= csp_meta_tag %>

View File

@@ -18,6 +18,9 @@
<td> <td>
<%= material_release.name %> <%= material_release.name %>
</td> </td>
<td>
<%= contact_info_for(material_release.contact_person) %>
</td>
<td> <td>
<%= notes_preview material_release.notes.order_by_recent %> <%= notes_preview material_release.notes.order_by_recent %>
</td> </td>

View File

@@ -29,10 +29,10 @@
<th><%= t '.table_headers.approved'%></th> <th><%= t '.table_headers.approved'%></th>
<th></th> <th></th>
<th><%= MaterialRelease.human_attribute_name(:name) %></th> <th><%= MaterialRelease.human_attribute_name(:name) %></th>
<th><%= t(".table_headers.owner_info") %>
<th><%= t(".table_headers.notes") %></th> <th><%= t(".table_headers.notes") %></th>
<th><%= t(".table_headers.tags") %></th> <th><%= t(".table_headers.tags") %></th>
<th><%= t(".table_headers.signed_at") %></th> <th><%= t(".table_headers.signed_at") %></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>

View File

@@ -10,5 +10,5 @@
</p> </p>
<p> <p>
If you have questions about how to use the software, please visit <%= link_to "MESuite.ai", "https://www.mesuite.ai/contact" %>. If you have questions about how to use the software, please visit <%= link_to "BiGMedia.ai", "https://www.bigmedia.ai/contact" %>.
</p> </p>

View File

@@ -7,4 +7,4 @@ Please click below to set your password.
<%= edit_password_reset_url(id: @user.password_reset_token, host: AppHost.new.domain_with_port) %> <%= edit_password_reset_url(id: @user.password_reset_token, host: AppHost.new.domain_with_port) %>
<% end %> <% end %>
If you have questions about how to use the software, please visit https://www.mesuite.ai/contact. If you have questions about how to use the software, please visit https://www.bigmedia.ai/contact.

View File

@@ -65,6 +65,7 @@ en:
file_infos_count: No. Files file_infos_count: No. Files
name: Name name: Name
notes: Notes notes: Notes
owner_info: Owner Info
signed_at: Date Signed signed_at: Date Signed
tags: Tags tags: Tags
new: new:
@@ -826,6 +827,8 @@ en:
location_releases: location_releases:
create: create:
notice: The location release has been created notice: The location release has been created
csv:
no_amendment_clause: No amendment clause
destroy: destroy:
alert: The location release has been deleted alert: The location release has been deleted
edit: edit:
@@ -849,6 +852,7 @@ en:
empty: Location Releases will appear here empty: Location Releases will appear here
table_headers: table_headers:
amendment_signed: Amendment amendment_signed: Amendment
amendment_signed_column: Amendment
approved: Approved approved: Approved
location_info: Location Info location_info: Location Info
notes: Notes notes: Notes
@@ -903,6 +907,7 @@ en:
approved: Approved approved: Approved
name: Name name: Name
notes: Notes notes: Notes
owner_info: Owner Info
signed_at: Date Signed signed_at: Date Signed
tags: Tags tags: Tags
material_release: material_release:
@@ -927,7 +932,6 @@ en:
empty: Medical releases will appear here empty: Medical releases will appear here
table_headers: table_headers:
approved: Approved approved: Approved
approved?: Approved
contact_info: Contact info contact_info: Contact info
name: Person name name: Person name
notes: Notes notes: Notes

View File

@@ -16,9 +16,11 @@ es:
heading: Guardian Photo heading: Guardian Photo
index: index:
table_headers: table_headers:
approved: Appproved (ES)
file_infos_count: No. Files (ES) file_infos_count: No. Files (ES)
name: Name (ES) name: Name (ES)
notes: Notes (ES) notes: Notes (ES)
owner_info: Owner Info (ES)
signed_at: Date Signed (ES) signed_at: Date Signed (ES)
tags: Tags (ES) tags: Tags (ES)
activerecord: activerecord:
@@ -64,6 +66,7 @@ es:
index: index:
imported_appearance_release_missing_attachment: Person photo or contract missing for imported appearance release (ES) imported_appearance_release_missing_attachment: Person photo or contract missing for imported appearance release (ES)
table_headers: table_headers:
approved: Approved (ES)
contact_info: "" contact_info: ""
name: "" name: ""
notes: "" notes: ""
@@ -402,6 +405,8 @@ es:
update: Approve (ES) update: Approve (ES)
update: 'Actualizar %{model}' update: 'Actualizar %{model}'
location_releases: location_releases:
csv:
no_amendment_clause: No amendment clause (ES)
form: form:
photos: photos:
dropzone_label: Tap to take a photo of the Property (optional) (ES) dropzone_label: Tap to take a photo of the Property (optional) (ES)
@@ -409,6 +414,8 @@ es:
table_headers: table_headers:
address: Address (ES) address: Address (ES)
amendment_signed: Amendment (ES) amendment_signed: Amendment (ES)
amendment_signed_column: Amendment signed (ES)
approved: Approved (ES)
notes: Notes (ES) notes: Notes (ES)
signed_at: Date Signed (ES) signed_at: Date Signed (ES)
tags: Tags (ES) tags: Tags (ES)
@@ -434,8 +441,10 @@ es:
heading: Guardian Photo heading: Guardian Photo
index: index:
table_headers: table_headers:
approved: Approved (ES)
name: Name (ES) name: Name (ES)
notes: Notes (ES) notes: Notes (ES)
owner_info: Owner Info
signed_at: Date Signed (ES) signed_at: Date Signed (ES)
tags: Tags (ES) tags: Tags (ES)
medical_releases: medical_releases:
@@ -444,7 +453,6 @@ es:
index: index:
table_headers: table_headers:
approved: Approved (ES) approved: Approved (ES)
approved?: Approved (ES)
contact_info: Contact info (ES) contact_info: Contact info (ES)
name: Person name (ES) name: Person name (ES)
notes: Notes (ES) notes: Notes (ES)
@@ -458,6 +466,7 @@ es:
misc_releases: misc_releases:
index: index:
table_headers: table_headers:
approved: Approved (ES)
contact_info: Contact info (ES) contact_info: Contact info (ES)
name: Person name (ES) name: Person name (ES)
notes: Notes (ES) notes: Notes (ES)
@@ -466,6 +475,7 @@ es:
music_releases: music_releases:
index: index:
table_headers: table_headers:
approved: Approved (ES)
composers_count: No. Composers (ES) composers_count: No. Composers (ES)
file_infos_count: No. Files (ES) file_infos_count: No. Files (ES)
name: Name (ES) name: Name (ES)
@@ -627,6 +637,7 @@ es:
heading: Guardian Photo (ES) heading: Guardian Photo (ES)
index: index:
table_headers: table_headers:
approved: Approved (ES)
email: Email (ES) email: Email (ES)
name: Name (ES) name: Name (ES)
notes: Notes (ES) notes: Notes (ES)

View File

@@ -4,6 +4,22 @@ FactoryBot.define do
name "Test Acquired Media Release" name "Test Acquired Media Release"
trait :with_address do
person_address_street1 "St1"
person_address_street2 "St2"
person_address_city "City"
person_address_state "State"
person_address_zip "123"
person_address_country "US"
end
trait :with_owner_info do
person_first_name "Jane"
person_last_name "Doe"
person_phone "100-555-1001"
person_email "owner@email.com"
end
trait :native do trait :native do
signature do signature do
path = Rails.root.join("spec", "fixtures", "files", "signature.png") path = Rails.root.join("spec", "fixtures", "files", "signature.png")

View File

@@ -4,10 +4,20 @@ FactoryBot.define do
name "Test Materials" name "Test Materials"
trait :with_address do
person_address_street1 "St1"
person_address_street2 "St2"
person_address_city "City"
person_address_state "State"
person_address_zip "123"
person_address_country "US"
end
trait :native do trait :native do
person_first_name "Jane" person_first_name "Jane"
person_last_name "Doe" person_last_name "Doe"
person_phone "100-555-1001" person_phone "100-555-1001"
person_email "owner@email.com"
signature do signature do
path = Rails.root.join("spec", "fixtures", "files", "signature.png") path = Rails.root.join("spec", "fixtures", "files", "signature.png")

View File

@@ -165,6 +165,24 @@ feature "User managing acquired_media releases" do
sign_in current_user sign_in current_user
end end
scenario "index table shows owner info" do
release = create(:acquired_media_release, :with_owner_info, :with_address, project: project)
visit project_acquired_media_releases_path(project)
expect(page).to have_content owner_info_table_header
expect(page).to have_content release.person_first_name
expect(page).to have_content release.person_last_name
expect(page).to have_content release.person_phone
expect(page).to have_content release.person_email
expect(page).to have_content release.person_address_street1
expect(page).to have_content release.person_address_city
expect(page).to have_content release.person_address_state
expect(page).to have_content release.person_address_zip
expect(page).to have_content release.person_address_country
end
scenario "creating a release for an adult", js: true do scenario "creating a release for an adult", js: true do
visit new_project_acquired_media_release_path(project) visit new_project_acquired_media_release_path(project)
@@ -262,6 +280,7 @@ feature "User managing acquired_media releases" do
end end
scenario "creating, updating, destroying a release", js: true do scenario "creating, updating, destroying a release", js: true do
resize_window_to(1_000, 1_000) do
release_data = { release_data = {
name: "Test Acquired Media Release", name: "Test Acquired Media Release",
applicable_media: ApplicableMedium.last.label, applicable_media: ApplicableMedium.last.label,
@@ -326,6 +345,7 @@ feature "User managing acquired_media releases" do
expect(page).not_to have_content("New name") expect(page).not_to have_content("New name")
end end
end end
end
scenario "viewing the contract PDF for an adult" do scenario "viewing the contract PDF for an adult" do
acquired_media_release = create(:acquired_media_release_with_contract_template, acquired_media_release = create(:acquired_media_release_with_contract_template,
@@ -836,4 +856,8 @@ feature "User managing acquired_media releases" do
def successful_import_message def successful_import_message
t 'acquired_media_releases.create.notice' t 'acquired_media_releases.create.notice'
end end
def owner_info_table_header
t 'acquired_media_releases.index.table_headers.owner_info'
end
end end

View File

@@ -185,6 +185,24 @@ feature "User managing material releases" do
sign_in current_user sign_in current_user
end end
scenario "index table shows owner info" do
release = create(:material_release, :native, :with_address, project: project)
visit project_material_releases_path(project)
expect(page).to have_content owner_info_table_header
expect(page).to have_content release.person_first_name
expect(page).to have_content release.person_last_name
expect(page).to have_content release.person_phone
expect(page).to have_content release.person_email
expect(page).to have_content release.person_address_street1
expect(page).to have_content release.person_address_city
expect(page).to have_content release.person_address_state
expect(page).to have_content release.person_address_zip
expect(page).to have_content release.person_address_country
end
scenario "creating a release for and adult", js: true do scenario "creating a release for and adult", js: true do
visit new_project_material_release_path(project) visit new_project_material_release_path(project)
@@ -813,4 +831,8 @@ feature "User managing material releases" do
def signature_field def signature_field
'material_release_signature_base64' 'material_release_signature_base64'
end end
def owner_info_table_header
t 'material_releases.index.table_headers.owner_info'
end
end end

View File

@@ -40,7 +40,7 @@ feature "User managing videos" do
expect(page).to have_selector "#video_edl_file", visible: :all expect(page).to have_selector "#video_edl_file", visible: :all
expect(page).to have_selector "#video_graphics_only_edl_file", visible: :all expect(page).to have_selector "#video_graphics_only_edl_file", visible: :all
expect(page).to have_selector "#video_audio_only_edl_file", visible: :all expect(page).to have_selector "#video_audio_only_edl_file", visible: :all
expect(page).to have_link "click here", href: /mailto:info@mesuite\.ai/ expect(page).to have_link "click here", href: /mailto:info@bigmedia\.ai/
fill_in_video_fields name: "New name", number: "99" fill_in_video_fields name: "New name", number: "99"

View File

@@ -8,7 +8,7 @@ RSpec.describe MailHelper, type: :helper do
link = CGI.unescape helper.mail_to_for_multiple_edls("test content", project) link = CGI.unescape helper.mail_to_for_multiple_edls("test content", project)
expect(link).to match "test content" expect(link).to match "test content"
expect(link).to match "info@mesuite.ai" expect(link).to match "info@bigmedia.ai"
expect(link).to match /Multiple Adobe Premiere EDLs needed for Test Account's Test Project project/ expect(link).to match /Multiple Adobe Premiere EDLs needed for Test Account's Test Project project/
expect(link).to match "INSTRUCTIONS" expect(link).to match "INSTRUCTIONS"
end end

View File

@@ -25,6 +25,31 @@ describe GenerateContractsZipJob do
end end
describe ".perform_now" do describe ".perform_now" do
shared_examples "generates ZIP containig CSV file with all releases data" do
it "generates ZIP containing CSV file with all releases data for all release types" do
lowercase_plural = subject.constantize.model_name.plural
GenerateContractsZipJob.perform_now(project, download, subject, project.public_send(lowercase_plural).ids)
generated_zip = download.file.blob.download
csv_file_name = "#{project.name.parameterize}_#{lowercase_plural.gsub('_', '-')}.csv"
Zip::InputStream.open(StringIO.new(generated_zip)) do |io|
while entry = io.get_next_entry
next unless entry.name == csv_file_name
csv_file = entry.get_input_stream.read
release_class = Object.const_get subject
release_headers = release_class.csv_headers
release_headers.each do |header|
expect(csv_file).to match header
expect(csv_file).not_to match translation_missing
end
end
end
end
end
it "updates a download record and creates attachment for it" do it "updates a download record and creates attachment for it" do
GenerateContractsZipJob.perform_now(project, download, "AppearanceRelease", project.appearance_releases.ids) GenerateContractsZipJob.perform_now(project, download, "AppearanceRelease", project.appearance_releases.ids)
@@ -35,36 +60,60 @@ describe GenerateContractsZipJob do
expect(download.file).to be_attached expect(download.file).to be_attached
end end
it "generates ZIP containing CSV file with all releases data for all release types" do context "generates ZIP for acquired media releases" do
release_types = %w[AcquiredMediaRelease AppearanceRelease LocationRelease MaterialRelease MedicalRelease MiscRelease MusicRelease TalentRelease] let(:release) { create(:acquired_media_release_with_contract_template, :native, project: project) }
create_releases_for_all_types subject { 'AcquiredMediaRelease' }
release_types.each do |type| it_behaves_like "generates ZIP containig CSV file with all releases data"
lowercase_plural = type.constantize.model_name.plural
GenerateContractsZipJob.perform_now(project, download, type, project.public_send(lowercase_plural).ids)
generated_zip = download.file.blob.download
csv_file_name = "#{project.name.parameterize}_#{lowercase_plural.gsub('_', '-')}.csv"
Zip::InputStream.open(StringIO.new(generated_zip)) do |io|
while entry = io.get_next_entry
next unless entry.name == csv_file_name
csv_file = entry.get_input_stream.read
release_class = Object.const_get type
release_headers = release_class.csv_headers
release_headers.each do |header|
expect(csv_file).to match header
end
end end
dummy_zip_file_name = "#{project.name.parameterize}_#{lowercase_plural.gsub('_', '-')}.zip" context "generates ZIP for appearance releases" do
if File.exist?(file_fixture(dummy_zip_file_name)) let(:release) { create(:appearance_release_with_contract_template, :native, project: project, person_name: "John Doe") }
File.delete(file_fixture(dummy_zip_file_name)) subject { 'AppearanceRelease' }
it_behaves_like "generates ZIP containig CSV file with all releases data"
end end
context "generates ZIP for location releases" do
let(:release) { create(:location_release_with_contract_template, :native, project: project) }
subject { 'LocationRelease' }
it_behaves_like "generates ZIP containig CSV file with all releases data"
end end
context "generates ZIP for material releases" do
let(:release) { create(:material_release_with_contract_template, :native, project: project) }
subject { 'MaterialRelease' }
it_behaves_like "generates ZIP containig CSV file with all releases data"
end end
context "generates ZIP for medical releases" do
let(:release) { create(:medical_release_with_contract_template, :native, project: project) }
subject { 'MedicalRelease' }
it_behaves_like "generates ZIP containig CSV file with all releases data"
end
context "generates ZIP for misc releases" do
let(:release) { create(:misc_release_with_contract_template, :native, project: project) }
subject { 'MiscRelease' }
it_behaves_like "generates ZIP containig CSV file with all releases data"
end
context "generates ZIP for music releases" do
let(:release) { create(:music_release_with_contract_template, project: project) }
subject { 'MusicRelease' }
it_behaves_like "generates ZIP containig CSV file with all releases data"
end
context "generates ZIP for talent releases" do
let(:release) { create(:talent_release_with_contract_template, :native, project: project) }
subject { 'TalentRelease' }
it_behaves_like "generates ZIP containig CSV file with all releases data"
end end
context "When there are errors" do context "When there are errors" do
@@ -88,21 +137,16 @@ describe GenerateContractsZipJob do
# Delete the file created in fixture. # Delete the file created in fixture.
# Or the tests will fail on next run due to already existing files in existing zip. # Or the tests will fail on next run due to already existing files in existing zip.
path = Rails.root.join("spec", "fixtures", "files") path = Rails.root.join("spec", "fixtures", "files")
if File.exists? "#{path}/my-video-project_appearance-releases.zip" releases = %w[acquired-media appearance location material medical misc music talent]
File.delete("#{path}/my-video-project_appearance-releases.zip") releases.each do |release|
if File.exists? "#{path}/my-video-project_#{release}-releases.zip"
File.delete("#{path}/my-video-project_#{release}-releases.zip")
end
end end
end end
private private
def translation_missing
def create_releases_for_all_types /translation missing/
create(:acquired_media_release_with_contract_template, :native, project: project)
create(:appearance_release_with_contract_template, :native, project: project, person_name: "John Doe")
create(:location_release_with_contract_template, :native, project: project)
create(:material_release_with_contract_template, :native, project: project)
create(:medical_release_with_contract_template, :native, project: project)
create(:misc_release_with_contract_template, :native, project: project)
create(:music_release_with_contract_template, project: project)
create(:talent_release_with_contract_template, :native, project: project)
end end
end end

View File

@@ -8,8 +8,8 @@ RSpec.describe AdminMailer do
it "renders the headers" do it "renders the headers" do
expect(mail.subject).to eq("[New Video] Test Account has uploaded a new video") expect(mail.subject).to eq("[New Video] Test Account has uploaded a new video")
expect(mail.to).to eq(["bray@mesuite.ai"]) expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
expect(mail.from).to eq(["support@mesuite.ai"]) expect(mail.from).to eq(["support@bigmedia.ai"])
end end
it "renders the body" do it "renders the body" do
@@ -24,8 +24,8 @@ RSpec.describe AdminMailer do
it "renders the headers" do it "renders the headers" do
expect(mail.subject).to eq("[Updated Video EDL File] Test Account has updated the EDL file for video_file.mp4") expect(mail.subject).to eq("[Updated Video EDL File] Test Account has updated the EDL file for video_file.mp4")
expect(mail.to).to eq(["bray@mesuite.ai"]) expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
expect(mail.from).to eq(["support@mesuite.ai"]) expect(mail.from).to eq(["support@bigmedia.ai"])
end end
it "renders the body" do it "renders the body" do
@@ -41,8 +41,8 @@ RSpec.describe AdminMailer do
it "renders the headers" do it "renders the headers" do
expect(mail.subject).to eq("[Updated Video Graphics Only EDL File] Test Account has updated the Graphics Only EDL file for video_file.mp4") expect(mail.subject).to eq("[Updated Video Graphics Only EDL File] Test Account has updated the Graphics Only EDL file for video_file.mp4")
expect(mail.to).to eq(["bray@mesuite.ai"]) expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
expect(mail.from).to eq(["support@mesuite.ai"]) expect(mail.from).to eq(["support@bigmedia.ai"])
end end
it "renders the body" do it "renders the body" do
@@ -58,8 +58,8 @@ RSpec.describe AdminMailer do
it "renders the headers" do it "renders the headers" do
expect(mail.subject).to eq("[Updated Video Audio Only EDL File] Test Account has updated the Audio Only EDL file for video_file.mp4") expect(mail.subject).to eq("[Updated Video Audio Only EDL File] Test Account has updated the Audio Only EDL file for video_file.mp4")
expect(mail.to).to eq(["bray@mesuite.ai"]) expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
expect(mail.from).to eq(["support@mesuite.ai"]) expect(mail.from).to eq(["support@bigmedia.ai"])
end end
it "renders the body" do it "renders the body" do

View File

@@ -8,7 +8,7 @@ describe UserMailer do
it "renders the headers" do it "renders the headers" do
expect(mail.subject).to eq("Password reset") expect(mail.subject).to eq("Password reset")
expect(mail.to).to eq([user.email]) expect(mail.to).to eq([user.email])
expect(mail.from).to eq(["support@mesuite.ai"]) expect(mail.from).to eq(["support@bigmedia.ai"])
end end
it "renders the body" do it "renders the body" do
@@ -24,7 +24,7 @@ describe UserMailer do
it "renders the headers" do it "renders the headers" do
expect(mail.subject).to eq("You've been added to a project in the ME Suite") expect(mail.subject).to eq("You've been added to a project in the ME Suite")
expect(mail.to).to eq([user.email]) expect(mail.to).to eq([user.email])
expect(mail.from).to eq(["support@mesuite.ai"]) expect(mail.from).to eq(["support@bigmedia.ai"])
end end
it "renders the body" do it "renders the body" do
@@ -50,7 +50,7 @@ describe UserMailer do
it "renders the headers" do it "renders the headers" do
expect(mail.subject).to eq("Welcome to BiG") expect(mail.subject).to eq("Welcome to BiG")
expect(mail.to).to eq([user.email]) expect(mail.to).to eq([user.email])
expect(mail.from).to eq(["support@mesuite.ai"]) expect(mail.from).to eq(["support@bigmedia.ai"])
end end
it "renders the body" do it "renders the body" do

View File

@@ -32,7 +32,7 @@ describe AppHost do
app_domain = AppHost.new(env, "production") app_domain = AppHost.new(env, "production")
expect(app_domain.domain).to eq("mesuite.ai") expect(app_domain.domain).to eq("bigmedia.ai")
end end
end end
end end