Sha256: f0ad3cbee4eda3fb774d1d257442e1d49bb8914326049fc0ccb37945fe7e3c63

Contents?: true

Size: 583 Bytes

Versions: 7

Compression:

Stored size: 583 Bytes

Contents

require 'spec_helper'

describe StatRaptor::Client::Graphs, :vcr do
  let(:client) { StatRaptor::Client.new }

  ["revenue", "subscribers", "average_lifetime_value", "churn"].each do |graph_name|
    context "#get_#{graph_name}_graph_data" do
      it "should return a hash of #{graph_name} graph data" do
        graph = client.send("get_#{graph_name}_graph_data", :user_credentials => user_credentials, :subdomain => chargify_subdomain)
        graph.should be_a(Hash)
        graph["graph_data"].keys.should include("actual", "projected", "x_labels")
      end
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
statraptor-0.2.6 spec/statrapator/client/graphs_spec.rb
statraptor-0.2.5 spec/statrapator/client/graphs_spec.rb
statraptor-0.2.4 spec/statrapator/client/graphs_spec.rb
statraptor-0.2.3 spec/statrapator/client/graphs_spec.rb
statraptor-0.2.2 spec/statrapator/client/graphs_spec.rb
statraptor-0.2.1 spec/statrapator/client/graphs_spec.rb
statraptor-0.2.0 spec/statrapator/client/graphs_spec.rb