Created
June 25, 2014 11:59
-
-
Save Rosa-Fox/e8f3fd30faa006f79396 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
describe '#redeem_by(user)' do | |
let(:access_contain_user_and_workshop_id) { Access.exists?(user_id: n, workshop_id: ["http-fundamentals", "rails-security"]) } | |
before do | |
@invitation = Factory.create(:invitation) | |
@user = Factory.create(:user) | |
@invitation.redeem_by(@user) | |
end | |
it "creates accesses for the user for each workshop" do | |
#check db for relevant accesses | |
access_contain_user_and_workshop_id.should exist_in_database | |
end | |
it "sets redeemed_at and user_id" do | |
#check the redeemed_at and user_id are set here. Might need Timecop" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment