access_spec.rb revision 68ff70f830e958de6693000b9652c9aa8cff97e7
6f74297c639ecd2696280eb0db456ffad65515deEugen Kuksarequire 'spec_helper'
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa let!(:repository_pub_r) { create :repository, user: user,
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa let!(:repository_pub_rw) { create :repository, user: user,
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa let!(:repository_priv_r) { create :repository, user: user,
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa let!(:repository_priv_rw) { create :repository, user: user,
6f74297c639ecd2696280eb0db456ffad65515deEugen Kuksa it "should fetch the public#{access_modifier} repository" do
6f74297c639ecd2696280eb0db456ffad65515deEugen Kuksa include?("public#{access_modifier}")).to be_truthy
6f74297c639ecd2696280eb0db456ffad65515deEugen Kuksa it "should not fetch the private#{access_modifier} repository" do
6f74297c639ecd2696280eb0db456ffad65515deEugen Kuksa include?("private#{access_modifier}")).to be_falsy
9dd500e3acdc343dbefcaf88b7663db25be0ef46Eugen Kuksa let(:repository) { create :repository, access: 'private_rw' }
68ff70f830e958de6693000b9652c9aa8cff97e7Eugen Kuksa @access_token = repository.generate_access_token
9dd500e3acdc343dbefcaf88b7663db25be0ef46Eugen Kuksa it 'should associate with the generated token' do
68ff70f830e958de6693000b9652c9aa8cff97e7Eugen Kuksa expect(repository.access_token.first).to eq(@access_token)