Skip to content

Commit

Permalink
Merge pull request #6495 from krauselukas/repo_controller_spec
Browse files Browse the repository at this point in the history
Adjust repositories controller rspec for bootstrap DoD migration
  • Loading branch information
bgeuken committed Dec 6, 2018
2 parents 39b6bea + e90726f commit 614acd8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/api/spec/controllers/webui/repositories_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@
end

it { expect(assigns(:error)).to start_with('Repository with name') }
it { expect(response).to have_http_status(:success) }
# FIXME: Remove 'have_http_status(:success)' after old webui got dropped
it { expect(response).to have_http_status(:success).or(have_http_status(:redirect)) }
end

context 'with no valid repository type' do
Expand All @@ -204,7 +205,8 @@
end

it { expect(assigns(:error)).to start_with("Couldn't add repository:") }
it { expect(response).to have_http_status(:success) }
# FIXME: Remove 'have_http_status(:success)' after old webui got dropped
it { expect(response).to have_http_status(:success).or(have_http_status(:redirect)) }
end

context 'with no valid repository Architecture' do
Expand All @@ -216,7 +218,8 @@
end

it { expect(assigns(:error)).to start_with("Couldn't add repository:") }
it { expect(response).to have_http_status(:success) }
# FIXME: Remove 'have_http_status(:success)' after old webui got dropped
it { expect(response).to have_http_status(:success).or(have_http_status(:redirect)) }
end

context 'with valid repository data' do
Expand All @@ -228,7 +231,8 @@
end

it { expect(assigns(:error)).to be_nil }
it { expect(response).to have_http_status(:success) }
# FIXME: Remove 'have_http_status(:success)' after old webui got dropped
it { expect(response).to have_http_status(:success).or(have_http_status(:redirect)) }
end
end

Expand Down

0 comments on commit 614acd8

Please sign in to comment.