Sha256: 0497946daf4e418418cf0af87b2087984069226f7be62e23df4a474c18b04bbb

Contents?: true

Size: 384 Bytes

Versions: 26

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

26 entries across 26 versions & 1 rubygems

Version Path
alchemy_cms-7.1.2 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.1 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.0 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.0.pre.rc1 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.0.pre.b2 lib/alchemy/test_support/shared_uploader_examples.rb
alchemy_cms-7.1.0.pre.b1 lib/alchemy/test_support/shared_uploader_examples.rb