debian-mirror-gitlab/spec/support/helpers/snippet_helpers.rb

15 lines
294 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module SnippetHelpers
def sign_in_as(user)
sign_in(public_send(user)) if user
end
def snippet_blob_file(blob)
{
"path" => blob.path,
2021-01-03 14:25:43 +05:30
"raw_url" => gitlab_raw_snippet_blob_url(blob.container, blob.path, host: 'localhost')
2020-07-28 23:09:34 +05:30
}
end
end