Compare commits
5 Commits
add-second
...
upgrade-ra
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a0eb0dd06 | ||
|
|
6831c66fda | ||
|
|
4bff4c9d5b | ||
|
|
8951667e61 | ||
|
|
fe131491cd |
2
Gemfile
2
Gemfile
@@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|||||||
ruby "2.6.3"
|
ruby "2.6.3"
|
||||||
|
|
||||||
# Bundle edge Rails instead: gem "rails", github: "rails/rails"
|
# Bundle edge Rails instead: gem "rails", github: "rails/rails"
|
||||||
gem "rails", "~> 6.0.0"
|
gem "rails", "~> 6.0.3.1"
|
||||||
# Use postgresql as the database for Active Record
|
# Use postgresql as the database for Active Record
|
||||||
gem "pg", "~> 0.18"
|
gem "pg", "~> 0.18"
|
||||||
# Use Puma as the app server
|
# Use Puma as the app server
|
||||||
|
|||||||
130
Gemfile.lock
130
Gemfile.lock
@@ -44,71 +44,71 @@ GEM
|
|||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
Ascii85 (1.0.3)
|
Ascii85 (1.0.3)
|
||||||
actioncable (6.0.0)
|
actioncable (6.0.3.2)
|
||||||
actionpack (= 6.0.0)
|
actionpack (= 6.0.3.2)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (6.0.0)
|
actionmailbox (6.0.3.2)
|
||||||
actionpack (= 6.0.0)
|
actionpack (= 6.0.3.2)
|
||||||
activejob (= 6.0.0)
|
activejob (= 6.0.3.2)
|
||||||
activerecord (= 6.0.0)
|
activerecord (= 6.0.3.2)
|
||||||
activestorage (= 6.0.0)
|
activestorage (= 6.0.3.2)
|
||||||
activesupport (= 6.0.0)
|
activesupport (= 6.0.3.2)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.7.1)
|
||||||
actionmailer (6.0.0)
|
actionmailer (6.0.3.2)
|
||||||
actionpack (= 6.0.0)
|
actionpack (= 6.0.3.2)
|
||||||
actionview (= 6.0.0)
|
actionview (= 6.0.3.2)
|
||||||
activejob (= 6.0.0)
|
activejob (= 6.0.3.2)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (6.0.0)
|
actionpack (6.0.3.2)
|
||||||
actionview (= 6.0.0)
|
actionview (= 6.0.3.2)
|
||||||
activesupport (= 6.0.0)
|
activesupport (= 6.0.3.2)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0, >= 2.0.8)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actiontext (6.0.0)
|
actiontext (6.0.3.2)
|
||||||
actionpack (= 6.0.0)
|
actionpack (= 6.0.3.2)
|
||||||
activerecord (= 6.0.0)
|
activerecord (= 6.0.3.2)
|
||||||
activestorage (= 6.0.0)
|
activestorage (= 6.0.3.2)
|
||||||
activesupport (= 6.0.0)
|
activesupport (= 6.0.3.2)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (6.0.0)
|
actionview (6.0.3.2)
|
||||||
activesupport (= 6.0.0)
|
activesupport (= 6.0.3.2)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
active_storage_base64 (1.0.0)
|
active_storage_base64 (1.0.0)
|
||||||
rails (~> 6.0)
|
rails (~> 6.0)
|
||||||
activejob (6.0.0)
|
activejob (6.0.3.2)
|
||||||
activesupport (= 6.0.0)
|
activesupport (= 6.0.3.2)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (6.0.0)
|
activemodel (6.0.3.2)
|
||||||
activesupport (= 6.0.0)
|
activesupport (= 6.0.3.2)
|
||||||
activemodel-serializers-xml (1.0.2)
|
activemodel-serializers-xml (1.0.2)
|
||||||
activemodel (> 5.x)
|
activemodel (> 5.x)
|
||||||
activesupport (> 5.x)
|
activesupport (> 5.x)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
activerecord (6.0.0)
|
activerecord (6.0.3.2)
|
||||||
activemodel (= 6.0.0)
|
activemodel (= 6.0.3.2)
|
||||||
activesupport (= 6.0.0)
|
activesupport (= 6.0.3.2)
|
||||||
activeresource (5.1.0)
|
activeresource (5.1.0)
|
||||||
activemodel (>= 5.0, < 7)
|
activemodel (>= 5.0, < 7)
|
||||||
activemodel-serializers-xml (~> 1.0)
|
activemodel-serializers-xml (~> 1.0)
|
||||||
activesupport (>= 5.0, < 7)
|
activesupport (>= 5.0, < 7)
|
||||||
activestorage (6.0.0)
|
activestorage (6.0.3.2)
|
||||||
actionpack (= 6.0.0)
|
actionpack (= 6.0.3.2)
|
||||||
activejob (= 6.0.0)
|
activejob (= 6.0.3.2)
|
||||||
activerecord (= 6.0.0)
|
activerecord (= 6.0.3.2)
|
||||||
marcel (~> 0.3.1)
|
marcel (~> 0.3.1)
|
||||||
activesupport (6.0.0)
|
activesupport (6.0.3.2)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
zeitwerk (~> 2.1, >= 2.1.8)
|
zeitwerk (~> 2.2, >= 2.2.2)
|
||||||
addressable (2.7.0)
|
addressable (2.7.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
afm (0.2.2)
|
afm (0.2.2)
|
||||||
@@ -181,7 +181,7 @@ GEM
|
|||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.1.5)
|
concurrent-ruby (1.1.6)
|
||||||
connection_pool (2.2.2)
|
connection_pool (2.2.2)
|
||||||
countries (2.1.4)
|
countries (2.1.4)
|
||||||
i18n_data (~> 0.8.0)
|
i18n_data (~> 0.8.0)
|
||||||
@@ -230,7 +230,7 @@ GEM
|
|||||||
hubspot-ruby (0.9.0)
|
hubspot-ruby (0.9.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
httparty (>= 0.10.0)
|
httparty (>= 0.10.0)
|
||||||
i18n (1.8.2)
|
i18n (1.8.3)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
i18n_data (0.8.0)
|
i18n_data (0.8.0)
|
||||||
i18n_yaml_sorter (0.2.0)
|
i18n_yaml_sorter (0.2.0)
|
||||||
@@ -270,22 +270,22 @@ GEM
|
|||||||
ruby_dep (~> 1.2)
|
ruby_dep (~> 1.2)
|
||||||
loaf (0.8.1)
|
loaf (0.8.1)
|
||||||
rails (>= 3.2)
|
rails (>= 3.2)
|
||||||
loofah (2.4.0)
|
loofah (2.6.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.7.1)
|
mail (2.7.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
marcel (0.3.3)
|
marcel (0.3.3)
|
||||||
mimemagic (~> 0.3.2)
|
mimemagic (~> 0.3.2)
|
||||||
method_source (0.9.2)
|
method_source (1.0.0)
|
||||||
mime-types (3.3)
|
mime-types (3.3)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2019.0904)
|
mime-types-data (3.2019.0904)
|
||||||
mimemagic (0.3.3)
|
mimemagic (0.3.5)
|
||||||
mini_magick (4.9.5)
|
mini_magick (4.9.5)
|
||||||
mini_mime (1.0.2)
|
mini_mime (1.0.2)
|
||||||
mini_portile2 (2.4.0)
|
mini_portile2 (2.4.0)
|
||||||
minitest (5.14.0)
|
minitest (5.14.1)
|
||||||
monetize (1.9.2)
|
monetize (1.9.2)
|
||||||
money (~> 6.12)
|
money (~> 6.12)
|
||||||
money (6.13.4)
|
money (6.13.4)
|
||||||
@@ -298,8 +298,8 @@ GEM
|
|||||||
msgpack (1.3.1)
|
msgpack (1.3.1)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
nio4r (2.5.1)
|
nio4r (2.5.2)
|
||||||
nokogiri (1.10.7)
|
nokogiri (1.10.9)
|
||||||
mini_portile2 (~> 2.4.0)
|
mini_portile2 (~> 2.4.0)
|
||||||
oath (1.1.0)
|
oath (1.1.0)
|
||||||
bcrypt
|
bcrypt
|
||||||
@@ -337,20 +337,20 @@ GEM
|
|||||||
rack
|
rack
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rails (6.0.0)
|
rails (6.0.3.2)
|
||||||
actioncable (= 6.0.0)
|
actioncable (= 6.0.3.2)
|
||||||
actionmailbox (= 6.0.0)
|
actionmailbox (= 6.0.3.2)
|
||||||
actionmailer (= 6.0.0)
|
actionmailer (= 6.0.3.2)
|
||||||
actionpack (= 6.0.0)
|
actionpack (= 6.0.3.2)
|
||||||
actiontext (= 6.0.0)
|
actiontext (= 6.0.3.2)
|
||||||
actionview (= 6.0.0)
|
actionview (= 6.0.3.2)
|
||||||
activejob (= 6.0.0)
|
activejob (= 6.0.3.2)
|
||||||
activemodel (= 6.0.0)
|
activemodel (= 6.0.3.2)
|
||||||
activerecord (= 6.0.0)
|
activerecord (= 6.0.3.2)
|
||||||
activestorage (= 6.0.0)
|
activestorage (= 6.0.3.2)
|
||||||
activesupport (= 6.0.0)
|
activesupport (= 6.0.3.2)
|
||||||
bundler (>= 1.3.0)
|
bundler (>= 1.3.0)
|
||||||
railties (= 6.0.0)
|
railties (= 6.0.3.2)
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
rails-controller-testing (1.0.4)
|
rails-controller-testing (1.0.4)
|
||||||
actionpack (>= 5.0.1.x)
|
actionpack (>= 5.0.1.x)
|
||||||
@@ -363,9 +363,9 @@ GEM
|
|||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.3.0)
|
rails-html-sanitizer (1.3.0)
|
||||||
loofah (~> 2.3)
|
loofah (~> 2.3)
|
||||||
railties (6.0.0)
|
railties (6.0.3.2)
|
||||||
actionpack (= 6.0.0)
|
actionpack (= 6.0.3.2)
|
||||||
activesupport (= 6.0.0)
|
activesupport (= 6.0.3.2)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.20.3, < 2.0)
|
thor (>= 0.20.3, < 2.0)
|
||||||
@@ -469,7 +469,7 @@ GEM
|
|||||||
turbolinks-source (5.2.0)
|
turbolinks-source (5.2.0)
|
||||||
typhoeus (1.3.1)
|
typhoeus (1.3.1)
|
||||||
ethon (>= 0.9.0)
|
ethon (>= 0.9.0)
|
||||||
tzinfo (1.2.6)
|
tzinfo (1.2.7)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (4.1.20)
|
uglifier (4.1.20)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
@@ -494,9 +494,9 @@ GEM
|
|||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
rack-proxy (>= 0.6.1)
|
rack-proxy (>= 0.6.1)
|
||||||
railties (>= 4.2)
|
railties (>= 4.2)
|
||||||
websocket-driver (0.7.1)
|
websocket-driver (0.7.2)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.4)
|
websocket-extensions (0.1.5)
|
||||||
will_paginate (3.2.1)
|
will_paginate (3.2.1)
|
||||||
will_paginate-bootstrap4 (0.2.2)
|
will_paginate-bootstrap4 (0.2.2)
|
||||||
will_paginate (~> 3.0, >= 3.0.0)
|
will_paginate (~> 3.0, >= 3.0.0)
|
||||||
@@ -504,7 +504,7 @@ GEM
|
|||||||
wkhtmltopdf-heroku (2.12.5.0)
|
wkhtmltopdf-heroku (2.12.5.0)
|
||||||
xpath (3.2.0)
|
xpath (3.2.0)
|
||||||
nokogiri (~> 1.8)
|
nokogiri (~> 1.8)
|
||||||
zeitwerk (2.2.2)
|
zeitwerk (2.3.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
@@ -561,7 +561,7 @@ DEPENDENCIES
|
|||||||
rack!
|
rack!
|
||||||
rack-contrib (~> 2.0.1)
|
rack-contrib (~> 2.0.1)
|
||||||
rack-cors
|
rack-cors
|
||||||
rails (~> 6.0.0)
|
rails (~> 6.0.3.1)
|
||||||
rails-controller-testing (~> 1.0.4)
|
rails-controller-testing (~> 1.0.4)
|
||||||
rails-data-migrations (~> 1.2.0)
|
rails-data-migrations (~> 1.2.0)
|
||||||
redcarpet (~> 3.4.0)
|
redcarpet (~> 3.4.0)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class AcquiredMediaReleasePolicy < ApplicationPolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
true
|
user.manager? || user.account_manager?
|
||||||
end
|
end
|
||||||
|
|
||||||
def tag_multiple?
|
def tag_multiple?
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class AppearanceReleasePolicy < ReleasePolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
true
|
user.manager? || user.account_manager?
|
||||||
end
|
end
|
||||||
|
|
||||||
def tag_multiple?
|
def tag_multiple?
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class LocationReleasePolicy < ReleasePolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
true
|
user.manager? || user.account_manager?
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_photos?
|
def edit_photos?
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class MaterialReleasePolicy < ReleasePolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
true
|
user.manager? || user.account_manager?
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_photos?
|
def edit_photos?
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class MedicalReleasePolicy < ReleasePolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
true
|
user.manager? || user.account_manager?
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_photos?
|
def edit_photos?
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class MiscReleasePolicy < ReleasePolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
true
|
user.manager? || user.account_manager?
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_photos?
|
def edit_photos?
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class MusicReleasePolicy < ReleasePolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
true
|
user.manager? || user.account_manager?
|
||||||
end
|
end
|
||||||
|
|
||||||
def tag_multiple?
|
def tag_multiple?
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class TalentReleasePolicy < ReleasePolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
true
|
user.manager? || user.account_manager?
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_photos?
|
def edit_photos?
|
||||||
|
|||||||
8
app/views/contracts/_medical_questionnaire.html.erb
Normal file
8
app/views/contracts/_medical_questionnaire.html.erb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<p class="heading"><strong><u><%= t ".heading" %></u></strong></p>
|
||||||
|
|
||||||
|
<% (1..MedicalRelease::NUMBER_OF_CUSTOM_FIELDS).each do |n| %>
|
||||||
|
<% if contract_template.public_send("question_#{n}_text").present? %>
|
||||||
|
<p><strong><%= contract_template.public_send("question_#{n}_text") %></strong></p>
|
||||||
|
<p><%= releasable.public_send("question_#{n}_answer") %></p>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
@@ -39,15 +39,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<% if releasable.model_name == "MedicalRelease" %>
|
|
||||||
<% (1..MedicalRelease::NUMBER_OF_CUSTOM_FIELDS).each do |n| %>
|
|
||||||
<% if contract_template.public_send("question_#{n}_text").present? %>
|
|
||||||
<p><strong><%= contract_template.public_send("question_#{n}_text") %></strong></p>
|
|
||||||
<p><%= releasable.public_send("question_#{n}_answer") %></p>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if releasable.minor? %>
|
<% if releasable.minor? %>
|
||||||
<br/>
|
<br/>
|
||||||
<p class="text-left"><strong>Guardian Information</strong></p>
|
<p class="text-left"><strong>Guardian Information</strong></p>
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
<p class="text-left"><strong>Guardian Clause</strong></p>
|
<p class="text-left"><strong>Guardian Clause</strong></p>
|
||||||
<%= contract_template.guardian_clause %>
|
<%= contract_template.guardian_clause %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% if releasable.model_name == "MedicalRelease" %>
|
||||||
|
<div class="page">
|
||||||
|
<%= render "contracts/medical_questionnaire", releasable: releasable, contract_template: contract_template, preview: preview %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<%= render "contracts/signature_page", releasable: releasable, contract_template: contract_template, preview: preview %>
|
<%= render "contracts/signature_page", releasable: releasable, contract_template: contract_template, preview: preview %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -246,6 +246,8 @@ en:
|
|||||||
new:
|
new:
|
||||||
heading: New Release Template
|
heading: New Release Template
|
||||||
contracts:
|
contracts:
|
||||||
|
medical_questionnaire:
|
||||||
|
heading: Medical Questionnaire
|
||||||
photos:
|
photos:
|
||||||
guardian_2_photo_heading: Second guardian photo
|
guardian_2_photo_heading: Second guardian photo
|
||||||
guardian_photo_heading: Guardian photo
|
guardian_photo_heading: Guardian photo
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ RSpec.describe Account do
|
|||||||
ZoomMeeting,
|
ZoomMeeting,
|
||||||
MedicalRelease,
|
MedicalRelease,
|
||||||
MiscRelease,
|
MiscRelease,
|
||||||
MatchingRequest
|
MatchingRequest,
|
||||||
|
ActionMailbox::InboundEmail # This is Rails model, we are not using it and it is NOT added to the Account#storage_total calculation
|
||||||
]
|
]
|
||||||
Rails.application.eager_load!
|
Rails.application.eager_load!
|
||||||
ActiveRecord::Base.descendants.each do |model|
|
ActiveRecord::Base.descendants.each do |model|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe AcquiredMediaReleasePolicy do
|
describe AcquiredMediaReleasePolicy do
|
||||||
let(:user_context) { build(:user_context) }
|
let(:user) { create(:user, :manager) }
|
||||||
|
let(:user_context) { build(:user_context, user: user, account: user.primary_account) }
|
||||||
|
|
||||||
subject { described_class }
|
subject { described_class }
|
||||||
|
|
||||||
@@ -24,6 +25,14 @@ describe AcquiredMediaReleasePolicy do
|
|||||||
end
|
end
|
||||||
|
|
||||||
permissions :destroy? do
|
permissions :destroy? do
|
||||||
it { is_expected.to permit(:destroy) }
|
it { is_expected.to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "for an associate" do
|
||||||
|
let(:user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.not_to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe AppearanceReleasePolicy do
|
describe AppearanceReleasePolicy do
|
||||||
let(:user_context) { build(:user_context) }
|
let(:user) { create(:user, :manager) }
|
||||||
|
let(:user_context) { build(:user_context, user: user, account: user.primary_account) }
|
||||||
|
|
||||||
subject { described_class }
|
subject { described_class }
|
||||||
|
|
||||||
@@ -24,6 +25,14 @@ describe AppearanceReleasePolicy do
|
|||||||
end
|
end
|
||||||
|
|
||||||
permissions :destroy? do
|
permissions :destroy? do
|
||||||
it { is_expected.to permit(:destroy) }
|
it { is_expected.to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "for an associate" do
|
||||||
|
let(:user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.not_to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe LocationReleasePolicy do
|
describe LocationReleasePolicy do
|
||||||
let(:user_context) { build(:user_context) }
|
let(:user) { create(:user, :manager) }
|
||||||
|
let(:user_context) { build(:user_context, user: user, account: user.primary_account) }
|
||||||
|
|
||||||
subject { described_class }
|
subject { described_class }
|
||||||
|
|
||||||
@@ -23,10 +24,6 @@ describe LocationReleasePolicy do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
permissions :destroy? do
|
|
||||||
it { is_expected.to permit(:destroy) }
|
|
||||||
end
|
|
||||||
|
|
||||||
permissions :edit_photos? do
|
permissions :edit_photos? do
|
||||||
it { is_expected.to permit(:edit_photos) }
|
it { is_expected.to permit(:edit_photos) }
|
||||||
end
|
end
|
||||||
@@ -34,4 +31,16 @@ describe LocationReleasePolicy do
|
|||||||
permissions :update_photos? do
|
permissions :update_photos? do
|
||||||
it { is_expected.to permit(:update_photos) }
|
it { is_expected.to permit(:update_photos) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "for an associate" do
|
||||||
|
let(:user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.not_to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe MaterialReleasePolicy do
|
describe MaterialReleasePolicy do
|
||||||
let(:user_context) { build(:user_context) }
|
let(:user) { create(:user, :manager) }
|
||||||
|
let(:user_context) { build(:user_context, user: user, account: user.primary_account) }
|
||||||
|
|
||||||
subject { described_class }
|
subject { described_class }
|
||||||
|
|
||||||
@@ -23,10 +24,6 @@ describe MaterialReleasePolicy do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
permissions :destroy? do
|
|
||||||
it { is_expected.to permit(:destroy) }
|
|
||||||
end
|
|
||||||
|
|
||||||
permissions :edit_photos? do
|
permissions :edit_photos? do
|
||||||
it { is_expected.to permit(:edit_photos) }
|
it { is_expected.to permit(:edit_photos) }
|
||||||
end
|
end
|
||||||
@@ -34,4 +31,16 @@ describe MaterialReleasePolicy do
|
|||||||
permissions :update_photos? do
|
permissions :update_photos? do
|
||||||
it { is_expected.to permit(:update_photos) }
|
it { is_expected.to permit(:update_photos) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "for an associate" do
|
||||||
|
let(:user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.not_to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe MedicalReleasePolicy do
|
describe MedicalReleasePolicy do
|
||||||
let(:user_context) { build(:user_context) }
|
let(:user) { create(:user, :manager) }
|
||||||
|
let(:user_context) { build(:user_context, user: user, account: user.primary_account) }
|
||||||
|
|
||||||
subject { described_class }
|
subject { described_class }
|
||||||
|
|
||||||
@@ -23,10 +24,6 @@ describe MedicalReleasePolicy do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
permissions :destroy? do
|
|
||||||
it { is_expected.to permit(:destroy) }
|
|
||||||
end
|
|
||||||
|
|
||||||
permissions :edit_photos? do
|
permissions :edit_photos? do
|
||||||
it { is_expected.to permit(:edit_photos) }
|
it { is_expected.to permit(:edit_photos) }
|
||||||
end
|
end
|
||||||
@@ -34,4 +31,16 @@ describe MedicalReleasePolicy do
|
|||||||
permissions :update_photos? do
|
permissions :update_photos? do
|
||||||
it { is_expected.to permit(:update_photos) }
|
it { is_expected.to permit(:update_photos) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "for an associate" do
|
||||||
|
let(:user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.not_to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe MiscReleasePolicy do
|
describe MiscReleasePolicy do
|
||||||
let(:user_context) { build(:user_context) }
|
let(:user) { create(:user, :manager) }
|
||||||
|
let(:user_context) { build(:user_context, user: user, account: user.primary_account) }
|
||||||
|
|
||||||
subject { described_class }
|
subject { described_class }
|
||||||
|
|
||||||
@@ -19,10 +20,6 @@ describe MiscReleasePolicy do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
permissions :destroy? do
|
|
||||||
it { is_expected.to permit(:destroy) }
|
|
||||||
end
|
|
||||||
|
|
||||||
permissions :edit_photos? do
|
permissions :edit_photos? do
|
||||||
it { is_expected.to permit(:edit_photos) }
|
it { is_expected.to permit(:edit_photos) }
|
||||||
end
|
end
|
||||||
@@ -30,4 +27,16 @@ describe MiscReleasePolicy do
|
|||||||
permissions :update_photos? do
|
permissions :update_photos? do
|
||||||
it { is_expected.to permit(:update_photos) }
|
it { is_expected.to permit(:update_photos) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "for an associate" do
|
||||||
|
let(:user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.not_to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
RSpec.describe MusicReleasePolicy do
|
RSpec.describe MusicReleasePolicy do
|
||||||
let(:user_context) { build(:user_context) }
|
let(:user) { create(:user, :manager) }
|
||||||
|
let(:user_context) { build(:user_context, user: user, account: user.primary_account) }
|
||||||
|
|
||||||
subject { described_class }
|
subject { described_class }
|
||||||
|
|
||||||
@@ -18,6 +19,14 @@ RSpec.describe MusicReleasePolicy do
|
|||||||
end
|
end
|
||||||
|
|
||||||
permissions :destroy? do
|
permissions :destroy? do
|
||||||
it { is_expected.to permit(:destroy) }
|
it { is_expected.to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "for an associate" do
|
||||||
|
let(:user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.not_to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe TalentReleasePolicy do
|
describe TalentReleasePolicy do
|
||||||
let(:user_context) { build(:user_context) }
|
let(:user) { create(:user, :manager) }
|
||||||
|
let(:user_context) { build(:user_context, user: user, account: user.primary_account) }
|
||||||
|
|
||||||
subject { described_class }
|
subject { described_class }
|
||||||
|
|
||||||
@@ -23,10 +24,6 @@ describe TalentReleasePolicy do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
permissions :destroy? do
|
|
||||||
it { is_expected.to permit(:destroy) }
|
|
||||||
end
|
|
||||||
|
|
||||||
permissions :edit_photos? do
|
permissions :edit_photos? do
|
||||||
it { is_expected.to permit(:edit_photos) }
|
it { is_expected.to permit(:edit_photos) }
|
||||||
end
|
end
|
||||||
@@ -34,4 +31,16 @@ describe TalentReleasePolicy do
|
|||||||
permissions :update_photos? do
|
permissions :update_photos? do
|
||||||
it { is_expected.to permit(:update_photos) }
|
it { is_expected.to permit(:update_photos) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "for an associate" do
|
||||||
|
let(:user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
permissions :destroy? do
|
||||||
|
it { is_expected.not_to permit(user_context, :destroy) }
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user