|
|
|
|
@ -326,6 +326,25 @@ RSpec.describe LettingsLogsController, type: :request do
|
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "and organisation owns stock" do |
|
|
|
|
before do |
|
|
|
|
organisation.update!(holds_own_stock: true) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "displays button to create a new log" do |
|
|
|
|
get "/lettings-logs" |
|
|
|
|
expect(page).to have_content("Create a new lettings log") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "does not display the missing stock owners banner" do |
|
|
|
|
get "/lettings-logs", headers:, params: {} |
|
|
|
|
expect(page).not_to have_css(".govuk-notification-banner") |
|
|
|
|
expect(page).not_to have_content("Your organisation does not own stock.") |
|
|
|
|
expect(page).not_to have_link("add a stock owner", href: /stock-owners\/add/) |
|
|
|
|
expect(page).not_to have_link("users page", href: /users/) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when the user is a customer support user" do |
|
|
|
|
|