Sha256: 299f6de125822f1a05e7e5f914a060034f6db041e06f7d63f1dfed7f5b49c034

Contents?: true

Size: 560 Bytes

Versions: 25

Compression:

Stored size: 560 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe Dataset do
  
  describe "#code" do

    before(:all){ Quandl::Client.token = ENV['QUANDL_AUTH_TOKEN'] }
    
    let(:dataset){ create(:dataset, source_code: "QUANDL_CLIENT_TEST_SOURCE" ) }
    let(:invalid_dataset){ create(:dataset, source_code: "QUANDL_CLIENT_TEST_SOURCE", code: dataset.code ) }
    subject{ invalid_dataset }
    
    it "should create the dataset" do
      dataset.status.should eq 201
    end
    
    its(:saved?){ should be_false }
    its(:status){ should eq 422 }
    
  end
  

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
quandl_client-2.5.0 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.9 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.8 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.7 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.6 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.5 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.4 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.3 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.2 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.1 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.4.0 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.3.2 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.3.1 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.3.0 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.2.2 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.2.1 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.2.0 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.1.4 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.1.3 spec/lib/quandl/client/dataset/validation_spec.rb
quandl_client-2.1.2 spec/lib/quandl/client/dataset/validation_spec.rb