Sha256: 4ecf990382739bd7410ed4507441d84d0fe47d51872c3958757aaae9c5744584

Contents?: true

Size: 593 Bytes

Versions: 3

Compression:

Stored size: 593 Bytes

Contents

require_relative "../../spec_helper"

describe Lam::Process do
  before(:all) do
    # @args = "--noop --project-root spec/fixtures/my_project"
    @args = '\'{ "we" : "love", "using" : "Lambda" }\' \'{"test": "1"}\' "handlers/controllers/posts.create"'
  end

  describe "lam process" do
    it "controller [event] [context] [handler]" do
      out = execute("bin/lam process controller #{@args}")
      # pp out # uncomment to debug
      data = JSON.parse(out)
      expect(data["statusCode"]).to eq 200
      expect(data["body"]).to eq({"we"=>"love", "using"=>"Lambda"})
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lam-0.1.2 spec/lib/lam/process_spec.rb
lam-0.1.1 spec/lib/lam/process_spec.rb
lam-0.0.1 spec/lib/lam/process_spec.rb