diff --git a/ee/spec/requests/api/graphql/merge_trains/trains_spec.rb b/ee/spec/requests/api/graphql/merge_trains/trains_spec.rb
index 7fa960331f8e4373fc6d4301cdc578805cee3a19..3cda39ab4bbff26caf8303dabd3767f6bb986a7e 100644
--- a/ee/spec/requests/api/graphql/merge_trains/trains_spec.rb
+++ b/ee/spec/requests/api/graphql/merge_trains/trains_spec.rb
@@ -114,6 +114,8 @@
         "The resource that you are attempting to access does not exist " \
           "or you don't have permission to perform this action"
       )
+
+      expect(result).to be_nil
     end
   end
 
@@ -163,6 +165,8 @@
             "The resource that you are attempting to access does not exist " \
               "or you don't have permission to perform this action"
           )
+
+          expect(result).to be_nil
         end
       end
     end