Hide "become a sustainer" button if you're already a sustainer
This commit is contained in:
parent
7edf3763a8
commit
67b17ec317
22 changed files with 318 additions and 26 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
import { assert } from 'chai';
|
||||
import {
|
||||
getAreWeASubscriber,
|
||||
getEmojiSkinTone,
|
||||
getPinnedConversationIds,
|
||||
getPreferredLeftPaneWidth,
|
||||
|
@ -21,6 +22,21 @@ describe('both/state/selectors/items', () => {
|
|||
} as any;
|
||||
}
|
||||
|
||||
describe('#getAreWeASubscriber', () => {
|
||||
it('returns false if the value is not in storage', () => {
|
||||
assert.isFalse(getAreWeASubscriber(getRootState({})));
|
||||
});
|
||||
|
||||
it('returns the value in storage', () => {
|
||||
assert.isFalse(
|
||||
getAreWeASubscriber(getRootState({ areWeASubscriber: false }))
|
||||
);
|
||||
assert.isTrue(
|
||||
getAreWeASubscriber(getRootState({ areWeASubscriber: true }))
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getEmojiSkinTone', () => {
|
||||
it('returns 0 if passed anything invalid', () => {
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue