debian-mirror-gitlab/spec/support/helpers/snippet_helpers.rb
2021-01-30 21:13:32 +05:30

14 lines
294 B
Ruby

# 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,
"raw_url" => gitlab_raw_snippet_blob_url(blob.container, blob.path, host: 'localhost')
}
end
end