Sha256: f1fe9ef25137526ac3efe2e6eef72906ddf2262f8fe8379d2e2e7f56a54c497c

Contents?: true

Size: 767 Bytes

Versions: 1

Compression:

Stored size: 767 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'helper'

describe Octokit::Client::Events do
  before do
    @client = Octokit::Client.new(:login => 'sferik')
  end

  describe ".public_events" do
    it "should return all public events" do
      stub_get("/events").
        to_return(:body => fixture("v3/public_events.json"))
      public_events = @client.public_events
      public_events.first.id.should == '1513284759'
    end
  end

  describe ".repository_events" do
    it "should return events for a repository" do
      stub_get("/repos/sferik/rails_admin/events").
        to_return(:body => fixture("v3/repo_events.json"))
      repo_events = @client.repository_events("sferik/rails_admin")
      repo_events.first.type.should == "IssuesEvent"
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octokit-1.0.0 spec/octokit/client/events_spec.rb