commits_spec.rb 474 Bytes
Newer Older
1 2 3 4
require 'spec_helper'

describe "Commits" do
  before do
5 6
    @project = FactoryGirl.create :ci_project
    @commit = FactoryGirl.create :ci_commit, project: @project
7 8 9 10
  end

  describe "GET /:project/refs/:ref_name/commits/:id/status.json" do
    before do
Valery Sizov's avatar
Valery Sizov committed
11
      get status_ci_project_ref_commits_path(@project, @commit.ref, @commit.sha), format: :json
12 13
    end

14 15
    it { expect(response.status).to eq(200) }
    it { expect(response.body).to include(@commit.sha) }
16 17
  end
end