Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/organizations/organization_spec.rb')
-rw-r--r--spec/models/organizations/organization_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/organizations/organization_spec.rb b/spec/models/organizations/organization_spec.rb
index 2f9f04fd3e6..0670002135c 100644
--- a/spec/models/organizations/organization_spec.rb
+++ b/spec/models/organizations/organization_spec.rb
@@ -181,4 +181,13 @@ RSpec.describe Organizations::Organization, type: :model, feature_category: :cel
it { is_expected.to eq false }
end
end
+
+ describe '#web_url' do
+ it 'returns web url from `Gitlab::UrlBuilder`' do
+ web_url = 'http://127.0.0.1:3000/-/organizations/default'
+
+ expect(Gitlab::UrlBuilder).to receive(:build).with(organization, only_path: nil).and_return(web_url)
+ expect(organization.web_url).to eq(web_url)
+ end
+ end
end