#345: updated comments_controller_for_commit_spec
This commit is contained in:
parent
50a301d2fa
commit
b08881db50
|
@ -6,15 +6,15 @@ describe Projects::CommentsController do
|
||||||
@project = FactoryGirl.create(:project_with_commit)
|
@project = FactoryGirl.create(:project_with_commit)
|
||||||
@commit = @project.repo.commits.first
|
@commit = @project.repo.commits.first
|
||||||
|
|
||||||
@create_params = {comment: {body: 'I am a comment!'}, owner_name: @project.owner.uname, project_name: @project.name, commit_id: @commit.id}
|
@create_params = {comment: {body: 'I am a comment!'}, owner_with_name: "#{@project.owner.uname}/#{@project.name}", commit_id: @commit.id}
|
||||||
@update_params = {comment: {body: 'updated'}, owner_name: @project.owner.uname, project_name: @project.name, commit_id: @commit.id}
|
@update_params = {comment: {body: 'updated'}, owner_with_name: "#{@project.owner.uname}/#{@project.name}", commit_id: @commit.id}
|
||||||
|
|
||||||
any_instance_of(Project, versions: ['v1.0', 'v2.0'])
|
any_instance_of(Project, versions: ['v1.0', 'v2.0'])
|
||||||
@comment = FactoryGirl.create(:comment, commentable: @commit, project: @project)
|
@comment = FactoryGirl.create(:comment, commentable: @commit, project: @project)
|
||||||
@user = FactoryGirl.create(:user)
|
@user = FactoryGirl.create(:user)
|
||||||
@own_comment = FactoryGirl.create(:comment, commentable: @commit, user: @user, project: @project)
|
@own_comment = FactoryGirl.create(:comment, commentable: @commit, user: @user, project: @project)
|
||||||
set_session_for(@user)
|
set_session_for(@user)
|
||||||
@path = {owner_name: @project.owner.uname, project_name: @project.name, commit_id: @commit.id}
|
@path = {owner_with_name: "#{@project.owner.uname}/#{@project.name}", commit_id: @commit.id}
|
||||||
@return_path = commit_path(@project, @commit.id)
|
@return_path = commit_path(@project, @commit.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue