Commit d143680c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #923 from NARKOZ/refactoring-2

Minor cleanup
parents a243253b 51c30d90
......@@ -10,19 +10,6 @@ class ProjectsController < ApplicationController
before_filter :authorize_admin_project!, :only => [:edit, :update, :destroy]
before_filter :require_non_empty_project, :only => [:blob, :tree, :graph]
def index
@projects = current_user.projects.includes(:events).order("events.created_at DESC")
@projects = @projects.page(params[:page]).per(40)
@events = Event.where(:project_id => current_user.projects.map(&:id)).recent.limit(20)
@last_push = current_user.recent_push
respond_to do |format|
format.html
format.atom { render :layout => false }
end
end
def new
@project = Project.new
end
......
......@@ -44,8 +44,5 @@ module Gitlab
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
# Extend assets path
config.assets.paths << Rails.root.join('vendor', 'assets', 'images', 'jquery-ui')
end
end
......@@ -10,23 +10,23 @@ describe "Last Push widget" do
visit dashboard_path
end
it "should display last push widget with link to merge request page" do
it "should display last push widget with link to merge request page" do
page.should have_content "Your last push was to branch new_design"
page.should have_link "Create Merge Request"
end
describe "click create MR" do
describe "click create MR" do
before { click_link "Create Merge Request" }
it { current_path.should == new_project_merge_request_path(@project) }
it { find("#merge_request_source_branch").value.should == "new_design" }
it { find("#merge_request_target_branch").value.should == "master" }
it { find("#merge_request_title").value.should == "\nNew Design" }
it { find("#merge_request_title").value.should == "New Design" }
end
def create_push_event
data = {
data = {
:before => "0000000000000000000000000000000000000000",
:after => "0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e",
:ref => "refs/heads/new_design",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment