Permalink
Browse files

Initial state for CodeStock demo.

  • Loading branch information...
MattHoneycutt committed Jun 16, 2012
1 parent bce1d36 commit 562519a3bbb783735a4d1d5d029594be5721d20d
@@ -6,7 +6,7 @@
namespace FailTracker.IntegrationTests
{
- [SetUpFixture]
+ //[SetUpFixture]
public class Config
{
private SpecsForIntegrationHost _host;
@@ -122,7 +122,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RawSelenium\AuthenticationSpecs.cs" />
<Compile Include="RegularUserAuthenticator.cs" />
- <Compile Include="SupportRequests\SubmitNewRequest.cs" />
<Compile Include="TestSeedData.cs" />
</ItemGroup>
<ItemGroup>
@@ -141,10 +140,10 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
- <PostBuildEvent>
-if not exist "$(TargetDir)x86" md "$(TargetDir)x86"
-xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86"
-if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64"
+ <PostBuildEvent>
+if not exist "$(TargetDir)x86" md "$(TargetDir)x86"
+xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86"
+if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64"
xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -20,9 +20,7 @@ namespace FailTracker.IntegrationTests.RawSelenium
[Explicit]
public class AuthenticationSpecs
{
- //TODO: Switch back to
- //private const string TargetAppUrl = "URL GOES HERE!";
- private const string TargetAppUrl = "http://localhost:65140";
+ private const string TargetAppUrl = "URL GOES HERE!";
[Test]
public void unauthorized_user_cannot_access_dashboard()
@@ -1,49 +0,0 @@
-using FailTracker.IntegrationTests.Contexts;
-using FailTracker.Web.Controllers;
-using FailTracker.Web.Models.SupportRequest;
-using NUnit.Framework;
-using SpecsFor;
-using SpecsFor.Mvc;
-using MvcContrib.TestHelper;
-using Should;
-using SpecsFor.Mvc.Smtp;
-using SpecsFor.ShouldExtensions;
-
-namespace FailTracker.IntegrationTests.SupportRequests
-{
- public class SubmitNewRequest
- {
- public class when_a_new_support_request_is_submitted : SpecsFor<MvcWebApp>
- {
- protected override void Given()
- {
- Given<UserIsUnauthenticated>();
- base.Given();
- }
-
- protected override void When()
- {
- SUT.NavigateTo<SupportRequestController>(c => c.Submit());
- SUT.FindFormFor<SubmitSupportRequestForm>()
- .Field(f => f.Subject).SetValueTo("Fail Tracker ROCKS")
- .Field(f => f.From).SetValueTo("number1fan@failtrackerfans.com")
- .Field(f => f.Body).SetValueTo("You guys frickin' rule!")
- .Submit();
- }
-
- [Test]
- public void then_it_acknowledges_the_submission()
- {
- SUT.Route.ShouldMapTo<SupportRequestController>(c => c.ThankYou());
- SUT.FindDisplayFor<SupportAcknowledgementViewModel>()
- .DisplayFor(m => m.From).Text.ShouldEqual("number1fan@failtrackerfans.com");
- }
-
- [Test]
- public void then_it_sends_the_devs_an_email()
- {
- SUT.Mailbox().MailMessages.ShouldContain(m => m.To[0].Address == "mbhoneycutt@gmail.com");
- }
- }
- }
-}
Binary file not shown.
@@ -1,40 +0,0 @@
-using System.Net.Mail;
-using System.Web.Mvc;
-using FailTracker.Web.Models.SupportRequest;
-using Microsoft.Web.Mvc;
-
-namespace FailTracker.Web.Controllers
-{
- public class SupportRequestController : FailTrackerController
- {
- public ActionResult Submit()
- {
- return View();
- }
-
- [HttpPost]
- public ActionResult Submit(SubmitSupportRequestForm form)
- {
- try
- {
- using (var client = new SmtpClient())
- {
- client.Send(form.From, "mbhoneycutt@gmail.com", form.Subject, form.Body);
- }
- }
- //Who cares? They're just paying us!
- catch
- {
-
- }
-
- TempData["From"] = form.From;
- return this.RedirectToAction(c => c.ThankYou());
- }
-
- public ActionResult ThankYou()
- {
- return View(new SupportAcknowledgementViewModel{From = (string) TempData["From"]});
- }
- }
-}
@@ -180,7 +180,6 @@
<Content Include="Content\themes\base\minified\jquery.ui.slider.min.css" />
<Content Include="Content\themes\base\minified\jquery.ui.tabs.min.css" />
<Content Include="Content\themes\base\minified\jquery.ui.theme.min.css" />
- <Compile Include="Controllers\SupportRequestController.cs" />
<Compile Include="Helpers\HtmlHelpers.cs" />
<Compile Include="Helpers\HtmlTagExtensions.cs" />
<Compile Include="Helpers\ImageExtensions.cs" />
@@ -242,8 +241,6 @@
<Compile Include="Models\ReactivateIssue\ReactivateIssueForm.cs" />
<Compile Include="Models\Helpers\ProjectToolbarViewModel.cs" />
<Compile Include="Models\SignUp\SignUpForm.cs" />
- <Compile Include="Models\SupportRequest\SubmitSupportRequestForm.cs" />
- <Compile Include="Models\SupportRequest\SupportAcknowledgementViewModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Helpers\EnumExtensions.cs" />
<Content Include="Content\Account\LogOn.css" />
@@ -454,12 +451,6 @@
<ItemGroup>
<Content Include="Views\Shared\DisplayTemplates\_Layout.cshtml" />
</ItemGroup>
- <ItemGroup>
- <Content Include="Views\SupportRequest\Submit.cshtml" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="Views\SupportRequest\ThankYou.cshtml" />
- </ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
@@ -1,11 +0,0 @@
-namespace FailTracker.Web.Models.SupportRequest
-{
- public class SubmitSupportRequestForm
- {
- public string Subject { get; set; }
-
- public string From { get; set; }
-
- public string Body { get; set; }
- }
-}
@@ -1,7 +0,0 @@
-namespace FailTracker.Web.Models.SupportRequest
-{
- public class SupportAcknowledgementViewModel
- {
- public string From { get; set; }
- }
-}
@@ -1,8 +0,0 @@
-@model FailTracker.Web.Models.SupportRequest.SubmitSupportRequestForm
-
-<h2>Need help?</h2>
-@using(Html.BeginForm())
-{
- @Html.EditorForModel()
- @MyHelpers.ControlBox("Contact Us")
-}
@@ -1,4 +0,0 @@
-@model FailTracker.Web.Models.SupportRequest.SupportAcknowledgementViewModel
-
-<h2>Thanks!</h2>
-<p>Thank you for contacting us, @Html.DisplayFor(m => m.From). Your message has been received!</p>

0 comments on commit 562519a

Please sign in to comment.