This repository was archived by the owner on Jun 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Rocket.ChatTests/Extensions Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -137,13 +137,13 @@ extension String {
137137 let params = components. dropFirst ( ) . joined ( separator: " " )
138138 return ( command: command, params: params)
139139 }
140-
140+
141141 func reaction( ) -> String ? {
142142 guard self . first == " + " && self . count > 1 else { return nil }
143-
143+
144144 let emoji = String ( self . dropFirst ( ) )
145145 guard emoji. first == " : " && emoji. last == " : " else { return nil }
146-
146+
147147 return emoji
148148 }
149149
Original file line number Diff line number Diff line change @@ -146,22 +146,22 @@ class StringExtensionSpec: XCTestCase {
146146
147147 XCTAssertNil ( string2. commandAndParams ( ) )
148148 }
149-
149+
150150 func testReaction( ) {
151151 let string = " +:upside_down: "
152-
152+
153153 guard let emoji = string. reaction ( ) else {
154154 return XCTFail ( " string is valid reaction " )
155155 }
156-
156+
157157 XCTAssertEqual ( emoji, " :upside_down: " )
158-
158+
159159 let string2 = " :upside_down: "
160160 XCTAssertNil ( string2. reaction ( ) )
161-
161+
162162 let string3 = " +upside_down: "
163163 XCTAssertNil ( string3. reaction ( ) )
164-
164+
165165 let string4 = " +:upside_down "
166166 XCTAssertNil ( string4. reaction ( ) )
167167 }
You can’t perform that action at this time.
0 commit comments