Commit 711db9cf authored by Phil Hughes's avatar Phil Hughes

Apply 7 suggestion(s) to 4 file(s)

parent 3b27a458
......@@ -24,7 +24,7 @@ RSpec.describe BlobPresenter, :seed_helper do
it { expect(subject.web_url).to eq("http://localhost/#{project.full_path}/-/blob/#{blob.commit_id}/#{blob.path}") }
end
describe '.web_path' do
describe '#web_path' do
let(:project) { create(:project, :repository) }
let(:repository) { project.repository }
let(:blob) { Gitlab::Graphql::Representation::TreeEntry.new(repository.tree.blobs.first, repository) }
......
......@@ -8,7 +8,7 @@ RSpec.describe CommitPresenter do
let(:user) { create(:user) }
let(:presenter) { described_class.new(commit, current_user: user) }
describe '.web_path' do
describe '#web_path' do
it { expect(presenter.web_path).to eq("/#{project.full_path}/-/commit/#{commit.sha}") }
end
......
......@@ -14,7 +14,7 @@ RSpec.describe TreeEntryPresenter do
it { expect(presenter.web_url).to eq("http://localhost/#{project.full_path}/-/tree/#{tree.commit_id}/#{tree.path}") }
end
describe '.web_path' do
describe '#web_path' do
it { expect(presenter.web_path).to eq("/#{project.full_path}/-/tree/#{tree.commit_id}/#{tree.path}") }
end
end
......@@ -3,14 +3,14 @@
require 'spec_helper'
RSpec.describe UserPresenter do
let(:user) { create(:user) }
let(:presenter) { described_class.new(user) }
let_it_be(:user) { create(:user) }
subject(:presenter) { described_class.new(user) }
describe '.web_path' do
describe '#web_path' do
it { expect(presenter.web_path).to eq("/#{user.username}") }
end
describe '.web_url' do
describe '#web_url' do
it { expect(presenter.web_url).to eq("http://localhost/#{user.username}") }
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment