Sha256: b7808ff92a077a2a886384574fe3d9c0a7f55a5bf54752ebe943fa801f6e91be

Contents?: true

Size: 1.35 KB

Versions: 116

Compression:

Stored size: 1.35 KB

Contents

require "spec_helper"

describe Onebox::Engine::GithubCommitOnebox do
  before(:all) do
    @link = "https://github.com/discourse/discourse/commit/803d023e2307309f8b776ab3b8b7e38ba91c0919"
    @uri = "https://api.github.com/repos/discourse/discourse/commits/803d023e2307309f8b776ab3b8b7e38ba91c0919"
  end

  include_context "engines"
  it_behaves_like "an engine"

  describe "#to_html" do
    it "includes owner" do
      expect(html).to include("discourse")
    end

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

    it "includes commit sha" do
      expect(html).to include("803d023e2307309f8b776ab3b8b7e38ba91c0919")
    end

    it "includes commit author gravatar" do
      expect(html).to include("2F7d3010c11d08cf990b7614d2c2ca9098.png")
    end

    it "includes commit message" do
      expect(html).to include("Fixed GitHub auth")
    end

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

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

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

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

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

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
onebox-1.5.7 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.5.6 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.5.5 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.5.3 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.5.2 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.5.1 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.5.0 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.4.9 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.4.8 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.4.7 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.4.5 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.4.4 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.4.3 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.4.2 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.4.1 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.4.0 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.3.9 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.3.8 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.3.7 spec/lib/onebox/engine/github_commit_onebox_spec.rb
onebox-1.3.6 spec/lib/onebox/engine/github_commit_onebox_spec.rb