Welcome to mirror list, hosted at ThFree Co, Russian Federation.

blocks_json_serialization_spec.rb « concerns « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5906b588d0e127082015507d3fd2fad52f506b8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'rails_helper'

describe BlocksJsonSerialization do
  DummyModel = Class.new do
    include BlocksJsonSerialization
  end

  it 'blocks as_json' do
    expect { DummyModel.new.as_json }
      .to raise_error(described_class::JsonSerializationError, /DummyModel/)
  end

  it 'blocks to_json' do
    expect { DummyModel.new.to_json }
      .to raise_error(described_class::JsonSerializationError, /DummyModel/)
  end
end