Closed
Bug 1108275
Opened 10 years ago
Closed 10 years ago
Add tests for when the IRC topic is settable.
Categories
(Chat Core :: IRC, defect)
Chat Core
IRC
Tracking
(Not tracked)
RESOLVED
FIXED
1.6
People
(Reporter: clokep, Assigned: clokep)
Details
Attachments
(1 file, 1 obsolete file)
|
3.87 KB,
patch
|
aleth
:
review+
|
Details | Diff | Splinter Review |
This adds a couple of tests for setting the mode. It's not exhaustive, but covers when the topic is settable or not.
Attachment #8532838 -
Flags: review?(aleth)
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → clokep
Status: NEW → ASSIGNED
Comment 1•10 years ago
|
||
Comment on attachment 8532838 [details] [diff] [review]
irc-test-modes.diff
Review of attachment 8532838 [details] [diff] [review]:
-----------------------------------------------------------------
::: chat/protocols/irc/irc.js
@@ +322,5 @@
> if (this._participants.has(aNick))
> return this._participants.get(aNick);
>
> let participant = new ircParticipant(aNick, this);
> + this._participants.set(participant.name, participant);
Why this change? this._participants is a normalizedMap. I would be concerned if the change had any effect.
::: chat/protocols/irc/test/test_setMode.js
@@ +25,5 @@
> +// Test joining a channel, then being set as op.
> +function test_topicSettable() {
> + let channel = new irc.ircChannel(new FakeAccount(), "#test", "nick");
> + // We're not in the room yet, so the topic is NOT editable.
> + equal(channel.topicSettable, false);
It is possible to add the comment explaining the test as a third parameter in equal(), that way it's automatically printed to the log if the test fails, iirc. Worth considering...
| Assignee | ||
Comment 2•10 years ago
|
||
Comment on attachment 8532838 [details] [diff] [review]
irc-test-modes.diff
(In reply to aleth [:aleth] from comment #1)
> Comment on attachment 8532838 [details] [diff] [review]
> irc-test-modes.diff
>
> Review of attachment 8532838 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: chat/protocols/irc/irc.js
> @@ +322,5 @@
> > if (this._participants.has(aNick))
> > return this._participants.get(aNick);
> >
> > let participant = new ircParticipant(aNick, this);
> > + this._participants.set(participant.name, participant);
>
> Why this change? this._participants is a normalizedMap. I would be concerned
> if the change had any effect.
Hmm...I think this is a problem with me mocking out the test poorly. I'll look more into this.
Attachment #8532838 -
Flags: review?(aleth) → review-
| Assignee | ||
Comment 3•10 years ago
|
||
Thanks for pointing out this flaw! I think you'll find the new version better.
Attachment #8532838 -
Attachment is obsolete: true
Attachment #8533445 -
Flags: review?(aleth)
Comment 4•10 years ago
|
||
Comment on attachment 8533445 [details] [diff] [review]
Patch v2
Review of attachment 8533445 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks! :-)
Attachment #8533445 -
Flags: review?(aleth) → review+
Updated•10 years ago
|
Keywords: checkin-needed
| Assignee | ||
Comment 5•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.6
You need to log in
before you can comment on or make changes to this bug.
Description
•