summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/requests/git_http_spec.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb
index 08471339f5d..e812556ea76 100644
--- a/spec/requests/git_http_spec.rb
+++ b/spec/requests/git_http_spec.rb
@@ -160,15 +160,11 @@ describe 'Git HTTP requests' do
it 'creates the repository' do
FileUtils.rm_rf(wiki.repository.path)
- # Sanity check, did we rm_rf correctly?
- expect(wiki.repository.raw_repository.exists?).to eq(false)
-
- # This request should create the wiki repo as a side effect
- download(path) do |response|
- expect(response).to have_gitlab_http_status(:ok)
- end
-
- expect(wiki.repository.raw_repository.exists?).to eq(true)
+ expect do
+ download(path) do |response|
+ expect(response).to have_gitlab_http_status(:ok)
+ end
+ end.to change(wiki.repository.raw_repository, :exists?).from(false).to(true)
end
end