Sha256: 83cb19979bd8f6f0b080944843039055623086898a64702db9cdf0e5bf22d7a1

Contents?: true

Size: 632 Bytes

Versions: 20

Compression:

Stored size: 632 Bytes

Contents

RSpec.describe "<%= model_name_pluralize_underscored %>", type: :request do
  describe "API" do
    context "logged", logged: true do
      before(:each) do
        role = Role.non_member
        role.add_permission! :view_<%= model_name_pluralize_underscored %>
      end

      it "list" do
        FactoryBot.create_list :<%= model_name_underscored %>, 2
        get <%= model_name_pluralize_underscored %>_path(format: "json")
        expect(response).to have_http_status :success
        expect(response.body).to include "limit", "offset"
        expect(response.body).to match /total_count.{,2}:2/
      end
    end

  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
redmine_extensions-0.6.3 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.6.2 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.6.1 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.6.0 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.4.5 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.5.1 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.4.4 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.4.3 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.4.1 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.4.0 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.4.0.beta lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.3.11 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.3.10 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.3.9 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.3.8 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.3.7 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.3.6 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.3.4 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.3.3 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt
redmine_extensions-0.3.2 lib/generators/redmine_extensions/entity/templates/spec/requests/%model_name_underscored%_spec.rb.tt