Sha256: ec85daeecae9f7df93f57f1a1f7afb7d9f978e02e6ec4b8f7c5fcf450f6fd65f

Contents?: true

Size: 691 Bytes

Versions: 52

Compression:

Stored size: 691 Bytes

Contents

require 'spec_helper'

describe Activity do

  before :each do
    stub_auth_request
  end

  context '/activities' do
    it "gets a current user's activities" do
      s = stub_api_get("/activities", "activities/get.json")
      activities = Activity.get
      activities.should be_an(Array)
      activities.size.should eq(2)
      s.should have_been_requested
    end
  end

  context '/activities/<id>' do
    let(:id) { "20121128132106172132000004" }
    it "gets an individual activity" do
      s = stub_api_get("/activities/#{id}", "activities/get.json")
      activity = Activity.find(id)
      activity.should be_an(Activity)
      s.should have_been_requested
    end
  end

end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
spark_api-1.4.34 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.32 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.31 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.29 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.28 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.27 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.26 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.25 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.24 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.23 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.22 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.21 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.20 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.19 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.18 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.17 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.16 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.15 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.14 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.13 spec/unit/spark_api/models/activity_spec.rb