diff --git a/spec/frontend/todos/components/todo_item_spec.js b/spec/frontend/todos/components/todo_item_spec.js
index 0ab2ced53bb54cf04f2112fc0763f7318da2f0e8..c4c8797b8a3f3db6ba66c463072ca81ba377d91f 100644
--- a/spec/frontend/todos/components/todo_item_spec.js
+++ b/spec/frontend/todos/components/todo_item_spec.js
@@ -73,12 +73,12 @@ describe('TodoItem', () => {
   describe('state based style', () => {
     it('applies background when todo is done', () => {
       createComponent({ todo: { state: TODO_STATE_DONE } });
-      expect(wrapper.attributes('class')).toContain('gl-bg-subtle');
+      expect(wrapper.classes()).toContain('gl-bg-subtle');
     });
 
     it('applies no background when todo is pending', () => {
       createComponent({ todo: { state: TODO_STATE_PENDING } });
-      expect(wrapper.attributes('class')).not.toContain('gl-bg-subtle');
+      expect(wrapper.classes()).not.toContain('gl-bg-subtle');
     });
   });