From 5d5481519deb304243ed1c09171ccf8a45052d46 Mon Sep 17 00:00:00 2001 From: Jasper Maes Date: Sat, 17 Nov 2018 16:14:36 +0100 Subject: Rails5: Passing a class as a value in an Active Record query is deprecated --- spec/finders/pending_todos_finder_spec.rb | 2 +- spec/models/todo_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spec') 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 -- cgit v1.2.1