Skip to content

Instantly share code, notes, and snippets.

@Rosa-Fox
Created June 25, 2014 11:59
Show Gist options
  • Save Rosa-Fox/e8f3fd30faa006f79396 to your computer and use it in GitHub Desktop.
Save Rosa-Fox/e8f3fd30faa006f79396 to your computer and use it in GitHub Desktop.
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