|
53 | 53 |
|
54 | 54 | describe "POST 'update_state'" do |
55 | 55 | it "returns http redirect" do |
56 | | - post :update_state, params: {event_slug: event, proposal_uuid: proposal.uuid} |
| 56 | + post :update_state, params: {event_slug: event, uuid: proposal.uuid} |
57 | 57 | expect(response).to redirect_to(event_staff_program_proposals_path(event)) |
58 | 58 | end |
59 | 59 | end |
60 | 60 |
|
61 | 61 | describe "POST 'finalize'" do |
62 | 62 | it "returns http redirect" do |
63 | | - post :finalize, params: {event_slug: event, proposal_uuid: proposal.uuid} |
| 63 | + post :finalize, params: {event_slug: event, uuid: proposal.uuid} |
64 | 64 | expect(response).to redirect_to(event_staff_program_proposal_path(event, proposal)) |
65 | 65 | end |
66 | 66 |
|
67 | 67 | it "finalizes the state" do |
68 | 68 | proposal = create(:proposal_with_track, event: event, state: :soft_accepted) |
69 | | - post :finalize, params: {event_slug: event, proposal_uuid: proposal.uuid} |
| 69 | + post :finalize, params: {event_slug: event, uuid: proposal.uuid} |
70 | 70 | expect(proposal.reload).to be_accepted |
71 | 71 | end |
72 | 72 |
|
73 | 73 | it "creates a draft program session" do |
74 | 74 | proposal = create(:proposal_with_track, event: event, state: :soft_accepted) |
75 | | - post :finalize, params: {event_slug: event, proposal_uuid: proposal.uuid} |
| 75 | + post :finalize, params: {event_slug: event, uuid: proposal.uuid} |
76 | 76 | expect(proposal.program_session).to be_unconfirmed_accepted |
77 | 77 | end |
78 | 78 |
|
79 | 79 | it "sends appropriate emails" do |
80 | 80 | proposal = create(:proposal_with_track, event: event, state: :soft_accepted) |
81 | 81 | mail = double(:mail, deliver_now: nil) |
82 | 82 | expect(Staff::ProposalMailer).to receive('send_email').and_return(mail) |
83 | | - post :finalize, params: {event_slug: event, proposal_uuid: proposal.uuid} |
| 83 | + post :finalize, params: {event_slug: event, uuid: proposal.uuid} |
84 | 84 | end |
85 | 85 |
|
86 | 86 | it "creates a notification" do |
87 | 87 | proposal = create(:proposal_with_track, :with_two_speakers, event: event, state: :soft_accepted) |
88 | 88 | expect { |
89 | | - post :finalize, params: {event_slug: event, proposal_uuid: proposal.uuid} |
| 89 | + post :finalize, params: {event_slug: event, uuid: proposal.uuid} |
90 | 90 | }.to change { |
91 | 91 | Notification.count |
92 | 92 | }.by(2) |
|
0 commit comments