Sha256: 821edc28ecf5db041e7847017c2d49ecdb48676e55392705736540ede4224c1d

Contents?: true

Size: 636 Bytes

Versions: 15

Compression:

Stored size: 636 Bytes

Contents

require 'json'

module Adhoq
  RSpec.describe Reporter::Json, type: :model do
    describe '.mime_type' do
      specify { expect(Adhoq::Reporter::Json.mime_type).to eq 'application/json' }
    end

    context 'create xlsx report' do
      let(:report_data) do
        ex = Adhoq::AdhocExecution.new('json', attributes_for(:adhoq_query, :greeting)[:query])

        Adhoq::Reporter.generate(ex)
      end

      specify do
        expect(JSON.parse(report_data.read)).to eq [
          {
            'name'        => 'hello',
            'description' =>  'English greeting message'
          }
        ]
      end
    end
  end
end


Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
adhoq-1.0.2 spec/adhoq/reporter/json_spec.rb
adhoq-1.0.1 spec/adhoq/reporter/json_spec.rb
adhoq-1.0.0 spec/adhoq/reporter/json_spec.rb
adhoq-0.5.0 spec/adhoq/reporter/json_spec.rb
adhoq-0.5.0.beta1 spec/adhoq/reporter/json_spec.rb
adhoq-0.4.0 spec/adhoq/reporter/json_spec.rb
adhoq-0.3.0 spec/adhoq/reporter/json_spec.rb
adhoq-0.2.0 spec/adhoq/reporter/json_spec.rb
adhoq-0.1.2 spec/adhoq/reporter/json_spec.rb
adhoq-0.1.1 spec/adhoq/reporter/json_spec.rb
adhoq-0.1.0 spec/adhoq/reporter/json_spec.rb
adhoq-0.0.7 spec/adhoq/reporter/json_spec.rb
adhoq-0.0.6 spec/adhoq/reporter/json_spec.rb
adhoq-0.0.5 spec/adhoq/reporter/json_spec.rb
adhoq-0.0.4 spec/adhoq/reporter/json_spec.rb