diff options
author | Steve <soaresss@appstate.edu> | 2018-09-12 13:58:31 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-09-12 13:58:31 +0000 |
commit | 175f689eb78191b138a6198997280e0363f7a7fd (patch) | |
tree | c2b3baaa5ff00f1654889ec512180de3f81fe990 /spec/requests | |
parent | d12c81cc5a5bc59c6f4d18fb49bc19ac2f4fb9e1 (diff) | |
download | gitlab-ce-175f689eb78191b138a6198997280e0363f7a7fd.tar.gz |
Initialize projects with readme
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index b6f92042ecc..65cd423f0bb 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -557,6 +557,14 @@ describe API::Projects do expect(json_response['visibility']).to eq('private') end + it 'creates a new project initialized with a README.md' do + project = attributes_for(:project, initialize_with_readme: 1, name: 'somewhere') + + post api('/projects', user), project + + expect(json_response['readme_url']).to eql("#{Gitlab.config.gitlab.url}/#{json_response['namespace']['full_path']}/somewhere/blob/master/README.md") + end + it 'sets tag list to a project' do project = attributes_for(:project, tag_list: %w[tagFirst tagSecond]) |