diff --git a/.gitignore b/.gitignore index bef3477797..af81d5a636 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ config/initializers/recaptcha.rb config/config.yml config/initializers/site_keys.rb Gemfile.lock +/public/system* diff --git a/app/models/drupal_main_image.rb b/app/models/drupal_main_image.rb index f13e6a6f23..33f42926cb 100644 --- a/app/models/drupal_main_image.rb +++ b/app/models/drupal_main_image.rb @@ -1,6 +1,6 @@ class DrupalMainImage < ActiveRecord::Base - self.table_name 'content_field_main_image' + self.table_name = 'content_field_main_image' self.primary_key = 'vid' belongs_to :drupal_node, :foreign_key => 'vid' diff --git a/public/bookmarklet.js b/public/bookmarklet.js new file mode 100644 index 0000000000..09ef22a667 --- /dev/null +++ b/public/bookmarklet.js @@ -0,0 +1 @@ +javascript:(function alpha() { if ((window.location+'').split('publiclaboratory')[0] == 'http://' || (window.location+'').split('publiclaboratory')[0] == 'http://www.') { window.location = 'http://alpha.'+(window.location+'').split('://')[1] } else { window.location = 'http://'+(window.location+'').split('://alpha.')[1] }})() diff --git a/public/favicon.ico b/public/favicon.ico index e69de29bb2..7397a95142 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/test/fixtures/drupal_nodes.yml b/test/fixtures/drupal_nodes.yml deleted file mode 100644 index c63aac0b60..0000000000 --- a/test/fixtures/drupal_nodes.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value diff --git a/test/fixtures/node.yml b/test/fixtures/node.yml new file mode 100644 index 0000000000..0a72b61080 --- /dev/null +++ b/test/fixtures/node.yml @@ -0,0 +1,20 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + title: "Canon A1200 IR conversion at PLOTS Barnraising at LUMCON" + created: 1362353067 + changed: 1362354920 + status: 1 + type: "note" + uid: 2 + nid: 1 + # this needs a drupal_node_revision and other crap + +two: + title: "about" + created: 1362353067 + changed: 1362354920 + status: 1 + type: "page" + uid: 1 + nid: 2 diff --git a/test/fixtures/rusers.yml b/test/fixtures/rusers.yml new file mode 100644 index 0000000000..6f03f2ed52 --- /dev/null +++ b/test/fixtures/rusers.yml @@ -0,0 +1,9 @@ +one: + username: warren + email: jeff@publiclaboratory.org + #password: lalala + +two: + username: jeff + email: jeff@pxlshp.com + #password: lalala diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml deleted file mode 100644 index 20b330d9d2..0000000000 --- a/test/fixtures/users.yml +++ /dev/null @@ -1,9 +0,0 @@ -one: - username: MyString - email: MyString - password: MyString - -two: - username: MyString - email: MyString - password: MyString diff --git a/test/integration/public_pages_test.rb b/test/integration/public_pages_test.rb new file mode 100644 index 0000000000..9322c79e87 --- /dev/null +++ b/test/integration/public_pages_test.rb @@ -0,0 +1,21 @@ +require 'test_helper' + +class PublicPagesTest < ActionDispatch::IntegrationTest + # we need some fixtures yo! + + test "browse front page" do + get "/" + assert_response :success + end + + test "browse /research" do + get "/research" + assert_response :success + end + + test "browse /about" do + get "/about" + assert_response :success + end + +end diff --git a/test/unit/comment_test.rb b/test/unit/comment_test.rb deleted file mode 100644 index 16e12cb11a..0000000000 --- a/test/unit/comment_test.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'test_helper' - -class CommentTest < ActiveSupport::TestCase - def test_should_be_valid - assert Comment.new.valid? - end - - test "should not save comment without body" do - post = Post.new - assert !post.save, "Saved the comment without body text" - end - -end diff --git a/test/unit/drupal_comment_test.rb b/test/unit/drupal_comment_test.rb new file mode 100644 index 0000000000..77ac1343a3 --- /dev/null +++ b/test/unit/drupal_comment_test.rb @@ -0,0 +1,14 @@ +require 'test_helper' + +class DrupalCommentTest < ActiveSupport::TestCase + + test 'new_comment_should_be_valid' do + assert DrupalComment.new.valid? + end + + #test "should not save comment without body" do + # note = DrupalNode.new + # assert !note.save, "Saved the comment without body text" + #end + +end diff --git a/test/unit/drupal_node_test.rb b/test/unit/drupal_node_test.rb index db23bc4aa0..4437032bdb 100644 --- a/test/unit/drupal_node_test.rb +++ b/test/unit/drupal_node_test.rb @@ -1,7 +1,14 @@ require 'test_helper' class DrupalNodeTest < ActiveSupport::TestCase + # test "the truth" do # assert true # end + + test "should not save node without title, or anything else" do + node = DrupalNode.new + assert !node.save + end + end diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index cde98de923..00c1f16413 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -1,7 +1,9 @@ require 'test_helper' class UserTest < ActiveSupport::TestCase + def test_should_be_valid assert User.new.valid? end + end diff --git a/vendor/plugins/.gitkeep b/vendor/plugins/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000