Sha256: 0497946daf4e418418cf0af87b2087984069226f7be62e23df4a474c18b04bbb

Contents?: true

Size: 384 Bytes

Versions: 25

Compression:

Stored size: 384 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_examples_for "having a json uploader error message" do
  it "renders json response with error message" do
    subject
    expect(response.media_type).to eq("application/json")
    expect(response.status).to eq(422)
    json = JSON.parse(response.body)
    expect(json).to have_key("message")
    expect(json).to have_key("files")
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
alchemy_cms-7.2.8 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.13 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.2.7 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.2.6 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.2.5 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.12 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.2.4 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.11 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.2.3 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.10 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.2.2 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.9 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.2.1 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.8 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.7 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.6 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.5 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.4 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.3 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.2 lib/alchemy/test_support/shared_uploader_examples.rb