#222: fixed specs

This commit is contained in:
Vokhmin Alexey V 2013-07-23 18:19:31 +04:00
parent 2a5d72550b
commit 8f1d4e5118
2 changed files with 8 additions and 8 deletions

View File

@ -116,7 +116,7 @@ describe Projects::Git::TreesController do
end end
it 'should be able to perform restore_branch action' do it 'should be able to perform restore_branch action' do
put :restore_branch, @params.merge(:treeish => 'conflicts') put :restore_branch, @params.merge(:treeish => 'master-1', :sha => 'master')
response.should be_success response.should be_success
end end

View File

@ -117,21 +117,21 @@ describe Project do
end end
end end
context '#restore_branch' do context '#create_branch' do
before do before do
project.delete_branch(branch, user) project.delete_branch(branch, user)
end end
xit 'ensures that returns true on success' do it 'ensures that returns true on success' do
project.restore_branch(branch.name, branch.commit.id).should be_true project.create_branch(branch.name, branch.commit.id, user).should be_true
end end
it 'ensures that branch has been restored' do it 'ensures that branch has been created' do
lambda { project.restore_branch(branch.name, branch.commit.id) }.should change{ project.repo.branches.count }.by(1) lambda { project.create_branch(branch.name, branch.commit.id, user) }.should change{ project.repo.branches.count }.by(1)
end end
xit 'ensures that returns false on restore wrong branch' do it 'ensures that returns false on create wrong branch' do
project.restore_branch(branch.name, GitHook::ZERO).should be_false project.create_branch(branch.name, GitHook::ZERO, user).should be_false
end end
end end