Skip to content

Commit

Permalink
Merge e74739c into dedf9df
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoviola committed Jan 14, 2020
2 parents dedf9df + e74739c commit db788ba
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/views/collection/new.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.litebox-embed(style="width:550px")
h1 Create New Collection

- if current_user.account_type == "Individual Researcher" && current_user.collections.count >= 1
p(style="color: #FF0000") Individual Researcher Accounts are limited to a single collection. To upgrade your account, contact support@fromthepage.com.

p To create a new collection please start from entering the collection title. On the next step you will be able to add works into the collection.

=form_for(@collection, url: { :action => 'create' }) do |f|
Expand Down
1 change: 1 addition & 0 deletions lib/tasks/ingestor.rake
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ namespace :fromthepage do
print "Found tiff #{path}\n"
#convert tiff to jpg
destination = ImageHelper.convert_tiff(path)
GC.start
end
end
end
Expand Down
13 changes: 13 additions & 0 deletions spec/features/owner_actions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,5 +272,18 @@
expect(rtl_collection.text_language).to eq 'eng'
end

it "warns if account type is Individual Researcher" do
@owner.account_type = "Individual Researcher"
visit dashboard_owner_path
page.find('a', text: 'Create a Collection').click
expect(@owner.collections.count).to be >= 1
expect(page).to have_content("Individual Researcher Accounts are limited to a single collection.")
end

it "does not warn with another account type" do
@owner.account_type = "Trial"
visit dashboard_owner_path
page.find('a', text: 'Create a Collection').click
expect(page).not_to have_content("Individual Researcher Accounts are limited to a single collection.")
end
end

0 comments on commit db788ba

Please sign in to comment.