diff options
author | James Lopez <james@jameslopez.es> | 2016-11-14 14:53:06 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 08:22:58 +0100 |
commit | 3b179bc37b940521522af6d8bf6762c2a9a0e251 (patch) | |
tree | b77cf724e7325928b73e04f80bde6bfd4dd431b1 /spec/serializers | |
parent | 81d0146c4cf0d34b1b81da770483ed864482149c (diff) | |
download | gitlab-ce-3b179bc37b940521522af6d8bf6762c2a9a0e251.tar.gz |
WIP - refactored events to use build serializer, related spec passing
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/analytics_build_entity_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/serializers/analytics_build_entity_spec.rb b/spec/serializers/analytics_build_entity_spec.rb index 33653d5b1e0..24040034f68 100644 --- a/spec/serializers/analytics_build_entity_spec.rb +++ b/spec/serializers/analytics_build_entity_spec.rb @@ -6,14 +6,19 @@ describe AnalyticsBuildEntity do end context 'when build is a regular job' do - let(:build) { create(:ci_build) } + let(:user) { create(:user) } + let(:build) { create(:ci_build, author: user) } subject { entity.as_json } - it 'contains url to build page and retry action' do + it 'contains URLs' do expect(subject).to include(:url, :branch_url, :commit_url) end + it 'contains the author' do + expect(subject).to include(:author) + end + it 'does not contain sensitive information' do expect(subject).not_to include(/token/) expect(subject).not_to include(/variables/) |