diff options
Diffstat (limited to 'qa/qa/resource/project.rb')
-rw-r--r-- | qa/qa/resource/project.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qa/qa/resource/project.rb b/qa/qa/resource/project.rb index 645f4e97ee0..358e87b0eb9 100644 --- a/qa/qa/resource/project.rb +++ b/qa/qa/resource/project.rb @@ -96,7 +96,11 @@ module QA end def has_file?(file_path) - repository_tree.any? { |file| file[:path] == file_path } + response = repository_tree + + raise ResourceNotFoundError, "#{response[:message]}" if response.is_a?(Hash) && response.has_key?(:message) + + response.any? { |file| file[:path] == file_path } end def api_get_path |