Do not download media if in call

This commit is contained in:
Josh Perez 2021-01-29 17:58:28 -05:00 committed by GitHub
parent d22add261b
commit a096220990
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 274 additions and 47 deletions

View file

@ -9,6 +9,7 @@ import {
getCallsByConversation,
getCallSelector,
getIncomingCall,
isInCall,
} from '../../../state/selectors/calling';
import { getEmptyState, CallingStateType } from '../../../state/ducks/calling';
@ -132,4 +133,14 @@ describe('state/selectors/calling', () => {
);
});
});
describe('isInCall', () => {
it('returns should be false if we are not in a call', () => {
assert.isFalse(isInCall(getEmptyRootState()));
});
it('should be true if we are in a call', () => {
assert.isTrue(isInCall(getCallingState(stateWithActiveDirectCall)));
});
});
});