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

repositories_spec.rb « requests « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3fb5371bbbf441420a547a11c64340fefccf0735 (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
40
41
42
43
44
45
46
47
48
49
require 'spec_helper'

describe "Repository" do

  before do
    @user = Factory :user
    @project = Factory :project
    @project.add_access(@user, :read, :write)
    login_with @user
  end

  describe "GET /:project_name/repository" do
    before do
      visit project_repository_path(@project)
    end

    it "should be on projects page" do
      current_path.should == project_repository_path(@project)
    end

    it "should have link to last commit for activities tab" do
      page.should have_content(@project.commit.safe_message[0..20])
    end
  end

  describe "GET /:project_name/repository/branches" do
    before do
      visit branches_project_repository_path(@project)
    end

    it "should have link to repo activities" do
      page.should have_content("Branches")
      page.should have_content("master")
    end
  end

  # TODO: Add new repo to seeds with tags list
  describe "GET /:project_name/repository/tags" do
    before do
      visit tags_project_repository_path(@project)
    end

    it "should have link to repo activities" do
      page.should have_content("Tags")
      page.should have_content("No tags")
    end
  end
end