Permalink
Browse files

Specify returning the same message added

We add another unit test to confirm that the get() method returns the same message added via create().

Inner Red: ("fake message") is not equal to ("test message text")

Our unit test error confirms that we're currently returning a hard-coded message.
  • Loading branch information...
CodingItWrong committed Jan 2, 2018
1 parent f7ad0c7 commit ca826cbc534120b0dafde4892e195a2ebd429ee6
Showing with 9 additions and 0 deletions.
  1. +9 −0 LearnTDDInCocoaTouchTests/Unit/MessageStoreTests.swift
@@ -18,4 +18,13 @@ class MessageStoreTests: XCTestCase {
XCTAssertEqual(count, 1, "Expected store.count to be 1 but was \(count)")
}
func testGetShouldReturnMessageAdded() {
let createdText = "test message text"
store.create(createdText)
let retrievedText = store.get(0)
XCTAssertEqual(retrievedText, createdText)
}
}

0 comments on commit ca826cb

Please sign in to comment.