mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Update enterprise limit spec
This commit is contained in:
@@ -312,7 +312,7 @@ feature %q{
|
||||
end
|
||||
|
||||
context "when I have reached my enterprise ownership limit" do
|
||||
it "does not display the link to create a new enterprise" do
|
||||
it "shows a 'limit reached' modal message when trying to create a new enterprise" do
|
||||
supplier1.reload
|
||||
enterprise_user.owned_enterprises.push [supplier1]
|
||||
|
||||
@@ -320,7 +320,13 @@ feature %q{
|
||||
|
||||
page.should have_content supplier1.name
|
||||
page.should have_content distributor1.name
|
||||
expect(find("#content-header")).to_not have_link "New Enterprise"
|
||||
|
||||
within 'li#new_product_link' do
|
||||
expect(page).to have_link 'New Enterprise', href: '#'
|
||||
click_link 'New Enterprise'
|
||||
end
|
||||
|
||||
expect(page).to have_content I18n.t('js.admin.enterprise_limit_reached', contact_email: ContentConfig.footer_email)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user