• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / pdc_describe / cace366a-ffad-45f1-9b60-678e607fa527

14 May 2024 02:21PM UTC coverage: 60.862% (-35.0%) from 95.908%
cace366a-ffad-45f1-9b60-678e607fa527

push

circleci

jrgriffiniii
wip

1 of 3 new or added lines in 2 files covered. (33.33%)

1194 existing lines in 57 files now uncovered.

2076 of 3411 relevant lines covered (60.86%)

22.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

45.45
/app/controllers/wizard_policy_controller.rb
1
# frozen_string_literal: true
2

3
require "nokogiri"
1✔
4
require "open-uri"
1✔
5

6
# Controller to handle the policy agreement acknowlegdement before the wizard is started
7
#
8
class WizardPolicyController < ApplicationController
1✔
9
  # get /works/policy
10
  def show; end
1✔
11

12
  # post /works/policy
13
  def update
1✔
UNCOV
14
    group = Group.find_by(code: params[:group_code]) || current_user.default_group
×
UNCOV
15
    if params[:agreement] == "1"
×
UNCOV
16
      work = Work.create!(created_by_user_id: current_user.id, group:)
×
UNCOV
17
      work.add_provenance_note(DateTime.now, "User agreed to the Data Acceptance and Retention policy", current_user.id)
×
UNCOV
18
      redirect_to work_create_new_submission_path(work)
×
19
    else
UNCOV
20
      redirect_to root_path, notice: "You must agree to the policy to deposit"
×
21
    end
22
  end
23
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc