{"action":"created","issue":{"url":"https://api.github.com/repos/ably/ably-ios/issues/48","labels_url":"https://api.github.com/repos/ably/ably-ios/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/ably/ably-ios/issues/48/comments","events_url":"https://api.github.com/repos/ably/ably-ios/issues/48/events","html_url":"https://github.com/ably/ably-ios/issues/48","id":115691113,"number":48,"title":"Tests: List of ObjC tests","user":{"login":"ricardopereira","id":3541185,"avatar_url":"https://avatars.githubusercontent.com/u/3541185?v=3","gravatar_id":"","url":"https://api.github.com/users/ricardopereira","html_url":"https://github.com/ricardopereira","followers_url":"https://api.github.com/users/ricardopereira/followers","following_url":"https://api.github.com/users/ricardopereira/following{/other_user}","gists_url":"https://api.github.com/users/ricardopereira/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardopereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardopereira/subscriptions","organizations_url":"https://api.github.com/users/ricardopereira/orgs","repos_url":"https://api.github.com/users/ricardopereira/repos","events_url":"https://api.github.com/users/ricardopereira/events{/privacy}","received_events_url":"https://api.github.com/users/ricardopereira/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-07T20:39:59Z","updated_at":"2015-11-11T19:20:35Z","closed_at":null,"body":"_**Purpose:** to avoid pollution on the iOS specs spreadsheet and keep record of tests to be removed or rewritten. Current state of the tests._\r\n\r\n_**Legend:**_\r\n - remove ❌\r\n - spec don't exist but seems ok ⚠️\r\n - rewrite ‼️\r\n - fix ⭕️\r\n - seems ok ✅\r\n\r\nSome of them I couldn't relate to a specific spec because most of them are testing multi aspects. Ex: Checking `Channel#subscribe` and `Channel#unsubscribe` on the same test method.\r\n\r\n-----\r\n\r\n### Class `ARTFallbackTest`\r\n - testAllHostsIncludedOnce: ❌ (doesn't make sense)\r\n\r\n### Class `ARTHttpTest`\r\n - testPingGoogle: ⚠️\r\n - testNonExistantPath: ⚠️ (I think the idea of the test is checking if the 404 code is well handled)\r\n\r\n### Class `ARTLogTest `\r\n - testLogLevelToError: ❌\r\n - testLogLevel: ❌\r\n - testLogLevelNone: ❌\r\n - testNoCrashWithoutCustomLogger: ❌\r\n\r\nThe logging tests have been implemented on [Swift](https://github.com/ably/ably-ios/blob/96720f7c03fa60c75f69b1d0384648248be499b2/ablySpec/RestClient.swift#L75).\r\n\r\n### Class `ARTRealtimeAttachTest `\r\n - **testAttachOnce `RTL4a`**: ⭕️ (incomplete, doesn't make sense, it has a flag but it never changes)\r\n - testSkipsFromDetachingToAttaching: ⚠️ (invoke `channel.attach` when it is trying to `DETACHING`)\r\n - testAttachMultipleChannels: ⭕️⚠️ (doesn't raise any `XCTFail`)\r\n - **testDetach `RTL5d`**: ⭕️ (doesn't raise any `XCTFail`)\r\n - testDetaching: ✅ (checking state order)\r\n - testSkipsFromAttachingToDetaching: ✅ (checking state order)\r\n - **testDetachingIgnoresDetach `RTL5a`**: ⭕️ (incomplete)\r\n - **testAttachFailsOnFailedConnection `RTL4b`**: ⭕️ (incomplete, doesn't force the failed state)\r\n - **testAttachRestricted `RTL4d`**: ✅ \r\n - testAttachingChannelFails:  ❌ (the `testAttachRestricted` already check this)\r\n - testAttachedChannelFails:  ❌ (the `testAttachRestricted` already check this)\r\n - testChannelClosesOnClose: ⚠️ (there is no `Channel#close`)\r\n - testPresenceEnterRestricted: ‼️\r\n\r\n### Class `ARTRealtimeChannelHistoryTest`\r\n - **testHistory `RTL10c`**: ✅ \r\n - **testHistoryBothChannels `RTL10d`**: ⭕️ (should have 2 instances of RealtimeClient)\r\n - testHistoryForward: ⚠️\r\n - testHistoryForwardPagination: ⚠️\r\n - testHistoryBackwardPagination: ⚠️\r\n - testTimeBackwards: ⚠️ (could be better)\r\n - testTimeForwards: ⚠️ (could be better)\r\n - testHistoryFromAttach: ❌ (last tests already covers what this test is covering)\r\n\r\n### Class `ARTRealtimeChannelTest`\r\n - testAttach: ❌ (already tested with `ARTRealtimeAttachTest`)\r\n - testAttachBeforeConnect: ⭕️ (doesn't avoid to attach after it is connected)\r\n - testAttachDetach: ⚠️\r\n - testAttachDetachAttach: ⚠️\r\n - testSubscribeUnsubscribe: ⚠️ (testing 2 specs at the same time)\r\n - testSuspendingDetachesChannel: ⚠️\r\n - testFailingFailsChannel: ⭕️ (it doesn't check the `SUSPENDED` state)\r\n - **testGetChannels `RTS3a`**: ✅\r\n - testGetSameChannelWithParams: ⭕️ (has forced strings)\r\n - testAttachFails: ⚠️ (forced failure)\r\n - testDetachFails: ⚠️ (forced failure)\r\n - testPublishTooManyInArray: ⭕️ (have some doubts about `[ARTPayload getPayloadArraySizeLimit:2 modify:true]`)\r\n - testClientIdPreserved: ❌ (already implemented in Swift)\r\n\r\n### Class `ARTRealtimeConnectFailTest`\r\n\r\n❌ Remove all of it because it does nothing.\r\n\r\n### Class `ARTRealtimeConnectTest`\r\n\r\n❌ Remove all of it because it already exists in Swift.\r\n\r\n### Class `ARTRealtimeCryptoMessageTest`\r\n - **testCBCParser `RSL5b`**: ⚠️\r\n - testCBCParser256: ✅ (same parser check of `testCBCParser`)\r\n - testCaseByFileContents: ⚠️\r\n\r\n### Class `ARTRealtimeCryptoTest`\r\n - testSendEncodedMessage: ⭕️ (`cipherParams` is now part of ChannelOptions)\r\n - testSendEncodedMessageOnExistingChannel: ⭕️ (`cipherParams` is now part of ChannelOptions)\r\n\r\n### Class `ARTRealtimeInitTest`\r\n\r\n❌ Remove all of it because it already exists in Swift.\r\n\r\n### Class `ARTRealtimeMessageTest`\r\n - **multipleSendName `RTL6b`**: ⭕️ (incomplete, add error check)\r\n - testSingleSendText: ⚠️ (separate `subscribe` and `publish` test)\r\n - testPublish_10_1000: ⚠️\r\n - testPublish_20_200: ⚠️\r\n - testMultipleText_1000_10: ⚠️\r\n - **testEchoMessagesDefault, `RTL7f`**: ✅\r\n - testEchoMessagesFalse: ✅ (variation of testEchoMessagesDefault)\r\n - testSubscribeAttaches: ⭕️ (assign `subscribeToStateChanges` callback before the `subscribe`, ensures the channel gets attached when invoking `subscribe`)\r\n - **testMessageQueue `RTL6c2` (kind of)**: ⭕️ (have some doubts with `connectingHappened` flag)\r\n - **testConnectionIdsInMessage `RTL6f` (kind of)**: ⭕️ (have some doubts with the `history` call)\r\n - testPublishImmediate: ⭕️ (assign `subscribeToStateChanges` and `subscribe` before `eventEmitter.on`)\r\n - **testPublishArray `RTL6i`**: ⭕️ (assign `subscribe` before call `publish`)\r\n - **testPublishWithName `RTL6i1`**: ⭕️ (assign `subscribe` before call `publish`)\r\n - **testSubscribeToName**: ⭕️ (have some doubts: multiple tests in one spec) **`RTL7b`**\r\n\r\n### Class `ARTRealtimePresenceHistoryTest`\r\n - **testPresenceHistory `RSP4a`**: ✅\r\n - **testForward `RSP4b2`**: ✅ \r\n - testSecondChannel: ⚠️\r\n - testWaitTextBackward: ⚠️\r\n - testLimitForward: ⚠️\r\n - testLimitBackward: ⚠️\r\n - testFromAttach: ⚠️ (_callback hell_)\r\n - testPresenceHistoryMultipleClients: ⚠️\r\n\r\n### Class `ARTRealtimePresenceTest`\r\n - testTwoConnections: ⚠️ (the 2 instances should receive the message published on the same channel name)\r\n - testEnterSimple: ⚠️\r\n - **testEnterAttachesTheChannel `RTP8d`**: ✅\r\n - **testSubscribeConnects `RTP6c`**: ✅\r\n - testUpdateConnects: ⚠️\r\n - testEnterBeforeConnect: ⚠️\r\n - testEnterLeaveSimple: ⚠️\r\n - testEnterEnter: ⚠️ (`Presence#enter` twice, first `enter`, second `update`)\r\n - testEnterUpdateSimple: ⚠️ (`Presence#enter` and then `Presence#update`)\r\n - **testUpdateNull `RTP9a`**: ⭕️ (incomplete, check adding data for the present member)\r\n - **testEnterLeaveWithoutData `RTP10a`**: ✅ (data argument omitted)\r\n - **testUpdateNoEnter `RTP9b`**: ✅\r\n - testEnterAndGet: ⭕️ (2 client instances, same channel, both entered to the channel, `get` presence of channel but order of clients is random)\r\n - **testEnterNoClientId `RTP8c`**: ⭕️ (is checking for an exception but should verify the `clientId`)\r\n - **testEnterOnDetached `RTP8g`**: ⭕️ (should check for exception)\r\n - **testEnterOnFailed `RTP8g`**: ⭕️ (should check for exception)\r\n - testLeaveAndGet: ⚠️ (check if the client has been removed when a `leave` occurs)\r\n - **testLeaveNoData `RTP10a`**: ✅ (data argument omitted)\r\n - testLeaveNoMessage: ⚠️\r\n - testLeaveWithMessage: ⚠️\r\n - **testLeaveOnDetached `RTP10d`**: ✅\r\n - **testLeaveOnFailed `RTP10d`**: ✅\r\n - testEnterFailsOnError: ⚠️\r\n - testGetFailsOnDetachedOrFailed: ⚠️ (forcing fail)\r\n - **testEnterClient `RTP14d`**: ✅\r\n - testEnterClientIdFailsOnError: ⚠️\r\n - **testWithNoClientIdUpdateLeaveEnterAnotherClient `RTP15b`**: ⭕️ (incomplete)\r\n - test250ClientsEnter: ⭕️ (change `limit` to 250)\r\n - **testPresenceMap `RTP2`**: ✅\r\n - **testLeaveBeforeEnterThrows `RTP10d`**: ✅\r\n - testSubscribeToAction: ⭕️ (used unsubscribe instead using subscribe)\r\n - testSyncResumes: ⚠️ (need to run it)\r\n - **testPresenceNoSideEffects `RTP15`**: ✅\r\n - testPresenceWithData: ⚠️\r\n - testPresenceWithDataOnLeave: ⚠️\r\n\r\n### Class `ARTRealtimeRecoverTest`\r\n - **testRecoverDisconnected `RTN15d`**: ‼️ (recovering the connection with 2 instances of RealtimeClient but using `options.recover = nil`. Confusing)\r\n - testRecoverFails: ⚠️\r\n\r\n### Class `ARTRealtimeResumeTest`\r\n - testSimple: ⚠️ (2 connections, each connected to the same channel. Disconnect and reconnect one of the connections, then use that channel to send and receive the message)\r\n - testSimpleDisconnected: ⚠️\r\n\r\n### Class `ARTRealtimeTokenTest`\r\n\r\n❌ Remove all of it because it does nothing.\r\n\r\n### Class `ARTRestAppStatsTest`\r\n\r\n❌ Remove all of it because it already exists in Swift.\r\n\r\n### Class `ARTRestCapabilityTest`\r\n - testPublishRestricted: ⭕️ (fixed `capability`)\r\n\r\n### Class `ARTRestChannelHistoryTest`\r\n - testTimeBackwards: ⚠️\r\n - testTimeForwards: ⚠️\r\n - testHistoryForwardPagination: ⚠️\r\n - testHistoryBackwardPagination: ⚠️\r\n - testHistoryBackwardDefault: ⚠️\r\n - testHistoryTwoClients: ⚠️\r\n - **testHistoryLimit `RSL2b3`**: ✅ (check exception for invalid 1001 items)\r\n\r\n### Class `ARTRestChannelPublishTest`\r\n - **testTypesByText `RSL1b`**: ✅ (`Channels#publish`, the name is implicit)\r\n - **testPublishArray `RSL1a`**: ⭕️ (array of messages, _currently returns a single message back instead of 3_)\r\n - testPublishTooManyInArray: ❌ (don't see any limit for the array of messages)\r\n - testPublishUnJsonableType: ⚠️ (makes sense for Objective-C)\r\n\r\n### Class `ARTRestCryptoTest`\r\n - testSendBinary: ⚠️ (checking NSData and NSString)\r\n - testSendEncodedMessage: ⚠️ (fixed string)\r\n\r\n### Class `ARTRestInitTest`\r\n - testInternetIsUp: ⚠️\r\n - testInitWithKey: ❌ (already implemented in [Swift](https://github.com/ably/ably-ios/blob/96720f7c03fa60c75f69b1d0384648248be499b2/ablySpec/RestClient.swift#L20))\r\n - testInitWithNoKey: ❌\r\n - testInitWithKeyBad: ❌\r\n - testInitWithOptions: ❌\r\n - testInitWithOptionsEnvironment: ❌\r\n - testGetAuth: ❌\r\n - testInitWithOptionsBad: ❌\r\n - testRestTimeNoFallbackHost: ⭕️ (it doesn't check the fallback host)\r\n - testRestTime: ⭕️ (_Expect local clock and server clock to be synced within 10 seconds_ - don't expect)\r\n - testDefaultAuthType: ❌\r\n\r\n### Class `ARTRestPresenceTest`\r\n - testPresence: ❌ (incomplete)\r\n - **testHistory `RSP4a`**: ✅ (using channel `persisted:presence_fixtures`)\r\n - **testHistoryDefaultBackwards `RSP4b2`**: ✅ (using `test-app-setup.json`)\r\n - **testHistoryDirection `RSP4b2`**: ✅ (using `test-app-setup.json`)\r\n - **testPresenceLimit `RSP4b3`**: ✅ (checks exception for up max limit)\r\n\r\n### Class `ARTRestTokenTest`\r\n - testTokenSimple: ❌ (already implemented in [Swift](https://github.com/ably/ably-ios/blob/96720f7c03fa60c75f69b1d0384648248be499b2/ablySpec/Auth.swift#L149))\r\n - testInitWithBadToken: ⚠️\r\n - testInitWithBorrowedToken: ⚠️\r\n - testInitWithBorrowedTokenParam: ⚠️\r\n - **testUseTokenAuthForcesToken `RSA4`**: ✅\r\n - **testClientIdForcesToken `RSA4`**: ✅\r\n - **testAuthURLForcesToken `RSA4`**: ✅ (doesn't ensures if the transport connects with Token auth)\r\n - **testTTLDefaultOneHour `RSA5`**: ✅\r\n - **testTTL `RSA5`**: ✅\r\n - testTokenExpiresGetsReissued: ⚠️\r\n - testSameTokenIsUsed: ⚠️\r\n - testToken401GetsReissued: ⚠️\r\n - testReissuedTokenFailReturnsError: ❌ (it modifies the `keySecret`, _forced_ change)\r\n - testUseTokenAuthThrowsWithNoMeansToCreateToken: ❌ (already implemented in Swift)\r\n - testExpiredBorrowedTokenErrors: ⚠️\r\n - testInitWithBorrowedAuthCb: ❌ (doesn't make sense)\r\n"},"comment":{"url":"https://api.github.com/repos/ably/ably-ios/issues/comments/155883935","html_url":"https://github.com/ably/ably-ios/issues/48#issuecomment-155883935","issue_url":"https://api.github.com/repos/ably/ably-ios/issues/48","id":155883935,"user":{"login":"ricardopereira","id":3541185,"avatar_url":"https://avatars.githubusercontent.com/u/3541185?v=3","gravatar_id":"","url":"https://api.github.com/users/ricardopereira","html_url":"https://github.com/ricardopereira","followers_url":"https://api.github.com/users/ricardopereira/followers","following_url":"https://api.github.com/users/ricardopereira/following{/other_user}","gists_url":"https://api.github.com/users/ricardopereira/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardopereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardopereira/subscriptions","organizations_url":"https://api.github.com/users/ricardopereira/orgs","repos_url":"https://api.github.com/users/ricardopereira/repos","events_url":"https://api.github.com/users/ricardopereira/events{/privacy}","received_events_url":"https://api.github.com/users/ricardopereira/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T19:20:35Z","updated_at":"2015-11-11T19:20:35Z","body":"@mattheworiordan Yes, you right. The ⚠️ in some points is dubious. Initially, I tried to map 1-1 but the tests wasn't created that way so I decided to check the aggregation of specs. It is not easy because in some of them I needed to check a lot of specs."}}