fix pull requests controller specs
This commit is contained in:
parent
f3e6347fda
commit
f5b343d350
|
@ -70,8 +70,10 @@ shared_examples_for 'pull request user with project reader rights' do
|
|||
end
|
||||
|
||||
it "should not create already up-to-date pull" do
|
||||
post :create, @create_params.merge({pull_request: {issue_attributes: {title: 'already', body: 'creating'}, to_ref: 'master', from_ref: 'master'}, to_project_id: @project.id})
|
||||
PullRequest.joins(:issue).where(issues: {title: 'already', body: 'creating'}).count.should == 0
|
||||
lambda{
|
||||
post :create, @create_params.merge({pull_request: {issue_attributes: {title: 'already', body: 'creating'},
|
||||
to_ref: 'master', from_ref: 'master'}, to_project_id: @project.id}) }.should
|
||||
change{ PullRequest.count }.by(0)
|
||||
end
|
||||
|
||||
it "should create pull request to the same project" do
|
||||
|
|
Loading…
Reference in New Issue