Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby
681 B
Raw Blame
require "test_helper"

class Trading212ItemBroadcastRenderTest < ActiveSupport::TestCase
  # #3630. The card takes its accounts only from visible_accounts, never from
  # Current.user. It used to filter with Current.user.accessible_accounts
  # directly, so any render without a viewer raised.
  test "the connection card renders with no current user" do
    Current.reset
    assert_nil Current.user

    assert_nothing_raised do
      ApplicationController.render(
        partial: "trading212_items/trading212_item",
        locals: { trading212_item: trading212_items(:configured_item), visible_accounts: trading212_items(:configured_item).accounts }
      )
    end
  end
end