require 'rails_helper'

RSpec.describe "tokens/show", type: :view do
  before(:each) do
    assign(:token, Token.create!(
      canister_id: "Canister",
      standard: 2,
      symbol: "Symbol",
      name: "Name",
      total_supply: "",
      decimals: 3,
      transfer_fee: ""
    ))
  end

  it "renders attributes in <p>" do
    render
    expect(rendered).to match(/Canister/)
    expect(rendered).to match(/2/)
    expect(rendered).to match(/Symbol/)
    expect(rendered).to match(/Name/)
    expect(rendered).to match(//)
    expect(rendered).to match(/3/)
    expect(rendered).to match(//)
  end
end
