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_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
745541d1ed9a97715ee21919e3dc495a1add55c0Eugen Kuksa let(:ontology_version) { create :ontology_version }
745541d1ed9a97715ee21919e3dc495a1add55c0Eugen Kuksa let(:repository) { ontology_version.repository }
fff4fdff482b9349911ce6365e9ac85b86a1fd5fEugen Kuksa let!(:access_token) { repository.generate_access_token }
4de867f5bf046eb83029341a4b6520c7cac42274Eugen Kuksa expect(repository.access_tokens).not_to be_empty
9dd500e3acdc343dbefcaf88b7663db25be0ef46Eugen Kuksa it 'should associate with the generated token' do
4de867f5bf046eb83029341a4b6520c7cac42274Eugen Kuksa expect(repository.access_tokens.first).to eq(access_token)