package core

import org.scalatest.{FunSpec, Matchers}

class ServiceMethodsSpec extends FunSpec with Matchers {

  it("missing method") {
    val json = """
    {
      "name": "Api Doc",
      "base_url": "http://localhost:9000",

      "models": {
        "user": {
          "fields": [
            { "name": "id", "type": "long" }
          ]
        }
      },

      "resources": {
        "user": {
          "operations": [
            {
              "name": "id",
              "type": "long"
            }
          ]
        }
      }

    }
    """

    val validator = ServiceValidator(TestHelper.serviceConfig, json)
    validator.errors.mkString("") should be("Resource[user] /users: Missing HTTP method")
  }

}

package core

import org.scalatest.{FunSpec, Matchers}

class ServiceMethodsSpec extends FunSpec with Matchers {

  it("missing method") {
    val json = """
    {
      "name": "Api Doc",
      "base_url": "http://localhost:9000",

      "models": {
        "user": {
          "fields": [
            { "name": "id", "type": "long" }
          ]
        }
      },

      "resources": {
        "user": {
          "operations": [
            {
              "name": "id",
              "type": "long"
            }
          ]
        }
      }

    }
    """

    val validator = ServiceValidator(TestHelper.serviceConfig, json)
    validator.errors.mkString("") should be("Resource[user] /users Missing HTTP method")
  }

}

Update test based on format of error msg
Update test based on format of error msg
