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.12 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.11 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.10 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.9 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.8 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.6 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.5 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.4 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.2 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.1 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.4.0 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.3.28 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.3.27 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.3.26 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.3.25 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.3.24 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.3.23 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.3.21 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.3.20 spec/unit/spark_api/models/activity_spec.rb
spark_api-1.3.19 spec/unit/spark_api/models/activity_spec.rb