diff options
Diffstat (limited to 'spec/views/groups')
-rw-r--r-- | spec/views/groups/observability.html.haml_spec.rb | 18 | ||||
-rw-r--r-- | spec/views/groups/observability/observability.html.haml_spec.rb | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/spec/views/groups/observability.html.haml_spec.rb b/spec/views/groups/observability.html.haml_spec.rb deleted file mode 100644 index db280d5a2ba..00000000000 --- a/spec/views/groups/observability.html.haml_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'groups/observability/index' do - let_it_be(:iframe_url) { "foo.test" } - - before do - assign(:observability_iframe_src, iframe_url) - end - - it 'renders as expected' do - render - page = Capybara.string(rendered) - iframe = page.find('iframe#observability-ui-iframe') - expect(iframe['src']).to eq(iframe_url) - end -end diff --git a/spec/views/groups/observability/observability.html.haml_spec.rb b/spec/views/groups/observability/observability.html.haml_spec.rb new file mode 100644 index 00000000000..0561737cb39 --- /dev/null +++ b/spec/views/groups/observability/observability.html.haml_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'groups/observability/observability.html.haml' do + let(:iframe_url) { "foo.test" } + + before do + allow(view).to receive(:observability_iframe_src).and_return(iframe_url) + end + + it 'renders as expected' do + render + page = Capybara.string(rendered) + div = page.find('#js-observability-app') + expect(div['data-observability-iframe-src']).to eq(iframe_url) + end +end |