Sha256: 8a214c087650435c11dced809e9b9f27a1d365364cacb76f4ba769cdf5becaf1

Contents?: true

Size: 447 Bytes

Versions: 3

Compression:

Stored size: 447 Bytes

Contents

require 'spec_helper'

describe API::<%= name.capitalize %> do
  include Rack::Test::Methods

  def app
    API::<%= name.capitalize %>
  end

  describe 'GET /api/<%= name.downcase %>' do
    let(:expected_response) { <%= name.downcase %> }

    it 'returns all <%= name.downcase %>' do
      get '/api/v1/<%= name.downcase %>'

      expect(last_response.status).to eq(200)
      expect(last_response.body).to eq(expected_response)
    end
  end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sumcli-0.6.0 lib/sumcli/templates/add/endpoint/test.rb.erb
sumcli-0.4.0 lib/sumcli/templates/add/endpoint/test.rb.erb
sumcli-0.1.0 lib/sumcli/templates/g/endpoint/test.rb.erb