Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-03-01 12:59:15 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-03-01 12:59:15 +0300
commit11dd2348c410949c98adfc10cdcf5be787742179 (patch)
tree60a0f6417228e80a1b28384f0a9c7998a9d95d75 /spec/factories/todos.rb
parente7fb3942664d12f517ec62f84f2119d8dee6bffa (diff)
parent54c1dc675f4eba7083373149222cd6b7b9292d1b (diff)
Merge branch '22951-fix-todos-api-endpoint-error-for-commits' into 'master'
Fix todos API endpoint application error Closes #22951 See merge request !9351
Diffstat (limited to 'spec/factories/todos.rb')
-rw-r--r--spec/factories/todos.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/factories/todos.rb b/spec/factories/todos.rb
index a5265f1b189..c1ac3bb84ad 100644
--- a/spec/factories/todos.rb
+++ b/spec/factories/todos.rb
@@ -18,11 +18,6 @@ FactoryGirl.define do
action { Todo::DIRECTLY_ADDRESSED }
end
- trait :on_commit do
- commit_id RepoHelpers.sample_commit.id
- target_type "Commit"
- end
-
trait :build_failed do
action { Todo::BUILD_FAILED }
target factory: :merge_request
@@ -48,4 +43,13 @@ FactoryGirl.define do
state :done
end
end
+
+ factory :on_commit_todo, class: Todo do
+ project factory: :empty_project
+ author
+ user
+ action { Todo::ASSIGNED }
+ commit_id RepoHelpers.sample_commit.id
+ target_type "Commit"
+ end
end