[refs 428] Fix tests and merges missing
This commit is contained in:
parent
26a643eed1
commit
8819d0845a
|
@ -48,7 +48,7 @@ class Projects::BuildListsController < Projects::BaseController
|
||||||
@build_list.commit_hash = @project.git_repository.commits(@build_list.project_version.match(/^latest_(.+)/).to_a.last || @build_list.project_version).first.id if @build_list.project_version
|
@build_list.commit_hash = @project.git_repository.commits(@build_list.project_version.match(/^latest_(.+)/).to_a.last || @build_list.project_version).first.id if @build_list.project_version
|
||||||
@build_list.build_for_platform = build_for_platform; @build_list.arch = arch; @build_list.user = current_user
|
@build_list.build_for_platform = build_for_platform; @build_list.arch = arch; @build_list.user = current_user
|
||||||
@build_list.include_repos = @build_list.include_repos.select {|ir| @build_list.build_for_platform.repository_ids.include? ir.to_i}
|
@build_list.include_repos = @build_list.include_repos.select {|ir| @build_list.build_for_platform.repository_ids.include? ir.to_i}
|
||||||
@build_list.priority = 100 # User builds more priority than mass rebuild with zero priority
|
@build_list.priority = current_user.build_priority # User builds more priority than mass rebuild with zero priority
|
||||||
flash_options = {:project_version => @build_list.project_version, :arch => arch.name, :build_for_platform => build_for_platform.name, :save_to_platform => @build_list.save_to_platform}
|
flash_options = {:project_version => @build_list.project_version, :arch => arch.name, :build_for_platform => build_for_platform.name, :save_to_platform => @build_list.save_to_platform}
|
||||||
if @build_list.save
|
if @build_list.save
|
||||||
notices << t("flash.build_list.saved", flash_options)
|
notices << t("flash.build_list.saved", flash_options)
|
||||||
|
|
|
@ -3,7 +3,7 @@ FactoryGirl.define do
|
||||||
factory :build_list do
|
factory :build_list do
|
||||||
association :user
|
association :user
|
||||||
association :project
|
association :project
|
||||||
association save_to_platform, :factory => :platform_with_repos
|
association :save_to_platform, :factory => :platform_with_repos
|
||||||
association :arch
|
association :arch
|
||||||
build_for_platform {|bl| bl.save_to_platform}
|
build_for_platform {|bl| bl.save_to_platform}
|
||||||
project_version "1.0"
|
project_version "1.0"
|
||||||
|
|
|
@ -94,7 +94,9 @@ describe CanCan do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it { @ability.should be_able_to(:show, User) }
|
it "shoud be able to show user profile" do
|
||||||
|
@ability.should be_able_to(:show, User)
|
||||||
|
end
|
||||||
|
|
||||||
it "shoud be able to read another user object" do
|
it "shoud be able to read another user object" do
|
||||||
admin_create
|
admin_create
|
||||||
|
|
Loading…
Reference in New Issue