Sha256: 34c8f14909f7ed4362ccb5d705f959f785cf2a33461dd7eb59bb44374bc8e47f

Contents?: true

Size: 653 Bytes

Versions: 5

Compression:

Stored size: 653 Bytes

Contents

require 'couchbase-orm/json_schema/validation'

class DummyClass
  extend CouchbaseOrm::JsonSchema::Validation
  validate_json_schema
end

class DummyClass2
  extend CouchbaseOrm::JsonSchema::Validation
end

RSpec.describe CouchbaseOrm::JsonSchema::Validation do
  describe '#validate_json_schema' do
    it 'sets @validate_json_schema to true' do
      expect(DummyClass.json_validation_config[:enabled]).to be_truthy
    end

    it 'does not mixup @validate_json_schema between classes' do
      expect(DummyClass.json_validation_config[:enabled]).to be_truthy
      expect(DummyClass2.json_validation_config[:enabled]).to be_falsey
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
couchbase-orm-2.0.4 spec/couchbase-orm/json_schema/validation_spec.rb
couchbase-orm-2.0.3 spec/couchbase-orm/json_schema/validation_spec.rb
couchbase-orm-2.0.2 spec/couchbase-orm/json_schema/validation_spec.rb
couchbase-orm-2.0.1 spec/couchbase-orm/json_schema/validation_spec.rb
couchbase-orm-2.0.0 spec/couchbase-orm/json_schema/validation_spec.rb