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/views/profiles/show.html.haml_spec.rb')
-rw-r--r--spec/views/profiles/show.html.haml_spec.rb28
1 files changed, 27 insertions, 1 deletions
diff --git a/spec/views/profiles/show.html.haml_spec.rb b/spec/views/profiles/show.html.haml_spec.rb
index 5751d47ee97..d5cb5694031 100644
--- a/spec/views/profiles/show.html.haml_spec.rb
+++ b/spec/views/profiles/show.html.haml_spec.rb
@@ -3,7 +3,8 @@
require 'spec_helper'
RSpec.describe 'profiles/show' do
- let(:user) { create(:user) }
+ let_it_be(:user_status) { create(:user_status, clear_status_at: 8.hours.from_now) }
+ let_it_be(:user) { user_status.user }
before do
assign(:user, user)
@@ -23,5 +24,30 @@ RSpec.describe 'profiles/show' do
"rel=\"noopener noreferrer\">#{_('Learn more.')}</a>"
expect(rendered.include?(expected_link_html)).to eq(true)
end
+
+ it 'renders required hidden inputs for set status form' do
+ render
+
+ expect(rendered).to have_field(
+ 'user[status][emoji]',
+ with: user_status.emoji,
+ type: :hidden
+ )
+ expect(rendered).to have_field(
+ 'user[status][message]',
+ with: user_status.message,
+ type: :hidden
+ )
+ expect(rendered).to have_field(
+ 'user[status][availability]',
+ with: user_status.availability,
+ type: :hidden
+ )
+ expect(rendered).to have_field(
+ 'user[status][clear_status_after]',
+ with: user_status.clear_status_at.to_s(:iso8601),
+ type: :hidden
+ )
+ end
end
end