Sha256: 2ce86cb2f793dc12d1738d25fb85744e12b2f31d62f7d3acab31158e5d5b69ce

Contents?: true

Size: 844 Bytes

Versions: 3

Compression:

Stored size: 844 Bytes

Contents

require "spec_helper"

module Refinery
  module <%= namespacing %>

    describe "<%= namespacing %> request specs", type: :request do

      before(:each) do
        Refinery::<%= namespacing %>::Engine.load_seed
      end

      it "successfully gets the index path as redirection" do
        get("/<%= plural_name %>")
        expect(response).to be_redirect
        expect(response).to redirect_to("/<%= plural_name %>/new")
      end

      it "successfully gets the new path" do
        get("/<%= plural_name %>/new")
        expect(response).to be_success
        expect(response).to render_template(:new)
      end

      it "successfully gets the thank_you path" do
        get("/<%= plural_name %>/thank_you")
        expect(response).to be_success
        expect(response).to render_template(:thank_you)
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
refinerycms-forms-2.0.0 lib/generators/refinery/form/templates/spec/requests/refinery/plural_name/plural_name_requests_spec.rb
refinerycms-forms-1.0.1 lib/generators/refinery/form/templates/spec/requests/refinery/plural_name/plural_name_requests_spec.rb
refinerycms-forms-1.0.0 lib/generators/refinery/form/templates/spec/requests/refinery/plural_name/plural_name_requests_spec.rb