Welcome to mirror list, hosted at ThFree Co, Russian Federation.

commits_spec.rb « requests « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cd7314f9812fdfdc83846cee3158a98b4e39e378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require 'spec_helper'

describe "Commits" do
  let(:project) { Factory :project }
  let!(:commit) { project.repo.commits.first }
  before do 
    login_as :user
    project.add_access(@user, :read)
  end

  describe "GET /commits" do
    before do 
      visit project_commits_path(project)
    end

    it "should have valid path" do
      current_path.should == project_commits_path(project)
    end

    it "should have project name" do 
      page.should have_content(project.name)
    end

    it "should list commits" do 
      page.should have_content(commit.author)
      page.should have_content(commit.message)
    end
  end

  describe "GET /commits/:id" do 
    before do 
      visit project_commit_path(project, commit)
    end

    it "should have valid path" do 
      current_path.should == project_commit_path(project, commit)
    end
  end
end