diff options
author | James Lopez <james@jameslopez.es> | 2016-11-14 13:52:29 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 10:22:58 +0300 |
commit | 81d0146c4cf0d34b1b81da770483ed864482149c (patch) | |
tree | 5c634b0fff5df0b5fe148a7cbbaee914b47cfcf5 /spec/serializers/analytics_build_entity_spec.rb | |
parent | 1744d633eded81103ee4691e6980efb6930dc975 (diff) |
WIP - refactoring URL builder and events presenter into serializers
Diffstat (limited to 'spec/serializers/analytics_build_entity_spec.rb')
-rw-r--r-- | spec/serializers/analytics_build_entity_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/serializers/analytics_build_entity_spec.rb b/spec/serializers/analytics_build_entity_spec.rb new file mode 100644 index 00000000000..33653d5b1e0 --- /dev/null +++ b/spec/serializers/analytics_build_entity_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe AnalyticsBuildEntity do + let(:entity) do + described_class.new(build, request: double) + end + + context 'when build is a regular job' do + let(:build) { create(:ci_build) } + + subject { entity.as_json } + + it 'contains url to build page and retry action' do + expect(subject).to include(:url, :branch_url, :commit_url) + end + + it 'does not contain sensitive information' do + expect(subject).not_to include(/token/) + expect(subject).not_to include(/variables/) + end + end +end |