Skip to content

Commit

Permalink
Merge b745a90 into dedf9df
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoviola committed Jan 9, 2020
2 parents dedf9df + b745a90 commit a61989e
Show file tree
Hide file tree
Showing 2 changed files with 16 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"
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
12 changes: 12 additions & 0 deletions spec/features/owner_actions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,5 +272,17 @@
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(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 a61989e

Please sign in to comment.