Commit d8247012b5dd7578a5d9f9922352c7f373d89af4
1 parent
0ae9ac15
Exists in
master
and in
4 other branches
repositories tab specs
Showing
3 changed files
with
48 additions
and
1 deletions
Show diff stats
app/views/repositories/_head.html.haml
1 | 1 | .merge-tabs.repository |
2 | - = link_to project_repository_path(@project), :class => "tab #{'active' if current_page?(project_repository_path(@project)) }" do | |
2 | + = link_to project_repository_path(@project), :class => "activities-tab tab #{'active' if current_page?(project_repository_path(@project)) }" do | |
3 | 3 | %span |
4 | 4 | Activities |
5 | 5 | = link_to "#", :class => "tab" do | ... | ... |
db/schema.rb
... | ... | @@ -13,6 +13,18 @@ |
13 | 13 | |
14 | 14 | ActiveRecord::Schema.define(:version => 20111220190817) do |
15 | 15 | |
16 | + create_table "features", :force => true do |t| | |
17 | + t.string "name" | |
18 | + t.string "branch_name" | |
19 | + t.integer "assignee_id" | |
20 | + t.integer "author_id" | |
21 | + t.integer "project_id" | |
22 | + t.datetime "created_at" | |
23 | + t.datetime "updated_at" | |
24 | + t.string "version" | |
25 | + t.integer "status", :default => 0, :null => false | |
26 | + end | |
27 | + | |
16 | 28 | create_table "issues", :force => true do |t| |
17 | 29 | t.string "title" |
18 | 30 | t.integer "assignee_id" | ... | ... |
... | ... | @@ -0,0 +1,35 @@ |
1 | +require 'spec_helper' | |
2 | + | |
3 | +describe "Repository" do | |
4 | + | |
5 | + before do | |
6 | + @user = Factory :user | |
7 | + @project = Factory :project | |
8 | + @project.add_access(@user, :read, :write) | |
9 | + login_with @user | |
10 | + end | |
11 | + | |
12 | + describe "GET /:project_name/repository" do | |
13 | + before do | |
14 | + visit project_repository_path(@project) | |
15 | + end | |
16 | + | |
17 | + it "should be on projects page" do | |
18 | + current_path.should == project_repository_path(@project) | |
19 | + end | |
20 | + | |
21 | + it "should have link to repo activities" do | |
22 | + page.should have_content("Activities") | |
23 | + end | |
24 | + | |
25 | + it "should have link to last commit for activities tab" do | |
26 | + page.should have_content(@project.commit.safe_message[0..20]) | |
27 | + page.should have_content(@project.commit.author_name) | |
28 | + end | |
29 | + | |
30 | + it "should show commits list" do | |
31 | + page.all(:css, ".project-update").size.should == 20 | |
32 | + end | |
33 | + end | |
34 | +end | |
35 | + | ... | ... |