Skip to content

Commit fba18f2

Browse files
committed
Issue #7: accept suggestions from the CodePolicy
1 parent a9e89e4 commit fba18f2

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

scripts/test/FAQSearch.t

+16-17
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ my %FAQAddTemplate = (
7272
);
7373

7474
# freeze time
75-
FixedTimeSet(); # t=0m
76-
FixedTimeAddSeconds(10*60);
75+
FixedTimeSet(); # t=0m
7776

7877
# get FAQ object
7978
my $FAQObject = $Kernel::OM->Get('Kernel::System::FAQ');
@@ -84,12 +83,12 @@ for my $Counter ( 1 .. 2 ) {
8483
UserID => $AddedUsers[ $Counter - 1 ],
8584
);
8685

87-
ok( defined $ItemID, "FAQAdd() $Counter ItemID:'$ItemID' for FAQSearch()",);
86+
ok( defined $ItemID, "FAQAdd() $Counter ItemID:'$ItemID' for FAQSearch()", );
8887
push @AddedFAQs, $ItemID;
8988

9089
# add 1 minute to frozen time
9190
FixedTimeAddSeconds(60);
92-
} # t=2m
91+
} # t=2m
9392

9493
# add some votes
9594
my @VotesToAdd = (
@@ -553,7 +552,7 @@ my %FAQUpdateTemplate = (
553552
);
554553

555554
# add 1 minute to frozen time
556-
FixedTimeAddSeconds(60); # t=3m
555+
FixedTimeAddSeconds(60); # t=3m
557556

558557
my $Success = $FAQObject->FAQUpdate(
559558
%FAQUpdateTemplate,
@@ -563,7 +562,7 @@ my $Success = $FAQObject->FAQUpdate(
563562

564563
ok( $Success, "FAQUpdate() ItemID:'$AddedFAQs[0]' for FAQSearch()" );
565564

566-
FixedTimeAddSeconds(60); # t=4m
565+
FixedTimeAddSeconds(60); # t=4m
567566

568567
$Success = $FAQObject->FAQUpdate(
569568
%FAQUpdateTemplate,
@@ -574,7 +573,7 @@ $Success = $FAQObject->FAQUpdate(
574573
ok( $Success, "FAQUpdate() ItemID:'$AddedFAQs[1]' for FAQSearch()" );
575574

576575
# add 2 minutes to frozen time
577-
FixedTimeAddSeconds(120); # t=6m
576+
FixedTimeAddSeconds(120); # t=6m
578577

579578
my $DateTime = $Kernel::OM->Create('Kernel::System::DateTime');
580579

@@ -854,7 +853,7 @@ for my $Test (@ApprovalTests) {
854853
}
855854

856855
# execute old tests
857-
diag( "Execute Former Tests" );
856+
diag("Execute Former Tests");
858857
{
859858
my $ItemID1 = $FAQObject->FAQAdd(
860859
CategoryID => 1,
@@ -871,7 +870,7 @@ diag( "Execute Former Tests" );
871870
ok( $ItemID1, "FAQAdd() - 1" );
872871

873872
# add 1 minute to frozen time
874-
FixedTimeAddSeconds(60); # t=7m
873+
FixedTimeAddSeconds(60); # t=7m
875874

876875
my $ItemID2 = $FAQObject->FAQAdd(
877876
Title => 'Title' . $RandomID,
@@ -884,10 +883,10 @@ diag( "Execute Former Tests" );
884883
UserID => 1,
885884
ContentType => 'text/html',
886885
);
887-
ok( $ItemID2, "FAQAdd() - 2");
886+
ok( $ItemID2, "FAQAdd() - 2" );
888887

889888
# add 1 minute to frozen time
890-
FixedTimeAddSeconds(60);# t=8m
889+
FixedTimeAddSeconds(60); # t=8m
891890

892891
my %Keywords = (
893892
Keyword1 => "some1$RandomID",
@@ -906,10 +905,10 @@ diag( "Execute Former Tests" );
906905
UserID => 1,
907906
ContentType => 'text/html',
908907
);
909-
ok( $ItemID3, "FAQAdd() - 3");
908+
ok( $ItemID3, "FAQAdd() - 3" );
910909

911910
# add 1 minute to frozen time
912-
FixedTimeAddSeconds(60); # t=9m
911+
FixedTimeAddSeconds(60); # t=9m
913912

914913
my $ItemID4 = $FAQObject->FAQAdd(
915914
Title => 'Test FAQ-4',
@@ -922,10 +921,10 @@ diag( "Execute Former Tests" );
922921
ContentType => 'text/html',
923922
);
924923

925-
ok( $ItemID4, "FAQAdd() - 4");
924+
ok( $ItemID4, "FAQAdd() - 4" );
926925

927926
# add 1 minute to frozen time
928-
FixedTimeAddSeconds(60); # t=10m
927+
FixedTimeAddSeconds(60); # t=10m
929928

930929
my $ItemID5 = $FAQObject->FAQAdd(
931930
Title => 'Test FAQ-5',
@@ -938,7 +937,7 @@ diag( "Execute Former Tests" );
938937
ContentType => 'text/html',
939938
);
940939

941-
ok( $ItemID5, "FAQAdd() - 4");
940+
ok( $ItemID5, "FAQAdd() - 4" );
942941

943942
# restore time
944943
FixedTimeUnset();
@@ -1128,7 +1127,7 @@ diag( "Execute Former Tests" );
11281127
%{ $Test->{Config} },
11291128
);
11301129

1131-
is( \@ItemIDs, $Test->{ExpectedResults}, "$Test->{Name}, FAQSearch()");
1130+
is( \@ItemIDs, $Test->{ExpectedResults}, "$Test->{Name}, FAQSearch()" );
11321131
}
11331132
}
11341133

0 commit comments

Comments
 (0)