Skip to content

Commit 18e0bdc

Browse files
committed
UnblockReview: add test for double colon
1 parent 76863e5 commit 18e0bdc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

UnblockReview/tests/UnblockReview.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,19 @@ describe( 'processAcceptOrDecline( wikitext, paramsAndReason, acceptDeclineReaso
153153
expect( unblockReview.processAcceptOrDecline( wikitext, paramsAndReason, acceptDeclineReason, DEFAULT_DECLINE_REASON, acceptOrDecline ) ).toBe( expected );
154154
} );
155155

156+
test( 'Colons in front of 2 {{Unblock}}', () => {
157+
const wikitext =
158+
`:{{unblock|reason=Test1}}
159+
:{{unblock|reason=Test2}}`;
160+
const paramsAndReason = `Test2`;
161+
const acceptDeclineReason = `Insufficient. ~~~~`;
162+
const acceptOrDecline = `decline`;
163+
const expected =
164+
`{{unblock|reason=Test1}}
165+
{{unblock reviewed|decline=Insufficient. ~~~~|1=Test2}}`;
166+
expect( unblockReview.processAcceptOrDecline( wikitext, paramsAndReason, acceptDeclineReason, DEFAULT_DECLINE_REASON, acceptOrDecline ) ).toBe( expected );
167+
} );
168+
156169
test( 'Bulleted list and colon in front of {{Unblock}}', () => {
157170
const wikitext = `*:{{unblock|reason=Your reason here [[User:Filipe46|Filipe46]] ([[User talk:Filipe46#top|talk]]) 21:54, 25 November 2021 (UTC)}}`;
158171
const paramsAndReason = `Your reason here `;

0 commit comments

Comments
 (0)