diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-26 14:28:24 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-04 14:52:55 +0300 |
commit | 3629dc338fbe6c351ce89a94caa4c238965ee33a (patch) | |
tree | 65263132237dc471c869b05b9071b773b7404924 /spec/controllers | |
parent | 17b25bd263edaae70d5dae5fb035f5c28f9bb0cd (diff) |
Display terms to a user
When terms are present, they can be viewed on `/-/users/terms`.
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/users/terms_controller_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/controllers/users/terms_controller_spec.rb b/spec/controllers/users/terms_controller_spec.rb new file mode 100644 index 00000000000..74d17748093 --- /dev/null +++ b/spec/controllers/users/terms_controller_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe Users::TermsController do + let(:user) { create(:user) } + + before do + sign_in user + end + + describe 'GET #index' do + it 'redirects when no terms exist' do + get :index + + expect(response).to have_gitlab_http_status(:redirect) + end + + it 'shows terms when they exist' do + create(:term) + + expect(response).to have_gitlab_http_status(:success) + end + end +end |