Skip to content
Browse files

add test cases for counting tweet length

  • Loading branch information...
1 parent a653afa commit 21884bf41717c4ff6c6b6be2bd6a6a40522e9eff @keitaf keitaf committed May 3, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 validate.yml
View
21 validate.yml
@@ -201,3 +201,24 @@ tests:
- description: "Valid url without protocol: domain + path + query"
text: "example.com/path/to/resource?search=foo&lang=en"
expected: true
+
+ lengths:
+ - description: "Count the number of characters"
+ text: "This is a test."
+ expected: 15
+
+ - description: "Count a URL starting with http:// as 20 characters"
+ text: "http://test.com"
+ expected: 20
+
+ - description: "Count a URL starting with https:// as 21 characters"
+ text: "https://test.com"
+ expected: 21
+
+ - description: "Count a URL without protocol as 20 characters"
+ text: "test.com"
+ expected: 20
+
+ - description: "Count multiple URLs correctly"
+ text: "Test http://test.com test http://test.com test.com test"
+ expected: 77

0 comments on commit 21884bf

Please sign in to comment.
Something went wrong with that request. Please try again.