@@ -1721,6 +1721,15 @@ describe('CryptoClient', () => {
1721
1721
} ) ;
1722
1722
client . cryptoStore . storeOutboundGroupSession = storeSpy ;
1723
1723
1724
+ const ibStoreSpy = simple . stub ( ) . callFn ( async ( s ) => {
1725
+ expect ( s . sessionId ) . toBeDefined ( ) ;
1726
+ expect ( s . roomId ) . toEqual ( roomId ) ;
1727
+ expect ( s . senderUserId ) . toEqual ( userId ) ;
1728
+ expect ( s . senderDeviceId ) . toEqual ( TEST_DEVICE_ID ) ;
1729
+ expect ( s . pickled ) . toBeDefined ( ) ;
1730
+ } ) ;
1731
+ client . cryptoStore . storeInboundGroupSession = ibStoreSpy ;
1732
+
1724
1733
const joinedSpy = simple . stub ( ) . callFn ( async ( rid ) => {
1725
1734
expect ( rid ) . toEqual ( roomId ) ;
1726
1735
return Object . keys ( deviceMap ) ;
@@ -1763,6 +1772,7 @@ describe('CryptoClient', () => {
1763
1772
expect ( devicesSpy . callCount ) . toBe ( 1 ) ;
1764
1773
expect ( toDeviceSpy . callCount ) . toBe ( 1 ) ;
1765
1774
expect ( storeSpy . callCount ) . toBe ( 1 ) ;
1775
+ expect ( ibStoreSpy . callCount ) . toBe ( 1 ) ;
1766
1776
expect ( result ) . toMatchObject ( {
1767
1777
algorithm : "m.megolm.v1.aes-sha2" ,
1768
1778
sender_key : "BZ2AhgUQPramkd0qQ6m6rcIM9cMwNE1fjI784sW3dSM" ,
@@ -1772,10 +1782,6 @@ describe('CryptoClient', () => {
1772
1782
} ) ;
1773
1783
} ) ;
1774
1784
1775
- it . skip ( 'should store created outbound sessions as inbound sessions' , async ( ) => {
1776
- // TODO: Merge into above test when functionality exists.
1777
- } ) ;
1778
-
1779
1785
it . skip ( 'should get devices for invited members' , async ( ) => {
1780
1786
// TODO: Support invited members, if history visibility would allow.
1781
1787
} ) ;
0 commit comments