summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-11-19 22:54:52 +0000
committerStan Hu <stanhu@gmail.com>2018-11-19 22:54:52 +0000
commitee3f474935336c35abb69485c3592fba7b5bfd98 (patch)
treeff775ba4a4fb69ac060673138c8b8bc505eace55 /spec
parent9dd2eae3bb069b96f8db153952ee02226e37fe73 (diff)
parent5d5481519deb304243ed1c09171ccf8a45052d46 (diff)
downloadgitlab-ce-ee3f474935336c35abb69485c3592fba7b5bfd98.tar.gz
Merge branch 'rails5-active-record-class-value' into 'master'
Rails5 deprecation: Passing a class as a value in an Active Record query is deprecated See merge request gitlab-org/gitlab-ce!23164
Diffstat (limited to 'spec')
-rw-r--r--spec/finders/pending_todos_finder_spec.rb2
-rw-r--r--spec/models/todo_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/finders/pending_todos_finder_spec.rb b/spec/finders/pending_todos_finder_spec.rb
index 32fad5e225f..b41b1b46a93 100644
--- a/spec/finders/pending_todos_finder_spec.rb
+++ b/spec/finders/pending_todos_finder_spec.rb
@@ -46,7 +46,7 @@ describe PendingTodosFinder do
create(:todo, :pending, user: user, target: note)
- todos = described_class.new(user, target_type: issue.class).execute
+ todos = described_class.new(user, target_type: issue.class.name).execute
expect(todos).to eq([todo])
end
diff --git a/spec/models/todo_spec.rb b/spec/models/todo_spec.rb
index 2c01578aaca..82ff2a002e0 100644
--- a/spec/models/todo_spec.rb
+++ b/spec/models/todo_spec.rb
@@ -226,7 +226,7 @@ describe Todo do
create(:todo, target: create(:merge_request))
- expect(described_class.for_type(Issue)).to eq([todo])
+ expect(described_class.for_type(Issue.name)).to eq([todo])
end
end