diff options
Diffstat (limited to 'spec/controllers/api')
| -rw-r--r-- | spec/controllers/api/v1/creations_controller_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/controllers/api/v1/creations_controller_spec.rb b/spec/controllers/api/v1/creations_controller_spec.rb index 6cbb35d1..add02015 100644 --- a/spec/controllers/api/v1/creations_controller_spec.rb +++ b/spec/controllers/api/v1/creations_controller_spec.rb @@ -4,10 +4,12 @@ describe Api::V1::CreationsController do context "when signed in" do let(:creation) { create(:creation) } let(:user) { create(:user) } + let(:repository) { double } before :each do request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Token.encode_credentials(user.authentication_token) - Creation.stub(:visible_creations).and_return([creation]) + CreationRepository.any_instance.stub(:visible_creations).and_return([creation]) + get :index, :format => :json end |
