Skip to content

Commit

Permalink
Allow some margin of error in SubredditSearchPaginatorTest
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbdean committed May 22, 2018
1 parent abf3cc3 commit b675eaa
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ class SubredditSearchPaginatorTest : Spek({
// Create a Map using sortings as keys and averageSubs as values
val mappedResults = sortings.zip(averageSubs).toMap()

val allowedError = 1.0

// We would expect that subreddits with a higher activity would have (on average) a higher amount of subscribers
mappedResults[SubredditSearchSort.ACTIVITY].should.be.above(mappedResults[SubredditSearchSort.RELEVANCE]!!)
(mappedResults[SubredditSearchSort.ACTIVITY]!! + allowedError)
.should.be.above(mappedResults[SubredditSearchSort.RELEVANCE]!!)
}
})

0 comments on commit b675eaa

Please sign in to comment.