Sha256: 61e9c607fab388da69d03d144d3b4cbed385378d91bc73400a972d41d1d3096b

Contents?: true

Size: 1.11 KB

Versions: 142

Compression:

Stored size: 1.11 KB

Contents

require "spec_helper"

describe Onebox::Engine::GithubPullRequestOnebox do
  before(:all) do
    @link = "https://github.com/discourse/discourse/pull/1253/"
    @uri = "https://api.github.com/repos/discourse/discourse/pulls/1253"
    fake(@uri, response(described_class.onebox_name))
  end

  include_context "engines"
  it_behaves_like "an engine"

  describe "#to_html" do
    it "includes pull request author" do
      expect(html).to include("jamesaanderson")
    end

    it "includes repository name" do
      expect(html).to include("discourse")
    end

    it "includes commit author gravatar" do
      expect(html).to include("b3e9977094ce189bbb493cf7f9adea21")
    end

    it "includes commit time and date" do
      expect(html).to include("02:05AM - 26 Jul 13")
    end

    it "includes number of commits" do
      expect(html).to include("1")
    end

    it "includes number of files changed" do
      expect(html).to include("4")
    end

    it "includes number of additions" do
      expect(html).to include("19")
    end

    it "includes number of deletions" do
      expect(html).to include("1")
    end
  end
end

Version data entries

142 entries across 142 versions & 1 rubygems

Version Path
onebox-1.8.18 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.17 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.16 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.15 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.14 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.13 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.12 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.11 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.10 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.9 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.8 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.7 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.6 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.5 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.4 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.3 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.2 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.1 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.8.0 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
onebox-1.7.9 spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb