Browse Source
* CLDC-2505: "complete" tag added and implemented to bulk upload status * CLDC-2505: complete option added to choice * CLDC-2505: lettings changes made to sales * CLDC-2505: tests added, bulk_upload model changed, redirect changed * CLDC-2505: Content update * CLDC-2505: Tests fixed and moved to correct controller spec * CLDC-2505: linting * CLDC-2505: test linting fix * CLDC-2505: Content fix * Update content --------- Co-authored-by: Kat <katrina@kosiak.co.uk>pull/1944/head
Aaron Spencer
1 year ago
committed by
GitHub
10 changed files with 101 additions and 21 deletions
@ -0,0 +1,14 @@
|
||||
<% content_for :before_content do %> |
||||
<%= govuk_back_link href: @form.back_path %> |
||||
<% end %> |
||||
|
||||
<div class="govuk-grid-row"> |
||||
<div class="govuk-grid-column-two-thirds"> |
||||
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> |
||||
<h1 class="govuk-heading-l">These logs are complete</h1> |
||||
|
||||
<p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to lettings logs to view them.</p> |
||||
|
||||
<%= govuk_button_link_to "Return to lettings logs", lettings_logs_path %> |
||||
</div> |
||||
</div> |
@ -0,0 +1,14 @@
|
||||
<% content_for :before_content do %> |
||||
<%= govuk_back_link href: @form.back_path %> |
||||
<% end %> |
||||
|
||||
<div class="govuk-grid-row"> |
||||
<div class="govuk-grid-column-two-thirds"> |
||||
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> |
||||
<h1 class="govuk-heading-l">These logs are complete</h1> |
||||
|
||||
<p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to sales logs to view them.</p> |
||||
|
||||
<%= govuk_button_link_to "Return to sales logs", sales_logs_path %> |
||||
</div> |
||||
</div> |
@ -0,0 +1,21 @@
|
||||
require "rails_helper" |
||||
|
||||
RSpec.describe BulkUpload, type: :model do |
||||
let(:bulk_upload) { create(:bulk_upload, log_type: "lettings") } |
||||
|
||||
describe "def bulk_upload.completed?" do |
||||
context "when there are incomplete logs" do |
||||
it "returns false" do |
||||
create_list(:lettings_log, 2, :in_progress, bulk_upload:) |
||||
expect(bulk_upload.completed?).to equal(false) |
||||
end |
||||
end |
||||
|
||||
context "when there are no incomplete logs" do |
||||
it "returns true" do |
||||
create_list(:lettings_log, 2, :completed, bulk_upload:) |
||||
expect(bulk_upload.completed?).to equal(true) |
||||
end |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue