change new publisher to public by default to make testing easier

This commit is contained in:
Dennis Collinson 2012-04-17 16:43:42 -07:00
parent 25f6df230d
commit 16223d003f
4 changed files with 9 additions and 8 deletions

View file

@ -5,7 +5,7 @@ app.views.AspectsDropdown = app.views.Base.extend({
}, },
postRenderTemplate : function(){ postRenderTemplate : function(){
this.setVisibility({target : this.$("a[data-visibility='all-aspects']").first()}) this.setVisibility({target : this.$("a[data-visibility='public']").first()})
}, },
setVisibility : function(evt){ setVisibility : function(evt){

View file

@ -122,7 +122,7 @@ When /^I select the mood "([^"]*)"$/ do |mood|
click_link mood click_link mood
end end
Then /^the post's mood should (?:still |)be "([^"]*)"$/ do |mood| Then /^the post's (?:default |)mood should (?:still |)be "([^"]*)"$/ do |mood|
assert_post_renders_with(mood) assert_post_renders_with(mood)
end end

View file

@ -47,10 +47,11 @@ Feature: Creating a new post
And I upload a fixture picture with filename "button.gif" And I upload a fixture picture with filename "button.gif"
And I start the framing process And I start the framing process
#defaults to the prettiest mood
Then the post's default mood should be "Wallpaper"
Then it should be a wallpaper frame with the background "button.gif"
Then I should see "This is hella customized" in the framer preview Then I should see "This is hella customized" in the framer preview
#### Will test the template picker being ported to JS #### #changing the mood changes the presentation
# Then the default mood for the post should be "Wallpaper"
# And I should see the image "button.gif" background
When I select the mood "Day" When I select the mood "Day"
Then the post's mood should be "Day" Then the post's mood should be "Day"
And "button.gif" should be in the post's picture viewer And "button.gif" should be in the post's picture viewer

View file

@ -16,9 +16,9 @@ describe("app.views.AspectsDropdown", function(){
this.view.render() this.view.render()
}) })
it("defaults to All Aspects Visibility", function(){ it("defaults to Public Visibility", function(){
expect(this.view.$("input.aspect_ids").val()).toBe("all_aspects") expect(this.view.$("input.aspect_ids").val()).toBe("public")
expect($.trim(this.view.$(".dropdown-toggle .text").text())).toBe("All Aspects") expect($.trim(this.view.$(".dropdown-toggle .text").text())).toBe("Public")
}) })
describe("selecting Public", function(){ describe("selecting Public", function(){