Update enterprise limit spec

This commit is contained in:
Matt-Yorkley
2018-01-23 20:47:18 +00:00
parent d52f9fd43f
commit 3c5b01ece0

View File

@@ -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