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 ...@@ -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}") } it { expect(subject.web_url).to eq("http://localhost/#{project.full_path}/-/blob/#{blob.commit_id}/#{blob.path}") }
end end
describe '.web_path' do describe '#web_path' do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:repository) { project.repository } let(:repository) { project.repository }
let(:blob) { Gitlab::Graphql::Representation::TreeEntry.new(repository.tree.blobs.first, repository) } let(:blob) { Gitlab::Graphql::Representation::TreeEntry.new(repository.tree.blobs.first, repository) }
......
...@@ -8,7 +8,7 @@ RSpec.describe CommitPresenter do ...@@ -8,7 +8,7 @@ RSpec.describe CommitPresenter do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:presenter) { described_class.new(commit, current_user: 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}") } it { expect(presenter.web_path).to eq("/#{project.full_path}/-/commit/#{commit.sha}") }
end end
......
...@@ -14,7 +14,7 @@ RSpec.describe TreeEntryPresenter do ...@@ -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}") } it { expect(presenter.web_url).to eq("http://localhost/#{project.full_path}/-/tree/#{tree.commit_id}/#{tree.path}") }
end 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}") } it { expect(presenter.web_path).to eq("/#{project.full_path}/-/tree/#{tree.commit_id}/#{tree.path}") }
end end
end end
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe UserPresenter do RSpec.describe UserPresenter do
let(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:presenter) { described_class.new(user) } subject(:presenter) { described_class.new(user) }
describe '.web_path' do describe '#web_path' do
it { expect(presenter.web_path).to eq("/#{user.username}") } it { expect(presenter.web_path).to eq("/#{user.username}") }
end end
describe '.web_url' do describe '#web_url' do
it { expect(presenter.web_url).to eq("http://localhost/#{user.username}") } it { expect(presenter.web_url).to eq("http://localhost/#{user.username}") }
end end
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