Skip to content

A platform for community discussion. Free, open, simple.

DEV: Update specs to avoid dependence on ember-cli build (#24347)

David Taylore2e454c48049
diff --git a/spec/requests/invites_controller_spec.rb b/spec/requests/invites_controller_spec.rb
index fd7eb774735..7b56ce59409 100644
--- a/spec/requests/invites_controller_spec.rb
+++ b/spec/requests/invites_controller_spec.rb
@@ -10,7 +10,12 @@ RSpec.describe InvitesController do
it "shows the accept invite page" do
get "/invites/#{invite.invite_key}"
expect(response.status).to eq(200)
- expect(response.body).to have_tag(:script, with: { src: "/assets/discourse.js" })
+ expect(response.body).to have_tag(
+ :script,
+ with: {
+ "data-discourse-entrypoint" => "discourse",
+ },
+ )
expect(response.body).not_to include(invite.email)
expect(response.body).to_not include(
I18n.t(
diff --git a/spec/requests/topics_controller_spec.rb b/spec/requests/topics_controller_spec.rb
index da43ef6553b..106ee53adad 100644
--- a/spec/requests/topics_controller_spec.rb
+++ b/spec/requests/topics_controller_spec.rb
@@ -2714,7 +2714,7 @@ RSpec.describe TopicsController do
body = response.body
- expect(body).to have_tag(:script, src: "/assets/discourse.js")
+ expect(body).to have_tag(:script, with: { "data-discourse-entrypoint" => "discourse" })
expect(body).to have_tag(:meta, with: { name: "fragment" })
end
@@ -3116,7 +3116,7 @@ RSpec.describe TopicsController do
body = response.body
expect(response.status).to eq(200)
- expect(body).to have_tag(:script, with: { src: "/assets/discourse.js" })
+ expect(body).to have_tag(:script, with: { "data-discourse-entrypoint" => "discourse" })
expect(body).to_not have_tag(:meta, with: { name: "fragment" })
end
end
@@ -3129,7 +3129,7 @@ RSpec.describe TopicsController do
body = response.body
- expect(body).to have_tag(:script, with: { src: "/assets/discourse.js" })
+ expect(body).to have_tag(:script, with: { "data-discourse-entrypoint" => "discourse" })
expect(body).to have_tag(:meta, with: { name: "fragment" })
end
@@ -5162,7 +5162,7 @@ RSpec.describe TopicsController do
body = response.body
- expect(body).to have_tag(:script, with: { src: "/assets/discourse.js" })
+ expect(body).to have_tag(:script, with: { "data-discourse-entrypoint" => "discourse" })
expect(body).to have_tag(:meta, with: { name: "fragment" })
end
end