 								message: 'New message',
 								timestamp: Date.now()
 							}]
+							.delay(2000)
+							.then ->
+								resolve(lines)
 							.catch(reject)
-
-						Promise.delay(2000)
-						.then ->
-							resolve(lines)
-						.tap(logs.unsubscribe)
+					.finally(logs.unsubscribe)
 				.then (lines) ->
 					m.chai.expect(lines.length).to.equal(2)
 					m.chai.expect(lines).to.deep.match [{

							message: 'New message',
							timestamp: Date.now()
						}]
						.catch(reject)

						Promise.delay(2000)
						.then ->
							resolve(lines)
				.then (lines) ->

					message: 'Second message',
					timestamp: Date.now()
				}]
				.delay(2000)
				.then =>
					resin.logs.history(@uuid)
				.then (logs) ->
