-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75a3504
commit 644dfb4
Showing
1 changed file
with
4 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,26 +8,18 @@ | |
context "when logged in as a key member" do | ||
let(:member) { create :key_member } | ||
|
||
it "if they have no door code, tells them to email membership@" do | ||
it "it allows them to unlock the door" do | ||
visit members_root_path | ||
expect(page).to have_content "don't seem to have a door code" | ||
expect(page).to have_content "[email protected]" | ||
end | ||
|
||
it "if they have a door code, it is shown" do | ||
door_code = create(:door_code, user: member) | ||
visit members_root_path | ||
expect(page).to have_content "Your door code" | ||
expect(page).to have_content door_code.code | ||
expect(page).to have_content "Click the button below to unlock the door and access the space" | ||
end | ||
end | ||
|
||
context "when logged in as a non-key-member" do | ||
let(:member) { create :member } | ||
|
||
it "does not show content about the door code" do | ||
it "does not show content about unlocking the door" do | ||
visit members_root_path | ||
expect(page).to_not have_content "door code" | ||
expect(page).to_not have_content "unlock the door" | ||
end | ||
end | ||
end |