diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-02-21 19:55:28 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-02-21 19:55:28 +0300 |
commit | dc9366dd310000ca9fb3a2cf14b03ff01a9f1fc2 (patch) | |
tree | 9ce2915a12307335eb5f5ec7786a0e113af1c8cb /spec/javascripts/fixtures | |
parent | b5072fa3230bde36ff4e3a02f8e5035297ed5318 (diff) |
Make fixtures/snippet.rb deterministic
Diffstat (limited to 'spec/javascripts/fixtures')
-rw-r--r-- | spec/javascripts/fixtures/snippet.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/javascripts/fixtures/snippet.rb b/spec/javascripts/fixtures/snippet.rb index a14837e4d4a..bcd6546f3df 100644 --- a/spec/javascripts/fixtures/snippet.rb +++ b/spec/javascripts/fixtures/snippet.rb @@ -7,7 +7,6 @@ describe SnippetsController, '(JavaScript fixtures)', type: :controller do let(:namespace) { create(:namespace, name: 'frontend-fixtures' )} let(:project) { create(:project, :repository, namespace: namespace, path: 'branches-project') } let(:snippet) { create(:personal_snippet, title: 'snippet.md', content: '# snippet', file_name: 'snippet.md', author: admin) } - let!(:snippet_note) { create(:discussion_note_on_snippet, noteable: snippet, project: project, author: admin, note: '- [ ] Task List Item') } render_views @@ -17,6 +16,7 @@ describe SnippetsController, '(JavaScript fixtures)', type: :controller do before do sign_in(admin) + allow(Discussion).to receive(:build_discussion_id).and_return(['discussionid:ceterumcenseo']) end after do @@ -24,6 +24,8 @@ describe SnippetsController, '(JavaScript fixtures)', type: :controller do end it 'snippets/show.html.raw' do |example| + create(:discussion_note_on_snippet, noteable: snippet, project: project, author: admin, note: '- [ ] Task List Item') + get(:show, params: { id: snippet.to_param }) expect(response).to be_success |