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

pulibrary / pdc_describe / b1776731-62d7-41a7-882d-6a5b4760db75

14 May 2024 12:28PM UTC coverage: 79.223% (-16.7%) from 95.9%
b1776731-62d7-41a7-882d-6a5b4760db75

push

circleci

carolyncole
Adding a submission completion page

fixes #1791

9 of 9 new or added lines in 2 files covered. (100.0%)

567 existing lines in 42 files now uncovered.

2692 of 3398 relevant lines covered (79.22%)

60.03 hits per line

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

25.0
/app/controllers/work_migration_controller.rb
1
# frozen_string_literal: true
2
class WorkMigrationController < ApplicationController
1✔
3
  def migrate
1✔
UNCOV
4
    work = Work.find(params[:id])
×
UNCOV
5
    if work.ark.present? && current_user.can_admin?(work.group)
×
6
      begin
UNCOV
7
        run_migration(work)
×
8
      rescue RuntimeError => e
9
        flash[:notice] = e.message
×
10
      end
UNCOV
11
    elsif !current_user.can_admin?(work.group)
×
UNCOV
12
      flash[:notice] = "Unauthorized migration"
×
UNCOV
13
      Honeybadger.notify("Unauthorized to migration work #{work.id} (current user: #{current_user.id})")
×
14
    else
UNCOV
15
      flash[:notice] = "The ark is blank, no migration from Dataspace is possible"
×
16
    end
UNCOV
17
    redirect_to work_path(work)
×
18
  end
19

20
  private
1✔
21

22
    def run_migration(work)
1✔
UNCOV
23
      dspace = PULDspaceMigrate.new(work, current_user)
×
UNCOV
24
      dspace.migrate
×
UNCOV
25
      flash[:notice] = dspace.migration_message
×
26
    end
27
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