Sha256: b63972b8da4b3bc8afa0cf3b53d5db9a6ea4f75ff07b2d34cb25d84e455a1753
Contents?: true
Size: 1.43 KB
Versions: 11
Compression:
Stored size: 1.43 KB
Contents
# -*- encoding : utf-8 -*- RSpec.describe Card::Set::Self::AccountLinks do it "has a 'my card' link" do account_links = render_card :core, name: "*account links" expect(account_links).to have_tag "div#logging" do have_tag 'a[class=~"my-card-link"]', text: "Joe User" end end context "when user doesn't have special roles", with_user: "Joe Camel" do it "does not show role interface" do expect_view(:my_card, card: :account_links) .not_to include "Roles" end it "shows account settings link" do expect_view(:my_card, card: :account_links).to have_tag "ul.dropdown-menu" do with_tag :a, text: "Account", with: { href: "/Joe_Camel+*account_settings" } end end end context "when user has special roles", with_user: "Joe User" do it "shows role interface" do expect_view(:my_card, card: :account_links).to have_tag "ul.dropdown-menu" do with_tag "li.dropdown-item" do with_checkbox "pointer_checkbox-joe_user-Xenabled_role-1", "Anyone Signed In" with_tag :a, text: "Anyone Signed In", with: { href: "/Anyone_Signed_In" } end with_tag :a, text: "Shark", with: { href: "/Shark" } end end it "shows account settings link" do expect_view(:my_card, card: :account_links).to have_tag "ul.dropdown-menu" do with_tag :a, text: "Account", with: { href: "/Joe_User+*account_settings" } end end end end
Version data entries
11 entries across 11 versions & 1 rubygems