repositories tab specs
This commit is contained in:
parent
0ae9ac155c
commit
d8247012b5
3 changed files with 48 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
.merge-tabs.repository
|
.merge-tabs.repository
|
||||||
= link_to project_repository_path(@project), :class => "tab #{'active' if current_page?(project_repository_path(@project)) }" do
|
= link_to project_repository_path(@project), :class => "activities-tab tab #{'active' if current_page?(project_repository_path(@project)) }" do
|
||||||
%span
|
%span
|
||||||
Activities
|
Activities
|
||||||
= link_to "#", :class => "tab" do
|
= link_to "#", :class => "tab" do
|
||||||
|
|
12
db/schema.rb
12
db/schema.rb
|
@ -13,6 +13,18 @@
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20111220190817) do
|
ActiveRecord::Schema.define(:version => 20111220190817) do
|
||||||
|
|
||||||
|
create_table "features", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.string "branch_name"
|
||||||
|
t.integer "assignee_id"
|
||||||
|
t.integer "author_id"
|
||||||
|
t.integer "project_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.string "version"
|
||||||
|
t.integer "status", :default => 0, :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "issues", :force => true do |t|
|
create_table "issues", :force => true do |t|
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.integer "assignee_id"
|
t.integer "assignee_id"
|
||||||
|
|
35
spec/requests/repositories_spec.rb
Normal file
35
spec/requests/repositories_spec.rb
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
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 repo activities" do
|
||||||
|
page.should have_content("Activities")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should have link to last commit for activities tab" do
|
||||||
|
page.should have_content(@project.commit.safe_message[0..20])
|
||||||
|
page.should have_content(@project.commit.author_name)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should show commits list" do
|
||||||
|
page.all(:css, ".project-update").size.should == 20
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue