diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-01-31 14:38:45 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-01-31 14:38:45 -0600 |
commit | 5fcbe12730960e93b1d3afe6be846eb9ef570d32 (patch) | |
tree | 79a09bfb5e38f7c366b503d363d561ba98f13799 /spec/serializers/analytics_summary_serializer_spec.rb | |
parent | ecdcd1be87e140c144bb2afc861a1dc56b297cdd (diff) | |
parent | 2c358b4b5613d6d398533dc559674da14de3c0d7 (diff) | |
download | gitlab-ce-5fcbe12730960e93b1d3afe6be846eb9ef570d32.tar.gz |
Merge branch 'master' into go-go-gadget-webpack
* master: (83 commits)
Fix small typo on new branch button spec
Abillity to promote project labels to group labels
Update and pin the `jwt` gem to ~> 1.5.6
refactor merge request build service
Update index.md
Clarify that Auto Deploy requires a public project.
cop for gem fetched from a git source
Add CHANGELOG entry
Remove new branch button for confidential issues
Remove flash warning from login page
add complete changelog
Add project ID index to `project_authorizations` table to optimize queries
Fix disable storing of sensitive information when importing a new repo
Fix notification when global=disabled, group=watch
Ensure rake is called within the correct bundle context
Fix 8.16.0 release date.
Improve search within group logic
Add changelog item about new attributes in group api
Update group api doc with full_name and full_path attributes
Add tests for nested groups in search service and search helper
...
Diffstat (limited to 'spec/serializers/analytics_summary_serializer_spec.rb')
-rw-r--r-- | spec/serializers/analytics_summary_serializer_spec.rb | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/spec/serializers/analytics_summary_serializer_spec.rb b/spec/serializers/analytics_summary_serializer_spec.rb index 7a84c8b0b40..5d7a94c2d02 100644 --- a/spec/serializers/analytics_summary_serializer_spec.rb +++ b/spec/serializers/analytics_summary_serializer_spec.rb @@ -1,29 +1,28 @@ require 'spec_helper' describe AnalyticsSummarySerializer do - let(:serializer) do - described_class - .new.represent(resource) + subject do + described_class.new.represent(resource) end - let(:json) { serializer.as_json } let(:project) { create(:empty_project) } let(:user) { create(:user) } + let(:resource) do - Gitlab::CycleAnalytics::Summary::Issue.new(project: double, - from: 1.day.ago, - current_user: user) + Gitlab::CycleAnalytics::Summary::Issue + .new(project: double, from: 1.day.ago, current_user: user) end before do - allow_any_instance_of(Gitlab::CycleAnalytics::Summary::Issue).to receive(:value).and_return(1.12) + allow_any_instance_of(Gitlab::CycleAnalytics::Summary::Issue) + .to receive(:value).and_return(1.12) end it 'it generates payload for single object' do - expect(json).to be_kind_of Hash + expect(subject).to be_kind_of Hash end it 'contains important elements of AnalyticsStage' do - expect(json).to include(:title, :value) + expect(subject).to include(:title, :value) end end |