Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

AO3-4928 extend gifts_controller coverage #3157

Open
wants to merge 4 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

hatal175 commented Nov 12, 2017

Fixed return problem in access_denied error path.

Issue

https://otwarchive.atlassian.net/browse/AO3-4928

Purpose

I extended test coverage for gifts_controller.

Testing

Run tests.

Credit

Tal Hayon

Please use he.

AO3-4928 extend gifts_controller coverage
Fixed return problem in access_denied error path
@@ -0,0 +1,8 @@
+require 'faker'
@houndci-bot

houndci-bot Nov 12, 2017

Missing magic comment # frozen_string_literal: true.

+ work { create(:work) }
+ recipient "recipient"
+ end
+end
@houndci-bot

houndci-bot Nov 12, 2017

Final newline missing.

+ include RedirectExpectationHelper
+
+ describe 'toggle_rejected'
+ let (:gift) { create(:gift) }
@houndci-bot

houndci-bot Nov 12, 2017

Inconsistent indentation detected.
(...) interpreted as grouped expression.

+ describe 'toggle_rejected'
+ let (:gift) { create(:gift) }
+
+ it 'should reject if no user is logged on' do
@houndci-bot

houndci-bot Nov 12, 2017

Inconsistent indentation detected.

+ post :toggle_rejected, params: { id: gift.id }
+ expect(flash[:error]).to include("Sorry, you don't have permission to access the page you were trying to reach. Please log in.")
+ end
+end
@houndci-bot

houndci-bot Nov 12, 2017

Final newline missing.

hatal175 added some commits Nov 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment