As the API is subject to change in the future, it will be nice if we could create automated tests which we can easily run to confirm that we aren't breaking anything when making such changes.
In this recipe, we'll learn how to test REST APIs using Specs2.
As in the previous recipes, you can duplicate the project you used earlier or you can keep modifying the same one by adding the following dependency in the
"net.liftweb" %% "lift-testkit" % liftVersion% "test"
src/test/scala/ code/restusing the following code:
package code.rest import org.specs2.mutable.Specification import net.liftweb.mockweb.MockWeb._ import code.model.Client ...