-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TTO-276 Revise queueing order in CRMS
- Add a custom `PresentationOrder` to the Core project to prioritize mdp namespace. - Add a new `Project#queue_order` used the same way as `PresentationOrder` except: - It applies to the list of candidates being considered for addition to the Queue. - Like `PresentationOrder` the custom `ORDER BY` becomes the first order clause.
- Loading branch information
Showing
5 changed files
with
76 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use utf8; | ||
|
||
use CGI; | ||
use Data::Dumper; | ||
use Test::More; | ||
|
||
use lib $ENV{'SDRROOT'} . '/crms/cgi'; | ||
use lib $ENV{'SDRROOT'} . '/crms/t/support'; | ||
use CRMS; | ||
use FakeMetadata; | ||
|
||
require_ok($ENV{'SDRROOT'}. '/crms/cgi/Project/Core.pm'); | ||
|
||
my $crms = CRMS->new(); | ||
# TODO: Project::for_name would be a much nicer way to do this. | ||
my $sql = 'SELECT id FROM projects WHERE name="Core"'; | ||
my $project_id = $crms->SimpleSqlGet($sql); | ||
my $project = Core->new(crms => $crms, id => $project_id); | ||
ok(defined $project); | ||
|
||
subtest '#queue_order' => sub { | ||
ok(defined $project->queue_order, 'Core project defines a queue_order'); | ||
}; | ||
|
||
subtest '#PresentationOrder' => sub { | ||
ok(defined $project->PresentationOrder, 'Core project defines a PresentationOrder'); | ||
}; | ||
|
||
done_testing(); | ||
|
||
|